Skip to content

Forked repo adding all members. #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dwhacks opened this issue Jan 1, 2014 · 38 comments
Closed

Forked repo adding all members. #20

dwhacks opened this issue Jan 1, 2014 · 38 comments

Comments

@dwhacks
Copy link

dwhacks commented Jan 1, 2014

I don't know about you guys, but I have received a bunch of emails about being added to everyone's forked repos. I don't want to be added to everyone's fork. I don't know if this is an automatic feature of github, but please figure it out!

@dpgeorge
Copy link
Member

dpgeorge commented Jan 1, 2014

I get these too, I think everyone does...

Maybe this whole thing is going to get out of hand, having everyone a "collaborator". I wanted to give backers private access to the code, and, without creating an "enterprise project", this was the only way I could get it working.

I also wanted people to be able to edit the GitHub wiki.

Any suggestions?

@skgsergio
Copy link

Yep, I noticed it. Sorry here, I made a fork to make some tests but I've deleted it as soon as I noticed it.

Now I'm using my private server.

@skgsergio
Copy link

Also I think that is a problem to have all members as collaborators because we can commit and manage issues.

@wbphelps
Copy link

wbphelps commented Jan 1, 2014

I contribute to several repos on Github. Usually people fork a repo, make
their changes, and then the owner can merge them back in. Why not just keep
it that way?

William

On Wed, Jan 1, 2014 at 8:24 AM, Sergio Conde Gómez
notifications-at-github.com |github/Allow William| <
7h5fdys47t@sneakemail.com> wrote:

Also I think that is a problem to have all members as collaborators
because we can commit and manage issues.


Reply to this email directly or view it on GitHubhttps://github.com/dpgeorge/micropython/issues/20#issuecomment-31425281
.

(sent directly from my brain - read at your own risk!)

@pfalcon
Copy link
Contributor

pfalcon commented Jan 1, 2014

Any suggestions?

I did mine long time ago - after so successful Kickstarter project, please open up project ASAP and enjoy community-building and fame ;-). I understand that these may lead to feedback avalanche which may take away your cycles, but as a benevolent dictator, you can listen and respond per your own schedule. And well, the sooner it starts, the sooner it stabilizes.

@skgsergio
Copy link

@wbphelps that's what @dpgeorge wanted but restricted to backers at first. Later he'll make it public.

@dpgeorge
Copy link
Member

dpgeorge commented Jan 1, 2014

Eventually it'll be a public repo. The reason to keep it private was to give backers early access (their reward!) and limit the feedback initially so I have time to code!

Okay then, I see 3 options:

  1. Keep it as is, private with collaborators, and just trust people to not send bulk emails.
  2. Re-do the repo and make it an "organization" account so everyone can have read-only access (but open issues and edit the wiki).
  3. Just make it public right now.

I'd go for 3, but don't want to take away from those who pledged to have early access...

@skgsergio
Copy link

If I had to vote I prefer the 3rd option.
Personally I didn't pledged for early access (although I wanted to have a look into your code and mess with it).

Maybe you should do a little update in the kickstarter project (only for backers) and make a vote.

@sarevian
Copy link

sarevian commented Jan 1, 2014

While it's a bit annoying being added to all the forked repositories it isn't too hard to go to "Account settings - Repositories" and select [leave] for any you don't feel like keeping. Or just select "Ignore" in the [watching] option of a repository so you don't get news and updates.

@pfalcon
Copy link
Contributor

pfalcon commented Jan 1, 2014

Just make it public right now.
I'd go for 3, but don't want to take away from those who pledged to have early access...

Gentlemen who pledged on Kickstarter campaign - do you feel that you would lose anything if project goes open-source right away vs later? Note that choosing "later" means artificially throttling MicroPython progress, growth, community adoption. Damien has very specific product(s) in development and will concentrate on them. Do you want Arduino Due port, support for your particular hardware module, etc.? Nobody is going to do it, except community. And if only every 20ith of people who will look at the code will actually hack on it, then thousands and thousands need to get access to it. It takes time anyway, so sooner it starts, the better - for everyone.

@dwhacks
Copy link
Author

dwhacks commented Jan 1, 2014

I didnt pay for early access either, but that was only cuz I could see the benefit. I think it should go open ASAP and have our wonderful community contribute.

@hagenkaye
Copy link
Contributor

I don't have a problem with the code going public early. I think it's more important to have a clean master where Damien controls what gets added so the project doesn't get out of control.

@sarevian
Copy link

sarevian commented Jan 1, 2014

I go with the 'make it open' commenters.

@AWCharlie
Copy link

3 is fine by me. I have a big public project going and use an org with 5

or 6 members who can look at pull requests.

-- Charlie

On Wed, Jan 1, 2014 at 8:42 AM, Damien George notifications@github.comwrote:

Eventually it'll be a public repo. The reason to keep it private was to
give backers early access (their reward!) and limit the feedback initially
so I have time to code!

Okay then, I see 3 options:

Keep it as is, private with collaborators, and just trust people to
not send bulk emails.
2.

Re-do the repo and make it an "organization" account so everyone can
have read-only access (but open issues and edit the wiki).
3.

Just make it public right now.

I'd go for 3, but don't want to take away from those who pledged to have
early access...


Reply to this email directly or view it on GitHubhttps://github.com/dpgeorge/micropython/issues/20#issuecomment-31425567
.

Industrial ARMWorks
www.andahammer.com
253 851-0227

@redteam316
Copy link
Contributor

It needs to be set it up as an organization which is called micropython so that it is absolutely clear that it is the "upstream" repo and Damien can still choose who has push access. I.E. The org/repo would look like this: https://github.com/micropython/micropython

I am one of the developers for Embroidermodder and this is exactly how we have it setup: https://github.com/Embroidermodder/Embroidermodder

@howanghk
Copy link

howanghk commented Jan 1, 2014

I think 2 (make the repo under an "organization" account) is the best solution. As it doesn't hurt to have an "organization" and make it clear that this is the main repository. The best part is, you don't have to pay once you make it public later on.

Anyway, I am ok with 3 (make it public right now) too.

