diff mbox series

[V2] musl: Fix dirent struct alignment issue seen on armv5te

Message ID 20180802071149.19272-1-raj.khem@gmail.com
State Superseded
Headers show
Series [V2] musl: Fix dirent struct alignment issue seen on armv5te | expand

Commit Message

Khem Raj Aug. 2, 2018, 7:11 a.m. UTC
fix internal linux headers

Full logs
https://git.musl-libc.org/cgit/musl/log/?qt=range&q=9cad27a3dc1a4eb349b6591e4dc8cc89dce32277..f2c6dbe2442027ed8fe0fa869918e41f495534d8

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 meta/recipes-core/musl/musl_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.18.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Andre McCurdy Aug. 2, 2018, 7:47 a.m. UTC | #1
On Thu, Aug 2, 2018 at 12:11 AM, Khem Raj <raj.khem@gmail.com> wrote:
> fix internal linux headers

>

> Full logs

> https://git.musl-libc.org/cgit/musl/log/?qt=range&q=9cad27a3dc1a4eb349b6591e4dc8cc89dce32277..f2c6dbe2442027ed8fe0fa869918e41f495534d8


From the musl commit which fixed the dirent struct alignment issues it
doesn't look like it was armv5te specific, so mentioning armv5te in
the commit message could be misleading.

  https://git.musl-libc.org/cgit/musl/commit/?id=b3fa0f2b1b8c267c1cbe8c62464e484f3a174a4e

> Signed-off-by: Khem Raj <raj.khem@gmail.com>

> ---

>  meta/recipes-core/musl/musl_git.bb | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb

> index b56870cb3f..e7d0e1a66b 100644

> --- a/meta/recipes-core/musl/musl_git.bb

> +++ b/meta/recipes-core/musl/musl_git.bb

> @@ -3,7 +3,7 @@

>

>  require musl.inc

>

> -SRCREV = "9cad27a3dc1a4eb349b6591e4dc8cc89dce32277"

> +SRCREV = "f2c6dbe2442027ed8fe0fa869918e41f495534d8"

>

>  PV = "1.1.19+git${SRCPV}"

>

> --

> 2.18.0

>

> --

> _______________________________________________

> Openembedded-core mailing list

> Openembedded-core@lists.openembedded.org

> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj Aug. 2, 2018, 9:10 a.m. UTC | #2
On Thu, Aug 2, 2018 at 12:47 AM Andre McCurdy <armccurdy@gmail.com> wrote:
>

> On Thu, Aug 2, 2018 at 12:11 AM, Khem Raj <raj.khem@gmail.com> wrote:

> > fix internal linux headers

> >

> > Full logs

> > https://git.musl-libc.org/cgit/musl/log/?qt=range&q=9cad27a3dc1a4eb349b6591e4dc8cc89dce32277..f2c6dbe2442027ed8fe0fa869918e41f495534d8

>

> From the musl commit which fixed the dirent struct alignment issues it

> doesn't look like it was armv5te specific, so mentioning armv5te in

> the commit message could be misleading.

>

>   https://git.musl-libc.org/cgit/musl/commit/?id=b3fa0f2b1b8c267c1cbe8c62464e484f3a174a4e

>


commit is in contextual to OE on a particular arch where it was
observed, other arches either have
ways to compensate for misaligned access in hardware or compiler does
not use 8byte alignment
 thats why subject says 'seen'

> > Signed-off-by: Khem Raj <raj.khem@gmail.com>

> > ---

> >  meta/recipes-core/musl/musl_git.bb | 2 +-

> >  1 file changed, 1 insertion(+), 1 deletion(-)

> >

> > diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb

> > index b56870cb3f..e7d0e1a66b 100644

> > --- a/meta/recipes-core/musl/musl_git.bb

> > +++ b/meta/recipes-core/musl/musl_git.bb

> > @@ -3,7 +3,7 @@

> >

> >  require musl.inc

> >

> > -SRCREV = "9cad27a3dc1a4eb349b6591e4dc8cc89dce32277"

> > +SRCREV = "f2c6dbe2442027ed8fe0fa869918e41f495534d8"

> >

> >  PV = "1.1.19+git${SRCPV}"

> >

> > --

> > 2.18.0

> >

> > --

> > _______________________________________________

> > Openembedded-core mailing list

> > Openembedded-core@lists.openembedded.org

> > http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Andre McCurdy Aug. 2, 2018, 9:49 a.m. UTC | #3
On Thu, Aug 2, 2018 at 2:10 AM, Khem Raj <raj.khem@gmail.com> wrote:
> On Thu, Aug 2, 2018 at 12:47 AM Andre McCurdy <armccurdy@gmail.com> wrote:

>>

>> On Thu, Aug 2, 2018 at 12:11 AM, Khem Raj <raj.khem@gmail.com> wrote:

>> > fix internal linux headers

>> >

>> > Full logs

>> > https://git.musl-libc.org/cgit/musl/log/?qt=range&q=9cad27a3dc1a4eb349b6591e4dc8cc89dce32277..f2c6dbe2442027ed8fe0fa869918e41f495534d8

>>

>> From the musl commit which fixed the dirent struct alignment issues it

>> doesn't look like it was armv5te specific, so mentioning armv5te in

