lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+=Sn1njFZ-XZRHJdmjzOyvXvcMXg+oBao=wK8w3RXN_Ji=fLA@mail.gmail.com>
Date:   Mon, 22 Feb 2021 01:29:23 -0800
From:   Andrew Pinski <pinskia@...il.com>
To:     "Michael J. Baars" <mjbaars1977.gcc@...erfiber.eu>
Cc:     GCC Mailing List <gcc@....gnu.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: problems with memory allocation and the alignment check

On Mon, Feb 22, 2021 at 1:17 AM Michael J. Baars
<mjbaars1977.gcc@...erfiber.eu> wrote:
>
> Hi,
>
> I just wrote this little program to demonstrate a possible flaw in both malloc and calloc.
>
> If I allocate a the simplest memory region from main(), one out of three optimization flags fail.
> If I allocate the same region from a function, three out of three optimization flags fail.
>
> Does someone know if this really is a flaw, and if so, is it a gcc or a kernel flaw?

There is no flaw.  GCC (kernel, glibc) all assume unaligned accesses
on x86 will not cause an exception.

Thanks,
Andrew

>
> Regards,
> Mischa.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