@dr2chase
Copy link

dr2chase commented Jan 1, 2014

To be slightly contrary, dealing with a full-on open source community can be a bit of a distraction if he's trying to get all his ducks in a row, and having a multiplicity of ports before he's got the first one fully sorted can have the effect of pouring concrete around premature design choices. (Yeah, I know, porting is also a great way of testing those design choices.)

If it's a matter of a month or three, I'd wait.

On 2014-01-01, at 12:00 PM, Paul Sokolovsky notifications@github.com wrote:

Just make it public right now.
I'd go for 3, but don't want to take away from those who pledged to have early access...

Gentlemen who pledged on Kickstarter campaign - do you feel that you would lose anything if project goes open-source right away vs later? Note that choosing "later" means artificially throttling MicroPython progress, growth, community adoption. Damien has very specific product(s) in development and will concentrate on them. Do you want Arduino Due port, support for your particular hardware module, etc.? Nobody is going to do it, except community. And if only every 20ith of people who will look at the code will actually hack on it, then thousands and thousands need to get access to it. It takes time anyway, so sooner it starts, the better - for everyone.


Reply to this email directly or view it on GitHub.

@KeithJRome
Copy link

The "normal" thing is to have the organization account with only a few (single digits) active contributors who are trusted with having Push rights to the trunk. They don't generally "push" directly - everyone (including those special high-access contributors) works in their own private or public forks and then submits Pull Requests to the main trunk. At that point one of those limited number of contributors who have Push rights will review the Pull Request and either accept it or send it back.

The whole private fork / pull request / accept or reject process encourages discussion over important commits and is highly transparent - even the comments associated with the individual commits are preserved. It also promotes the use of peer code reviews.

That's how we work on the IronPython team, and it works well there.

@wbphelps
Copy link

wbphelps commented Jan 1, 2014

How can I stop being subscribed to every fork? I don't want to be
subscribed to all these repo's, much less push access!!!
Yes I know I can unsub. I don't want to be subbed in the first place.
Maybe you should just remove me.
William

@wnj
Copy link

wnj commented Jan 1, 2014

On 01 Jan 2014, at 17:42 , Damien George notifications@github.com wrote:

Eventually it'll be a public repo. The reason to keep it private was to give backers early access (their reward!) and limit the feedback initially so I have time to code!

Okay then, I see 3 options:

Keep it as is, private with collaborators, and just trust people to not send bulk emails.

Re-do the repo and make it an "organization" account so everyone can have read-only access (but open issues and edit the wiki).

Just make it public right now.

I'd go for 3, but don't want to take away from those who pledged to have early access…

I don’t have a problem with option 3.


willy

@dorfsmay
Copy link

dorfsmay commented Jan 1, 2014

On 2014-01-01 09:42, Damien George wrote:

I'd go for 3, but don't want to take away from those who pledged to have early
access...

I doubt anybody cares about early access. People usually back kickstarter
projects because they want to see a product come to existence. If they can get
an earlier version for a bit cheaper than the final prodcut, then it's all
bonus. To be honest, the fact that you'd open it with a descent license was
one of my concern, and I only backed the project once you confirm you would,
so, yes, please, open it up!

Going with option #3 means using a work flow that everybody is used to. If you
think too much early feedback is going to be an issue, just make it clear that
you will ignore all feedback until a specific date, make it one of the first
point in your "Readme.md". Nobody will hold it against you, your updates have
been pretty amazing, both in terms of frequency and depth of details.

Let's move on this asap, I sure am getting tired of having to unsubscribe from
tens of repos, I'm not even sure which one is the official one now.

Yves.

@Dr-Syn
Copy link
Contributor

Dr-Syn commented Jan 1, 2014

Under your github account options (the crossed tools in the upper right
hand corner) there's a menu on the left. The second-to-bottom option is
'repositories'; the list on the right hand side when that is selected
indicates the repos you're subscribed to and where that repo was forked
from. Most/all of them will indicate dpgeorge/micropython as the source
repo.

In the 'notification center' option on the left hand side, by the way, you
can deselect the 'email' option so your inbox doesn't explode with a dozen
emails on mornings like this.

-- Dr-Syn

On Wed, Jan 1, 2014 at 11:06 AM, Yves Dorfsman notifications@github.comwrote:

On 2014-01-01 09:42, Damien George wrote:

I'd go for 3, but don't want to take away from those who pledged to have
early
access...

I doubt anybody cares about early access. People usually back kickstarter
projects because they want to see a product come to existence. If they can
get
an earlier version for a bit cheaper than the final prodcut, then it's all
bonus. To be honest, the fact that you'd open it with a descent license
was
one of my concern, and I only backed the project once you confirm you
would,
so, yes, please, open it up!

Going with option #3 means using a work flow that everybody is used to. If
you
think too much early feedback is going to be an issue, just make it clear
that
you will ignore all feedback until a specific date, make it one of the
first
point in your "Readme.md". Nobody will hold it against you, your updates
have
been pretty amazing, both in terms of frequency and depth of details.

Let's move on this asap, I sure am getting tired of having to unsubscribe
from
tens of repos, I'm not even sure which one is the official one now.

Yves.


Reply to this email directly or view it on GitHubhttps://github.com/dpgeorge/micropython/issues/20#issuecomment-31428089
.

@piranna
Copy link

piranna commented Jan 1, 2014

Please create an organization an open the code, the ones that backed for
exclusive early access would understand that's a movement to prevent bigger
chaos.

2014/1/1 Yves Dorfsman notifications@github.com

On 2014-01-01 09:42, Damien George wrote:

I'd go for 3, but don't want to take away from those who pledged to have
early
access...

I doubt anybody cares about early access. People usually back kickstarter
projects because they want to see a product come to existence. If they can
get
an earlier version for a bit cheaper than the final prodcut, then it's all
bonus. To be honest, the fact that you'd open it with a descent license
was
one of my concern, and I only backed the project once you confirm you
would,
so, yes, please, open it up!

