Arnd Bergmann
unread,Nov 7, 2019, 5:00:39 AM11/7/19Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Andrey Ryabinin, Alexander Potapenko, Sergey Senozhatsky, Vegard Nossum, Dmitry Vyukov, Linux Memory Management List, Al Viro, Andrew Morton, Andy Lutomirski, Ard Biesheuvel, Christoph Hellwig, Dmitry Torokhov, Eric Dumazet, Eric Van Hensbergen, Greg Kroah-Hartman, Harry Wentland, Herbert Xu, Ingo Molnar, Jens Axboe, Martin K . Petersen, Martin Schwidefsky, Michael S. Tsirkin, Michal Simek, Petr Mladek, Sergey Senozhatsky, Steven Rostedt, Takashi Iwai, Theodore Ts'o, Thomas Gleixner, Wolfram Sang, Vasily Gorbik, Ilya Leoshkevich, Mark Rutland, Matthew Wilcox, Randy Dunlap, Andrey Konovalov, Marco Elver, Nick Desaulniers, clang-built-linux
On Thu, Nov 7, 2019 at 10:46 AM Andrey Ryabinin <
arya...@virtuozzo.com> wrote:
> On 11/7/19 12:22 PM, Alexander Potapenko wrote:
> > On Thu, Nov 7, 2019 at 10:04 AM Arnd Bergmann <
ar...@arndb.de> wrote:
> >> On Thu, Nov 7, 2019 at 7:08 AM Sergey Senozhatsky
> >> <
sergey.seno...@gmail.com> wrote:
> >> The normal way to do a volatile access would be
> >> READ_ONCE()/WRITE_ONCE(), but that seems stronger than
> >> the barrier() here. I'd just stick to adding a barrier.
> > I actually like the READ_ONCE idea more, as READ_ONCE is really a
> > documented way to prevent the compiler from merging reads, which is
> > what we want here.
>
> I would rather go with -fno-builtin-bcmp or maybe even -fno-builtin if that works.
The commit message for 5f074f3e192f ("lib/string.c: implement a basic bcmp")
mentions that -fno-builtin-bcmp did not work for LTO when the global bcmp()
help was added. I don't know whether the same applies here, but my guess is
that it's the same issue.
Arnd