READ_ONCE() + STACKPROTECTOR_STRONG == :/ (was Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.5-2 tag (topic/kasan-bitops))
Linus Torvalds
torvalds at linux-foundation.org
Wed Dec 18 05:32:35 AEDT 2019
On Tue, Dec 17, 2019 at 10:04 AM Linus Torvalds
<torvalds at linux-foundation.org> wrote:
>
> Let me think about it.
How about we just get rid of the union entirely, and just use
'unsigned long' or 'unsigned long long' depending on the size.
Something like the attached patch - it still requires that it be an
arithmetic type, but now because of the final cast.
But it might still be a cast to a volatile type, of course. Then the
result will be volatile, but at least now READ_ONCE() won't be taking
the address of a volatile variable on the stack - does that at least
fix some of the horrible code generation. Hmm?
This is untested, because I obviously still have the cases of
structures (page table entries) being accessed once..
Linus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-patch
Size: 2149 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20191217/3db12932/attachment-0001.bin>
More information about the Linuxppc-dev
mailing list