>> the commit message could be misleading.

>>

>>   https://git.musl-libc.org/cgit/musl/commit/?id=b3fa0f2b1b8c267c1cbe8c62464e484f3a174a4e

>>

>

> commit is in contextual to OE on a particular arch where it was

> observed, other arches either have

> ways to compensate for misaligned access in hardware or compiler does

> not use 8byte alignment

>  thats why subject says 'seen'


Great explanation. That's the kind of information which should go in
the commit message.

>> > Signed-off-by: Khem Raj <raj.khem@gmail.com>

>> > ---

>> >  meta/recipes-core/musl/musl_git.bb | 2 +-

>> >  1 file changed, 1 insertion(+), 1 deletion(-)

>> >

>> > diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb

>> > index b56870cb3f..e7d0e1a66b 100644

>> > --- a/meta/recipes-core/musl/musl_git.bb

>> > +++ b/meta/recipes-core/musl/musl_git.bb

>> > @@ -3,7 +3,7 @@

>> >

>> >  require musl.inc

>> >

>> > -SRCREV = "9cad27a3dc1a4eb349b6591e4dc8cc89dce32277"

>> > +SRCREV = "f2c6dbe2442027ed8fe0fa869918e41f495534d8"

>> >

>> >  PV = "1.1.19+git${SRCPV}"

>> >

>> > --

>> > 2.18.0

>> >

>> > --

>> > _______________________________________________

>> > Openembedded-core mailing list

>> > Openembedded-core@lists.openembedded.org

>> > http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Andrea Adami Aug. 2, 2018, 12:28 p.m. UTC | #4
On Thu, Aug 2, 2018 at 11:49 AM, Andre McCurdy <armccurdy@gmail.com> wrote:
> On Thu, Aug 2, 2018 at 2:10 AM, Khem Raj <raj.khem@gmail.com> wrote:

>> On Thu, Aug 2, 2018 at 12:47 AM Andre McCurdy <armccurdy@gmail.com> wrote:

>>>

>>> On Thu, Aug 2, 2018 at 12:11 AM, Khem Raj <raj.khem@gmail.com> wrote:

>>> > fix internal linux headers

>>> >

>>> > Full logs

>>> > https://git.musl-libc.org/cgit/musl/log/?qt=range&q=9cad27a3dc1a4eb349b6591e4dc8cc89dce32277..f2c6dbe2442027ed8fe0fa869918e41f495534d8

>>>

>>> From the musl commit which fixed the dirent struct alignment issues it

>>> doesn't look like it was armv5te specific, so mentioning armv5te in

>>> the commit message could be misleading.

>>>

>>>   https://git.musl-libc.org/cgit/musl/commit/?id=b3fa0f2b1b8c267c1cbe8c62464e484f3a174a4e

>>>

>>

>> commit is in contextual to OE on a particular arch where it was

>> observed, other arches either have

>> ways to compensate for misaligned access in hardware or compiler does

>> not use 8byte alignment

>>  thats why subject says 'seen'

>


Hi,
I have seen scary align traps in dmesg and bisected back to that musl commit.

Short version: never break alignment for structures used for streaming data

Long version: afais only on armv5(t)e , with DSP feature, the code of
readdir.c is miscompiled by gcc when using O2, O3, Os.
What happens is, the arm  ldrd instruction has specific contraints on
armv5(t)e, one of them is the address must be 8 bytes aligned (
doubleword-aligned for doubleword transfers).
Interestingly, other toolchains for armv5 were patched to avoid
ldrd/strd alltogether.

Cheers
Andrea


> Great explanation. That's the kind of information which should go in

> the commit message.

>

>>> > Signed-off-by: Khem Raj <raj.khem@gmail.com>

>>> > ---

>>> >  meta/recipes-core/musl/musl_git.bb | 2 +-

>>> >  1 file changed, 1 insertion(+), 1 deletion(-)

>>> >

>>> > diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb

>>> > index b56870cb3f..e7d0e1a66b 100644

>>> > --- a/meta/recipes-core/musl/musl_git.bb

>>> > +++ b/meta/recipes-core/musl/musl_git.bb

>>> > @@ -3,7 +3,7 @@

>>> >

>>> >  require musl.inc

>>> >

>>> > -SRCREV = "9cad27a3dc1a4eb349b6591e4dc8cc89dce32277"

>>> > +SRCREV = "f2c6dbe2442027ed8fe0fa869918e41f495534d8"

>>> >

>>> >  PV = "1.1.19+git${SRCPV}"

>>> >

>>> > --

>>> > 2.18.0

>>> >

>>> > --

>>> > _______________________________________________

>>> > Openembedded-core mailing list

>>> > Openembedded-core@lists.openembedded.org

>>> > http://lists.openembedded.org/mailman/listinfo/openembedded-core

> --

> _______________________________________________

> Openembedded-core mailing list

> Openembedded-core@lists.openembedded.org

> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb
index b56870cb3f..e7d0e1a66b 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -3,7 +3,7 @@ 
 
 require musl.inc
 
-SRCREV = "9cad27a3dc1a4eb349b6591e4dc8cc89dce32277"
+SRCREV = "f2c6dbe2442027ed8fe0fa869918e41f495534d8"
 
 PV = "1.1.19+git${SRCPV}"