Re: [PATCH v3] Document that the 'access' and 'nonnull' attributes are independent

2022-04-05 Thread David Malcolm via Gcc
On Fri, 2022-03-25 at 14:38 -0600, Martin Sebor wrote: > On 3/25/22 12:45, David Malcolm wrote: > > On Wed, 2022-03-23 at 17:52 +0100, Sebastian Huber wrote: > > > On 23/03/2022 17:31, Martin Sebor via Gcc-patches wrote: > > > > > > > > The concern is that the constraints implied by atttributes >

Re: GCC 12 miscompilation of volatile asm (was: Re: [PATCH] arm64/io: Remind compiler that there is a memory side effect)

2022-04-05 Thread Peter Zijlstra
On Tue, Apr 05, 2022 at 01:51:30PM +0100, Mark Rutland wrote: > Hi all, > > [adding kernel folk who work on asm stuff] > > As a heads-up, GCC 12 (not yet released) appears to erroneously optimize away > calls to functions with volatile asm. Szabolcs has raised an issue on the GCC > bugzilla: >

[CVE] zlib (< 1.2.12) memory corruption

2022-04-05 Thread Luis Machado via Gcc
Hi, There is a CVE [1] for zlib < 1.2.12 (released march 27th). GCC currently uses zlib 1.2.11, and binutils-gdb imports the zlib directory from GCC. The recommendation is to get it updated to 1.2.12, which contains the proper fix [2]. It might not affect gcc/binutils/gdb since the code does

Re: GCC 12 miscompilation of volatile asm (was: Re: [PATCH] arm64/io: Remind compiler that there is a memory side effect)

2022-04-05 Thread Andrew Cooper via Gcc
On 05/04/2022 14:04, Mark Rutland wrote: > On Tue, Apr 05, 2022 at 01:51:30PM +0100, Mark Rutland wrote: > My x86_64 test case is: > > Per compiler explorer (https://godbolt.org/z/cveff9hq5) GCC trunk currently > compiles this as: > > | msr_rmw_set_bits: > | mov rcx, rdi > | rdm

Re: GCC 12 miscompilation of volatile asm (was: Re: [PATCH] arm64/io: Remind compiler that there is a memory side effect)

2022-04-05 Thread Mark Rutland via Gcc
Sorry, I copied the wrong version of the x86_64 assembly as generated by GCC 11.2.0). Updated below. On Tue, Apr 05, 2022 at 01:51:30PM +0100, Mark Rutland wrote: > My x86_64 test case is: > > | unsigned long rdmsr(unsigned long reg) > | { > | unsigned int lo, hi; > | > | asm volatile( >

GCC 12 miscompilation of volatile asm (was: Re: [PATCH] arm64/io: Remind compiler that there is a memory side effect)

2022-04-05 Thread Mark Rutland via Gcc
Hi all, [adding kernel folk who work on asm stuff] As a heads-up, GCC 12 (not yet released) appears to erroneously optimize away calls to functions with volatile asm. Szabolcs has raised an issue on the GCC bugzilla: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105160 ... which is a P1 rele