Going with option #3 means using a work flow that everybody is used to. If
you
think too much early feedback is going to be an issue, just make it clear
that
you will ignore all feedback until a specific date, make it one of the
first
point in your "Readme.md". Nobody will hold it against you, your updates
have
been pretty amazing, both in terms of frequency and depth of details.

Let's move on this asap, I sure am getting tired of having to unsubscribe
from
tens of repos, I'm not even sure which one is the official one now.

Yves.


Reply to this email directly or view it on GitHubhttps://github.com/dpgeorge/micropython/issues/20#issuecomment-31428089
.

"Si quieres viajar alrededor del mundo y ser invitado a hablar en un monton
de sitios diferentes, simplemente escribe un sistema operativo Unix."
– Linus Tordvals, creador del sistema operativo Linux

@dpgeorge
Copy link
Member

dpgeorge commented Jan 1, 2014

Okay, I've created an organisation called "micropython". I can make 2 repositories to start with: the code (software/firmware), and the board (hardware). The code will be called "micropython".

Sorry for the mess with this initial set up!

@piranna
Copy link

piranna commented Jan 1, 2014

Don't worry, we probably would have get the same errors on your situation
:-) At least we have learned the lesson for the next one ;-)

2014/1/1 Damien George notifications@github.com

Okay, I've created an organisation called "micropython". I can make 2
repositories to start with: the code (software/firmware), and the board
(hardware). The code will be called "micropython".

Sorry for the mess with this initial set up!


Reply to this email directly or view it on GitHubhttps://github.com/dpgeorge/micropython/issues/20#issuecomment-31428447
.

"Si quieres viajar alrededor del mundo y ser invitado a hablar en un monton
de sitios diferentes, simplemente escribe un sistema operativo Unix."
– Linus Tordvals, creador del sistema operativo Linux

@dpgeorge
Copy link
Member

dpgeorge commented Jan 1, 2014

I transferred the repo to github.com/micropython/micropython . I think everything remained intact. It's public so you can all access it.

@skgsergio
Copy link

Nice, thanks @dpgeorge

@dpgeorge
Copy link
Member

dpgeorge commented Jan 1, 2014

Any suggestions how I should set up the teams in the organisation? I would like to give people pull access so they can edit the wiki. Do people want to be added to a "pull team"?

@pfalcon
Copy link
Contributor

pfalcon commented Jan 1, 2014

AFAIK, default setting of a project is that everyone with a github account can edit wiki. So, you can just (re)set it to such until spam ensues (I never saw spam in github wiki, keeping fingers crossed).

@dpgeorge
Copy link
Member

dpgeorge commented Jan 1, 2014

@pfalcon that seems to be correct (that any GitHub user can edit the wiki) and I've set the option so that this is allowed for micropython.

@piranna
Copy link

piranna commented Jan 3, 2014

So, I assume everyone involved needs to refork from
github.com/micropython/micropython
...? Is this correct?

Not really, relating to the pull requests GitHub forks will be
automatically updated to point to the new repo.

"Si quieres viajar alrededor del mundo y ser invitado a hablar en un monton
de sitios diferentes, simplemente escribe un sistema operativo Unix."
– Linus Tordvals, creador del sistema operativo Linux

@pfalcon
Copy link
Contributor

pfalcon commented Jan 5, 2014

It seems this issue has been well resolved and can be closed now?

@redteam316
Copy link
Contributor

Yes, close it. This is resolved.

@piranna
Copy link

piranna commented Jan 5, 2014

