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]
Date:   Tue, 7 Dec 2021 18:07:11 +0100
From:   Arnd Bergmann <arnd@...nel.org>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Arnd Bergmann <arnd@...db.de>,
        Al Viro <viro@...iv.linux.org.uk>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Guenter Roeck <groeck@...omium.org>,
        Kees Cook <keescook@...omium.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        kernel test robot <lkp@...el.com>,
        Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Will Deacon <will@...nel.org>,
        Waiman Long <longman@...hat.com>,
        Boqun Feng <boqun.feng@...il.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Tejun Heo <tj@...nel.org>, kernelci@...ups.io,
        Linux FS-devel Mailing List <linux-fsdevel@...r.kernel.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        llvm@...ts.linux.dev
Subject: Re: [RFC 2/3] headers: introduce linux/struct_types.h

On Tue, Dec 7, 2021 at 4:32 PM Matthew Wilcox <willy@...radead.org> wrote:

> >  #define __SWAITQUEUE_INITIALIZER(name) {                             \
> >       .task           = current,                                      \
> >       .task_list      = LIST_HEAD_INIT((name).task_list),             \
>
> swait.h doesn't need to include <linux/struct_types.h> ?

I should probably add it for consistency, also in some other places.
At the moment it works without that because the new header is pulled
in through linux/spinlock.h.

> > -
> >  #define XARRAY_INIT(name, flags) {                           \
> >       .xa_lock = __SPIN_LOCK_UNLOCKED(name.xa_lock),          \
> >       .xa_flags = flags,                                      \
>
> I think this is going to break:
>
> (cd tools/testing/radix-tree; make)

I've tried addressing this now, but I first ran into a different problem
that exists in linux-next but not in mainline as of today:

cc -I. -I../../include -g -Og -Wall -D_LGPL_SOURCE -fsanitize=address
-fsanitize=undefined   -c -o main.o main.c
In file included from ./linux/xarray.h:2,
                 from ./linux/../../../../include/linux/radix-tree.h:21,
                 from ./linux/radix-tree.h:5,
                 from main.c:10:
./linux/../../../../include/linux/xarray.h: In function ‘xas_find_chunk’:
./linux/../../../../include/linux/xarray.h:1669:9: warning: implicit
declaration of function ‘find_next_bit’
[-Wimplicit-function-declaration]
 1669 |  return find_next_bit(addr, XA_CHUNK_SIZE, offset);
      |         ^~~~~~~~~~~~~
cc -I. -I../../include -g -Og -Wall -D_LGPL_SOURCE -fsanitize=address
-fsanitize=undefined   -c -o xarray.o xarray.c
In file included from ./linux/xarray.h:2,
                 from ./linux/../../../../include/linux/radix-tree.h:21,
                 from ./linux/radix-tree.h:5,
                 from test.h:4,
                 from xarray.c:8:
./linux/../../../../include/linux/xarray.h: In function ‘xas_find_chunk’:
./linux/../../../../include/linux/xarray.h:1669:9: warning: implicit
declaration of function ‘find_next_bit’
[-Wimplicit-function-declaration]
 1669 |  return find_next_bit(addr, XA_CHUNK_SIZE, offset);
      |         ^~~~~~~~~~~~~
In file included from ../../include/linux/bitmap.h:7,
                 from ../../../lib/xarray.c:9,
                 from xarray.c:16:
../../include/linux/find.h: At top level:
../../include/linux/find.h:31:15: error: conflicting types for ‘find_next_bit’
   31 | unsigned long find_next_bit(const unsigned long *addr,
unsigned long size,
      |               ^~~~~~~~~~~~~
In file included from ./linux/xarray.h:2,
                 from ./linux/../../../../include/linux/radix-tree.h:21,
                 from ./linux/radix-tree.h:5,
                 from test.h:4,
                 from xarray.c:8:
./linux/../../../../include/linux/xarray.h:1669:9: note: previous
implicit declaration of ‘find_next_bit’ was here
 1669 |  return find_next_bit(addr, XA_CHUNK_SIZE, offset);
      |         ^~~~~~~~~~~~~
make: *** [<builtin>: xarray.o] Error 1

It's clearly broken after Yury's recent bitops.h cleanup, but I can't
quite find my way
through the maze of tools/testing headers to fix it.

        Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