[patch V2 1/6] ARM: uaccess: Implement missing __get_user_asm_dword()

Thomas Gleixner tglx at linutronix.de
Wed Sep 17 11:44:12 PDT 2025


On Wed, Sep 17 2025 at 16:17, Russell King wrote:
> On Wed, Sep 17, 2025 at 03:55:10PM +0200, Thomas Gleixner wrote:
>> But it actually can be solved solvable by switching the casting to:
>> 
>>     (x) = *(__force __typeof__(*(ptr)) *) &__gu_val;
>> 
>> Not pretty, but after upping the frame size limit it builds an
>> allmodconfig kernel.
>
> For me, this produces:
>
> get-user-test.c:41:16: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
>    41 |         (x) = *(__force __typeof__(*(ptr)) *) &__gu_val;                \
>       |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> with arm-linux-gnueabihf-gcc (Debian 14.2.0-19) 14.2.0
>
> Maybe you're using a different compiler that doesn't issue that
> warning?

Yes :)

Was this with the one-line change or with the full conversion?

Thanks,

        tglx



More information about the linux-arm-kernel mailing list