It keeps to know how to be removed from all the forks, my GitHub daahboard
sucks with all of them, it's confusing and dificult to find the project you
want to go... :-(

Send from my Samsung Galaxy Note II
El 05/01/2014 12:27, "Jonathan Greig" notifications@github.com escribió:

Yes, close it. This is resolved.


Reply to this email directly or view it on GitHubhttps://github.com//issues/20#issuecomment-31601862
.

@skgsergio
Copy link

@piranna To leave the forks just go to Account settings > Repositories, and then click leave on them.

@piranna
Copy link

piranna commented Jan 5, 2014

I was looking directly on each project :-P Thanks! :-D

Send from my Samsung Galaxy Note II
El 05/01/2014 13:13, "Sergio Conde Gómez" notifications@github.com
escribió:

@piranna https://github.com/piranna To leave the forks just go to
Account settings > Repositories, and then click leave on them.


Reply to this email directly or view it on GitHubhttps://github.com//issues/20#issuecomment-31602686
.

@pfalcon pfalcon closed this as completed Jan 8, 2014
tannewt referenced this issue in tannewt/circuitpython Oct 21, 2016
to the same sector.

This fixes #20, the issue where a listdir or import won't work
without a reset when it was run before the file was copied.
drrk pushed a commit to drrk/micropython that referenced this issue Jan 22, 2017
retryfail pushed a commit to retryfail/micropython that referenced this issue Aug 20, 2020
extmod/vfs_lfsx.c: Setting the full path in import_stat()
WeActStudio pushed a commit to WeActStudio/micropython that referenced this issue Feb 14, 2021
neuschaefer added a commit to neuschaefer/micropython that referenced this issue Apr 27, 2023
Although the original motivation given for the workaround[1] is correct, nlr.o
and nlrthumb.o are linked with a small enough distance that the problem does
not occur, and the workaround isn't necessary. The distance between the b
instruction and its target (nlr_push_tail) is just 64 bytes[2], well within the
±2046 byte range addressable by an unconditional branch instruction in Thumb mode.

The workaround induces a relocation in the text section (textrel), which
isn't supported everywhere, notably not on musl-libc, where it causes a
crash on start-up. With the workaround removed, micropython works on an ARMv5T
Linux built with musl-libc.


[1]: commit dd376a2

Author: Damien George <damien.p.george@gmail.com>
Date:   Fri Sep 1 15:25:29 2017 +1000

    py/nlrthumb: Get working again on standard Thumb arch (ie not Thumb2).

    "b" on Thumb might not be long enough for the jump to nlr_push_tail so it
    must be done indirectly.

[2]: Excerpt from objdump -d micropython:

000095c4 <nlr_push_tail>:
    95c4:       b510            push    {r4, lr}
    95c6:       0004            movs    r4, r0
    95c8:       f02d fd42       bl      37050 <mp_thread_get_state>
    95cc:       6943            ldr     r3, [r0, micropython#20]
    95ce:       6023            str     r3, [r4, #0]
    95d0:       6144            str     r4, [r0, micropython#20]
    95d2:       2000            movs    r0, #0
    95d4:       bd10            pop     {r4, pc}

000095d6 <nlr_pop>:
    95d6:       b510            push    {r4, lr}
    95d8:       f02d fd3a       bl      37050 <mp_thread_get_state>
    95dc:       6943            ldr     r3, [r0, micropython#20]
    95de:       681b            ldr     r3, [r3, #0]
    95e0:       6143            str     r3, [r0, micropython#20]
    95e2:       bd10            pop     {r4, pc}

000095e4 <nlr_push>:
    95e4:       60c4            str     r4, [r0, micropython#12]
    95e6:       6105            str     r5, [r0, micropython#16]
    95e8:       6146            str     r6, [r0, micropython#20]
    95ea:       6187            str     r7, [r0, micropython#24]
    95ec:       4641            mov     r1, r8
    95ee:       61c1            str     r1, [r0, micropython#28]
    95f0:       4649            mov     r1, r9
    95f2:       6201            str     r1, [r0, micropython#32]
    95f4:       4651            mov     r1, sl
    95f6:       6241            str     r1, [r0, micropython#36]   @ 0x24
    95f8:       4659            mov     r1, fp
    95fa:       6281            str     r1, [r0, micropython#40]   @ 0x28
    95fc:       4669            mov     r1, sp
    95fe:       62c1            str     r1, [r0, micropython#44]   @ 0x2c
    9600:       4671            mov     r1, lr
    9602:       6081            str     r1, [r0, micropython#8]
    9604:       e7de            b.n     95c4 <nlr_push_tail>

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
neuschaefer added a commit to neuschaefer/micropython that referenced this issue Apr 27, 2023
Although the original motivation given for the workaround[1] is correct, nlr.o
and nlrthumb.o are linked with a small enough distance that the problem does
not occur, and the workaround isn't necessary. The distance between the b
instruction and its target (nlr_push_tail) is just 64 bytes[2], well within the
±2046 byte range addressable by an unconditional branch instruction in Thumb mode.

The workaround induces a relocation in the text section (textrel), which
isn't supported everywhere, notably not on musl-libc, where it causes a
crash on start-up. With the workaround removed, micropython works on an ARMv5T
Linux system built with musl-libc.


[1]: commit dd376a2

Author: Damien George <damien.p.george@gmail.com>
Date:   Fri Sep 1 15:25:29 2017 +1000

    py/nlrthumb: Get working again on standard Thumb arch (ie not Thumb2).

    "b" on Thumb might not be long enough for the jump to nlr_push_tail so it
    must be done indirectly.

[2]: Excerpt from objdump -d micropython:

000095c4 <nlr_push_tail>:
    95c4:       b510            push    {r4, lr}
    95c6:       0004            movs    r4, r0
    95c8:       f02d fd42       bl      37050 <mp_thread_get_state>
    95cc:       6943            ldr     r3, [r0, micropython#20]
    95ce:       6023            str     r3, [r4, #0]
    95d0:       6144            str     r4, [r0, micropython#20]
    95d2:       2000            movs    r0, #0
    95d4:       bd10            pop     {r4, pc}

000095d6 <nlr_pop>:
    95d6:       b510            push    {r4, lr}
    95d8:       f02d fd3a       bl      37050 <mp_thread_get_state>
    95dc:       6943            ldr     r3, [r0, micropython#20]
    95de:       681b            ldr     r3, [r3, #0]
    95e0:       6143            str     r3, [r0, micropython#20]
    95e2:       bd10            pop     {r4, pc}

000095e4 <nlr_push>:
    95e4:       60c4            str     r4, [r0, micropython#12]
    95e6:       6105            str     r5, [r0, micropython#16]
    95e8:       6146            str     r6, [r0, micropython#20]
    95ea:       6187            str     r7, [r0, micropython#24]
    95ec:       4641            mov     r1, r8
    95ee:       61c1            str     r1, [r0, micropython#28]
    95f0:       4649            mov     r1, r9
    95f2:       6201            str     r1, [r0, micropython#32]
    95f4:       4651            mov     r1, sl
    95f6:       6241            str     r1, [r0, micropython#36]   @ 0x24
    95f8:       4659            mov     r1, fp
    95fa:       6281            str     r1, [r0, micropython#40]   @ 0x28
    95fc:       4669            mov     r1, sp
    95fe:       62c1            str     r1, [r0, micropython#44]   @ 0x2c
    9600:       4671            mov     r1, lr
    9602:       6081            str     r1, [r0, micropython#8]
    9604:       e7de            b.n     95c4 <nlr_push_tail>

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
neuschaefer added a commit to neuschaefer/micropython that referenced this issue Apr 27, 2023
Although the original motivation given for the workaround[1] is correct,
nlr.o and nlrthumb.o are linked with a small enough distance that the
problem does not occur, and the workaround isn't necessary. The distance
between the b instruction and its target (nlr_push_tail) is just 64
bytes[2], well within the ±2046 byte range addressable by an
unconditional branch instruction in Thumb mode.

The workaround induces a relocation in the text section (textrel), which
isn't supported everywhere, notably not on musl-libc, where it causes a
crash on start-up. With the workaround removed, micropython works on an
ARMv5T Linux system built with musl-libc.


[1]: commit dd376a2

Author: Damien George <damien.p.george@gmail.com>
Date:   Fri Sep 1 15:25:29 2017 +1000

    py/nlrthumb: Get working again on standard Thumb arch (ie not Thumb2).

    "b" on Thumb might not be long enough for the jump to nlr_push_tail so
    it must be done indirectly.

[2]: Excerpt from objdump -d micropython:

000095c4 <nlr_push_tail>:
    95c4:       b510            push    {r4, lr}
    95c6:       0004            movs    r4, r0
    95c8:       f02d fd42       bl      37050 <mp_thread_get_state>
    95cc:       6943            ldr     r3, [r0, micropython#20]
    95ce:       6023            str     r3, [r4, #0]
    95d0:       6144            str     r4, [r0, micropython#20]
    95d2:       2000            movs    r0, #0
    95d4:       bd10            pop     {r4, pc}

000095d6 <nlr_pop>:
    95d6:       b510            push    {r4, lr}
    95d8:       f02d fd3a       bl      37050 <mp_thread_get_state>
    95dc:       6943            ldr     r3, [r0, micropython#20]
    95de:       681b            ldr     r3, [r3, #0]
    95e0:       6143            str     r3, [r0, micropython#20]
    95e2:       bd10            pop     {r4, pc}

000095e4 <nlr_push>:
    95e4:       60c4            str     r4, [r0, micropython#12]
    95e6:       6105            str     r5, [r0, micropython#16]
    95e8:       6146            str     r6, [r0, micropython#20]
    95ea:       6187            str     r7, [r0, micropython#24]
    95ec:       4641            mov     r1, r8
    95ee:       61c1            str     r1, [r0, micropython#28]
    95f0:       4649            mov     r1, r9
    95f2:       6201            str     r1, [r0, micropython#32]
    95f4:       4651            mov     r1, sl
    95f6:       6241            str     r1, [r0, micropython#36]   @ 0x24
    95f8:       4659            mov     r1, fp
    95fa:       6281            str     r1, [r0, micropython#40]   @ 0x28
    95fc:       4669            mov     r1, sp
    95fe:       62c1            str     r1, [r0, micropython#44]   @ 0x2c
    9600:       4671            mov     r1, lr
    9602:       6081            str     r1, [r0, micropython#8]
    9604:       e7de            b.n     95c4 <nlr_push_tail>

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
neuschaefer added a commit to neuschaefer/micropython that referenced this issue Apr 29, 2023
Although the original motivation given for the workaround[1] is correct,
nlr.o and nlrthumb.o are linked with a small enough distance that the
problem does not occur, and the workaround isn't necessary. The distance
between the b instruction and its target (nlr_push_tail) is just 64
bytes[2], well within the ±2046 byte range addressable by an
unconditional branch instruction in Thumb mode.

The workaround induces a relocation in the text section (textrel), which
isn't supported everywhere, notably not on musl-libc[3], where it causes
a crash on start-up. With the workaround removed, micropython works on an
ARMv5T Linux system built with musl-libc.


[1]: commit dd376a2

Author: Damien George <damien.p.george@gmail.com>
Date:   Fri Sep 1 15:25:29 2017 +1000

    py/nlrthumb: Get working again on standard Thumb arch (ie not Thumb2).

    "b" on Thumb might not be long enough for the jump to nlr_push_tail so
    it must be done indirectly.

[2]: Excerpt from objdump -d micropython:

000095c4 <nlr_push_tail>:
    95c4:       b510            push    {r4, lr}
    95c6:       0004            movs    r4, r0
    95c8:       f02d fd42       bl      37050 <mp_thread_get_state>
    95cc:       6943            ldr     r3, [r0, micropython#20]
    95ce:       6023            str     r3, [r4, #0]
    95d0:       6144            str     r4, [r0, micropython#20]
    95d2:       2000            movs    r0, #0
    95d4:       bd10            pop     {r4, pc}

000095d6 <nlr_pop>:
    95d6:       b510            push    {r4, lr}
    95d8:       f02d fd3a       bl      37050 <mp_thread_get_state>
    95dc:       6943            ldr     r3, [r0, micropython#20]
    95de:       681b            ldr     r3, [r3, #0]
    95e0:       6143            str     r3, [r0, micropython#20]
    95e2:       bd10            pop     {r4, pc}

000095e4 <nlr_push>:
    95e4:       60c4            str     r4, [r0, micropython#12]
    95e6:       6105            str     r5, [r0, micropython#16]
    95e8:       6146            str     r6, [r0, micropython#20]
    95ea:       6187            str     r7, [r0, micropython#24]
    95ec:       4641            mov     r1, r8
    95ee:       61c1            str     r1, [r0, micropython#28]
    95f0:       4649            mov     r1, r9
    95f2:       6201            str     r1, [r0, micropython#32]
    95f4:       4651            mov     r1, sl
    95f6:       6241            str     r1, [r0, micropython#36]   @ 0x24
    95f8:       4659            mov     r1, fp
    95fa:       6281            str     r1, [r0, micropython#40]   @ 0x28
    95fc:       4669            mov     r1, sp
    95fe:       62c1            str     r1, [r0, micropython#44]   @ 0x2c
    9600:       4671            mov     r1, lr
    9602:       6081            str     r1, [r0, micropython#8]
    9604:       e7de            b.n     95c4 <nlr_push_tail>

[3]: https://www.openwall.com/lists/musl/2020/09/25/4

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
neuschaefer added a commit to neuschaefer/micropython that referenced this issue Jun 18, 2023
Although the original motivation given for the workaround[1] is correct,
nlr.o and nlrthumb.o are linked with a small enough distance that the
problem does not occur, and the workaround isn't necessary. The distance
between the b instruction and its target (nlr_push_tail) is just 64
bytes[2], well within the ±2046 byte range addressable by an
unconditional branch instruction in Thumb mode.

The workaround induces a relocation in the text section (textrel), which
isn't supported everywhere, notably not on musl-libc[3], where it causes
a crash on start-up. With the workaround removed, micropython works on an
ARMv5T Linux system built with musl-libc.

This commit changes nlrthumb.c to use a direct jump by default, but
leaves the long jump workaround as an option for those cases where it's
actually needed.


[1]: commit dd376a2

Author: Damien George <damien.p.george@gmail.com>
Date:   Fri Sep 1 15:25:29 2017 +1000

    py/nlrthumb: Get working again on standard Thumb arch (ie not Thumb2).

    "b" on Thumb might not be long enough for the jump to nlr_push_tail so
    it must be done indirectly.

[2]: Excerpt from objdump -d micropython:

000095c4 <nlr_push_tail>:
    95c4:       b510            push    {r4, lr}
    95c6:       0004            movs    r4, r0
    95c8:       f02d fd42       bl      37050 <mp_thread_get_state>
    95cc:       6943            ldr     r3, [r0, micropython#20]
    95ce:       6023            str     r3, [r4, #0]
    95d0:       6144            str     r4, [r0, micropython#20]
    95d2:       2000            movs    r0, #0
    95d4:       bd10            pop     {r4, pc}

000095d6 <nlr_pop>:
    95d6:       b510            push    {r4, lr}
    95d8:       f02d fd3a       bl      37050 <mp_thread_get_state>
    95dc:       6943            ldr     r3, [r0, micropython#20]
    95de:       681b            ldr     r3, [r3, #0]
    95e0:       6143            str     r3, [r0, micropython#20]
    95e2:       bd10            pop     {r4, pc}

000095e4 <nlr_push>:
    95e4:       60c4            str     r4, [r0, micropython#12]
    95e6:       6105            str     r5, [r0, micropython#16]
    95e8:       6146            str     r6, [r0, micropython#20]
    95ea:       6187            str     r7, [r0, micropython#24]
    95ec:       4641            mov     r1, r8
    95ee:       61c1            str     r1, [r0, micropython#28]
    95f0:       4649            mov     r1, r9
    95f2:       6201            str     r1, [r0, micropython#32]
    95f4:       4651            mov     r1, sl
    95f6:       6241            str     r1, [r0, micropython#36]   @ 0x24
    95f8:       4659            mov     r1, fp
    95fa:       6281            str     r1, [r0, micropython#40]   @ 0x28
    95fc:       4669            mov     r1, sp
    95fe:       62c1            str     r1, [r0, micropython#44]   @ 0x2c
    9600:       4671            mov     r1, lr
    9602:       6081            str     r1, [r0, micropython#8]
    9604:       e7de            b.n     95c4 <nlr_push_tail>

[3]: https://www.openwall.com/lists/musl/2020/09/25/4

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
neuschaefer added a commit to neuschaefer/micropython that referenced this issue Aug 14, 2023
Although the original motivation given for the workaround[1] is correct,
nlr.o and nlrthumb.o are linked with a small enough distance that the
problem does not occur, and the workaround isn't necessary. The distance
between the b instruction and its target (nlr_push_tail) is just 64
bytes[2], well within the ±2046 byte range addressable by an
unconditional branch instruction in Thumb mode.

The workaround induces a relocation in the text section (textrel), which
isn't supported everywhere, notably not on musl-libc[3], where it causes
a crash on start-up. With the workaround removed, micropython works on an
ARMv5T Linux system built with musl-libc.

This commit changes nlrthumb.c to use a direct jump by default, but
leaves the long jump workaround as an option for those cases where it's
actually needed.


[1]: commit dd376a2

Author: Damien George <damien.p.george@gmail.com>
Date:   Fri Sep 1 15:25:29 2017 +1000

    py/nlrthumb: Get working again on standard Thumb arch (ie not Thumb2).

    "b" on Thumb might not be long enough for the jump to nlr_push_tail so
    it must be done indirectly.

[2]: Excerpt from objdump -d micropython:

000095c4 <nlr_push_tail>:
    95c4:       b510            push    {r4, lr}
    95c6:       0004            movs    r4, r0
    95c8:       f02d fd42       bl      37050 <mp_thread_get_state>
    95cc:       6943            ldr     r3, [r0, micropython#20]
    95ce:       6023            str     r3, [r4, #0]
    95d0:       6144            str     r4, [r0, micropython#20]
    95d2:       2000            movs    r0, #0
    95d4:       bd10            pop     {r4, pc}

000095d6 <nlr_pop>:
    95d6:       b510            push    {r4, lr}
    95d8:       f02d fd3a       bl      37050 <mp_thread_get_state>
    95dc:       6943            ldr     r3, [r0, micropython#20]
    95de:       681b            ldr     r3, [r3, #0]
    95e0:       6143            str     r3, [r0, micropython#20]
    95e2:       bd10            pop     {r4, pc}

000095e4 <nlr_push>:
    95e4:       60c4            str     r4, [r0, micropython#12]
    95e6:       6105            str     r5, [r0, micropython#16]
    95e8:       6146            str     r6, [r0, micropython#20]
    95ea:       6187            str     r7, [r0, micropython#24]
    95ec:       4641            mov     r1, r8
    95ee:       61c1            str     r1, [r0, micropython#28]
    95f0:       4649            mov     r1, r9
    95f2:       6201            str     r1, [r0, micropython#32]
    95f4:       4651            mov     r1, sl
    95f6:       6241            str     r1, [r0, micropython#36]   @ 0x24
    95f8:       4659            mov     r1, fp
    95fa:       6281            str     r1, [r0, micropython#40]   @ 0x28
    95fc:       4669            mov     r1, sp
    95fe:       62c1            str     r1, [r0, micropython#44]   @ 0x2c
    9600:       4671            mov     r1, lr
    9602:       6081            str     r1, [r0, micropython#8]
    9604:       e7de            b.n     95c4 <nlr_push_tail>

[3]: https://www.openwall.com/lists/musl/2020/09/25/4

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
neuschaefer added a commit to neuschaefer/micropython that referenced this issue Apr 19, 2024
Although the original motivation given for the workaround[1] is correct,
nlr.o and nlrthumb.o are linked with a small enough distance that the
problem does not occur, and the workaround isn't necessary. The distance
between the b instruction and its target (nlr_push_tail) is just 64
bytes[2], well within the ±2046 byte range addressable by an
unconditional branch instruction in Thumb mode.

The workaround induces a relocation in the text section (textrel), which
isn't supported everywhere, notably not on musl-libc[3], where it causes
a crash on start-up. With the workaround removed, micropython works on an
ARMv5T Linux system built with musl-libc.

This commit changes nlrthumb.c to use a direct jump by default, but
leaves the long jump workaround as an option for those cases where it's
actually needed.


[1]: commit dd376a2

Author: Damien George <damien.p.george@gmail.com>
Date:   Fri Sep 1 15:25:29 2017 +1000

    py/nlrthumb: Get working again on standard Thumb arch (ie not Thumb2).

    "b" on Thumb might not be long enough for the jump to nlr_push_tail so
    it must be done indirectly.

[2]: Excerpt from objdump -d micropython:

000095c4 <nlr_push_tail>:
    95c4:       b510            push    {r4, lr}
    95c6:       0004            movs    r4, r0
    95c8:       f02d fd42       bl      37050 <mp_thread_get_state>
    95cc:       6943            ldr     r3, [r0, micropython#20]
    95ce:       6023            str     r3, [r4, #0]
    95d0:       6144            str     r4, [r0, micropython#20]
    95d2:       2000            movs    r0, #0
    95d4:       bd10            pop     {r4, pc}

000095d6 <nlr_pop>:
    95d6:       b510            push    {r4, lr}
    95d8:       f02d fd3a       bl      37050 <mp_thread_get_state>
    95dc:       6943            ldr     r3, [r0, micropython#20]
    95de:       681b            ldr     r3, [r3, #0]
    95e0:       6143            str     r3, [r0, micropython#20]
    95e2:       bd10            pop     {r4, pc}

000095e4 <nlr_push>:
    95e4:       60c4            str     r4, [r0, micropython#12]
    95e6:       6105            str     r5, [r0, micropython#16]
    95e8:       6146            str     r6, [r0, micropython#20]
    95ea:       6187            str     r7, [r0, micropython#24]
    95ec:       4641            mov     r1, r8
    95ee:       61c1            str     r1, [r0, micropython#28]
    95f0:       4649            mov     r1, r9
    95f2:       6201            str     r1, [r0, micropython#32]
    95f4:       4651            mov     r1, sl
    95f6:       6241            str     r1, [r0, micropython#36]   @ 0x24
    95f8:       4659            mov     r1, fp
    95fa:       6281            str     r1, [r0, micropython#40]   @ 0x28
    95fc:       4669            mov     r1, sp
    95fe:       62c1            str     r1, [r0, micropython#44]   @ 0x2c
    9600:       4671            mov     r1, lr
    9602:       6081            str     r1, [r0, micropython#8]
    9604:       e7de            b.n     95c4 <nlr_push_tail>

[3]: https://www.openwall.com/lists/musl/2020/09/25/4

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
neuschaefer added a commit to neuschaefer/micropython that referenced this issue Apr 22, 2024
Although the original motivation given for the workaround[1] is correct,
nlr.o and nlrthumb.o are linked with a small enough distance that the
problem does not occur, and the workaround isn't necessary. The distance
between the b instruction and its target (nlr_push_tail) is just 64
bytes[2], well within the ±2046 byte range addressable by an
unconditional branch instruction in Thumb mode.

The workaround induces a relocation in the text section (textrel), which
isn't supported everywhere, notably not on musl-libc[3], where it causes
a crash on start-up. With the workaround removed, micropython works on an
ARMv5T Linux system built with musl-libc.

This commit changes nlrthumb.c to use a direct jump by default, but
leaves the long jump workaround as an option for those cases where it's
actually needed.


[1]: commit dd376a2

Author: Damien George <damien.p.george@gmail.com>
Date:   Fri Sep 1 15:25:29 2017 +1000

    py/nlrthumb: Get working again on standard Thumb arch (ie not Thumb2).

    "b" on Thumb might not be long enough for the jump to nlr_push_tail so
    it must be done indirectly.

[2]: Excerpt from objdump -d micropython:

000095c4 <nlr_push_tail>:
    95c4:       b510            push    {r4, lr}
    95c6:       0004            movs    r4, r0
    95c8:       f02d fd42       bl      37050 <mp_thread_get_state>
    95cc:       6943            ldr     r3, [r0, micropython#20]
    95ce:       6023            str     r3, [r4, #0]
    95d0:       6144            str     r4, [r0, micropython#20]
    95d2:       2000            movs    r0, #0
    95d4:       bd10            pop     {r4, pc}

000095d6 <nlr_pop>:
    95d6:       b510            push    {r4, lr}
    95d8:       f02d fd3a       bl      37050 <mp_thread_get_state>
    95dc:       6943            ldr     r3, [r0, micropython#20]
    95de:       681b            ldr     r3, [r3, #0]
    95e0:       6143            str     r3, [r0, micropython#20]
    95e2:       bd10            pop     {r4, pc}

000095e4 <nlr_push>:
    95e4:       60c4            str     r4, [r0, micropython#12]
    95e6:       6105            str     r5, [r0, micropython#16]
    95e8:       6146            str     r6, [r0, micropython#20]
    95ea:       6187            str     r7, [r0, micropython#24]
    95ec:       4641            mov     r1, r8
    95ee:       61c1            str     r1, [r0, micropython#28]
    95f0:       4649            mov     r1, r9
    95f2:       6201            str     r1, [r0, micropython#32]
    95f4:       4651            mov     r1, sl
    95f6:       6241            str     r1, [r0, micropython#36]   @ 0x24
    95f8:       4659            mov     r1, fp
    95fa:       6281            str     r1, [r0, micropython#40]   @ 0x28
    95fc:       4669            mov     r1, sp
    95fe:       62c1            str     r1, [r0, micropython#44]   @ 0x2c
    9600:       4671            mov     r1, lr
    9602:       6081            str     r1, [r0, micropython#8]
    9604:       e7de            b.n     95c4 <nlr_push_tail>

[3]: https://www.openwall.com/lists/musl/2020/09/25/4

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
dpgeorge pushed a commit to neuschaefer/micropython that referenced this issue Apr 25, 2024
Although the original motivation given for the workaround[1] is correct,
nlr.o and nlrthumb.o are linked with a small enough distance that the
problem does not occur, and the workaround isn't necessary. The distance
between the b instruction and its target (nlr_push_tail) is just 64
bytes[2], well within the ±2046 byte range addressable by an
unconditional branch instruction in Thumb mode.

The workaround induces a relocation in the text section (textrel), which
isn't supported everywhere, notably not on musl-libc[3], where it causes
a crash on start-up. With the workaround removed, micropython works on an
ARMv5T Linux system built with musl-libc.

This commit changes nlrthumb.c to use a direct jump by default, but
leaves the long jump workaround as an option for those cases where it's
actually needed.

[1]: commit dd376a2

Author: Damien George <damien.p.george@gmail.com>
Date:   Fri Sep 1 15:25:29 2017 +1000

    py/nlrthumb: Get working again on standard Thumb arch (ie not Thumb2).

    "b" on Thumb might not be long enough for the jump to nlr_push_tail so
    it must be done indirectly.

[2]: Excerpt from objdump -d micropython:

000095c4 <nlr_push_tail>:
    95c4:       b510            push    {r4, lr}
    95c6:       0004            movs    r4, r0
    95c8:       f02d fd42       bl      37050 <mp_thread_get_state>
    95cc:       6943            ldr     r3, [r0, micropython#20]
    95ce:       6023            str     r3, [r4, #0]
    95d0:       6144            str     r4, [r0, micropython#20]
    95d2:       2000            movs    r0, #0
    95d4:       bd10            pop     {r4, pc}

000095d6 <nlr_pop>:
    95d6:       b510            push    {r4, lr}
    95d8:       f02d fd3a       bl      37050 <mp_thread_get_state>
    95dc:       6943            ldr     r3, [r0, micropython#20]
    95de:       681b            ldr     r3, [r3, #0]
    95e0:       6143            str     r3, [r0, micropython#20]
    95e2:       bd10            pop     {r4, pc}

000095e4 <nlr_push>:
    95e4:       60c4            str     r4, [r0, micropython#12]
    95e6:       6105            str     r5, [r0, micropython#16]
    95e8:       6146            str     r6, [r0, micropython#20]
    95ea:       6187            str     r7, [r0, micropython#24]
    95ec:       4641            mov     r1, r8
    95ee:       61c1            str     r1, [r0, micropython#28]
    95f0:       4649            mov     r1, r9
    95f2:       6201            str     r1, [r0, micropython#32]
    95f4:       4651            mov     r1, sl
    95f6:       6241            str     r1, [r0, micropython#36]   @ 0x24
    95f8:       4659            mov     r1, fp
    95fa:       6281            str     r1, [r0, micropython#40]   @ 0x28
    95fc:       4669            mov     r1, sp
    95fe:       62c1            str     r1, [r0, micropython#44]   @ 0x2c
    9600:       4671            mov     r1, lr
    9602:       6081            str     r1, [r0, micropython#8]
    9604:       e7de            b.n     95c4 <nlr_push_tail>

[3]: https://www.openwall.com/lists/musl/2020/09/25/4

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
graeme-winter pushed a commit to winter-special-projects/micropython that referenced this issue Sep 21, 2024
Although the original motivation given for the workaround[1] is correct,
nlr.o and nlrthumb.o are linked with a small enough distance that the
problem does not occur, and the workaround isn't necessary. The distance
between the b instruction and its target (nlr_push_tail) is just 64
bytes[2], well within the ±2046 byte range addressable by an
unconditional branch instruction in Thumb mode.

The workaround induces a relocation in the text section (textrel), which
isn't supported everywhere, notably not on musl-libc[3], where it causes
a crash on start-up. With the workaround removed, micropython works on an
ARMv5T Linux system built with musl-libc.

This commit changes nlrthumb.c to use a direct jump by default, but
leaves the long jump workaround as an option for those cases where it's
actually needed.

[1]: commit dd376a2

Author: Damien George <damien.p.george@gmail.com>
Date:   Fri Sep 1 15:25:29 2017 +1000

    py/nlrthumb: Get working again on standard Thumb arch (ie not Thumb2).

    "b" on Thumb might not be long enough for the jump to nlr_push_tail so
    it must be done indirectly.

[2]: Excerpt from objdump -d micropython:

000095c4 <nlr_push_tail>:
    95c4:       b510            push    {r4, lr}
    95c6:       0004            movs    r4, r0
    95c8:       f02d fd42       bl      37050 <mp_thread_get_state>
    95cc:       6943            ldr     r3, [r0, micropython#20]
    95ce:       6023            str     r3, [r4, #0]
    95d0:       6144            str     r4, [r0, micropython#20]
    95d2:       2000            movs    r0, #0
    95d4:       bd10            pop     {r4, pc}

000095d6 <nlr_pop>:
    95d6:       b510            push    {r4, lr}
    95d8:       f02d fd3a       bl      37050 <mp_thread_get_state>
    95dc:       6943            ldr     r3, [r0, micropython#20]
    95de:       681b            ldr     r3, [r3, #0]
    95e0:       6143            str     r3, [r0, micropython#20]
    95e2:       bd10            pop     {r4, pc}

000095e4 <nlr_push>:
    95e4:       60c4            str     r4, [r0, micropython#12]
    95e6:       6105            str     r5, [r0, micropython#16]
    95e8:       6146            str     r6, [r0, micropython#20]
    95ea:       6187            str     r7, [r0, micropython#24]
    95ec:       4641            mov     r1, r8
    95ee:       61c1            str     r1, [r0, micropython#28]
    95f0:       4649            mov     r1, r9
    95f2:       6201            str     r1, [r0, micropython#32]
    95f4:       4651            mov     r1, sl
    95f6:       6241            str     r1, [r0, micropython#36]   @ 0x24
    95f8:       4659            mov     r1, fp
    95fa:       6281            str     r1, [r0, micropython#40]   @ 0x28
    95fc:       4669            mov     r1, sp
    95fe:       62c1            str     r1, [r0, micropython#44]   @ 0x2c
    9600:       4671            mov     r1, lr
    9602:       6081            str     r1, [r0, micropython#8]
    9604:       e7de            b.n     95c4 <nlr_push_tail>

[3]: https://www.openwall.com/lists/musl/2020/09/25/4

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

17 participants