1. 13 May, 2022 5 commits
    • Masahiro Yamada's avatar
      powerpc: add asm/stat.h to UAPI compile-test coverage · c01013a2
      Masahiro Yamada authored
      asm/stat.h is currently excluded from the UAPI compile-test for
      ARCH=powerpc because of the errors like follows:
      
          HDRTEST usr/include/asm/stat.h
        In file included from <command-line>:32:
        ./usr/include/asm/stat.h:32:2: error: unknown type name 'ino_t'
           32 |  ino_t  st_ino;
              |  ^~~~~
        ./usr/include/asm/stat.h:35:2: error: unknown type name 'mode_t'
           35 |  mode_t  st_mode;
              |  ^~~~~~
        ./usr/include/asm/stat.h:40:2: error: unknown type name 'uid_t'
           40 |  uid_t  st_uid;
              |  ^~~~~
        ./usr/include/asm/stat.h:41:2: error: unknown type name 'gid_t'
           41 |  gid_t  st_gid;
              |  ^~~~~
      
      The errors can be fixed by prefixing the types with __kernel_.
      
      Then, remove the no-header-test entry from user/include/Makefile.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      c01013a2
    • Masahiro Yamada's avatar
      mips: add asm/stat.h to UAPI compile-test coverage · 8c1a381a
      Masahiro Yamada authored
      asm/stat.h is currently excluded from the UAPI compile-test for
      ARCH=mips because of the errors like follows:
      
          HDRTEST usr/include/asm/stat.h
        In file included from <command-line>:32:
        ./usr/include/asm/stat.h:22:2: error: unknown type name 'ino_t'
           22 |  ino_t  st_ino;
              |  ^~~~~
        ./usr/include/asm/stat.h:23:2: error: unknown type name 'mode_t'
           23 |  mode_t  st_mode;
              |  ^~~~~~
        ./usr/include/asm/stat.h:25:2: error: unknown type name 'uid_t'
           25 |  uid_t  st_uid;
              |  ^~~~~
        ./usr/include/asm/stat.h:26:2: error: unknown type name 'gid_t'
           26 |  gid_t  st_gid;
              |  ^~~~~
        ./usr/include/asm/stat.h:58:2: error: unknown type name 'mode_t'
           58 |  mode_t  st_mode;
              |  ^~~~~~
        ./usr/include/asm/stat.h:61:2: error: unknown type name 'uid_t'
           61 |  uid_t  st_uid;
              |  ^~~~~
        ./usr/include/asm/stat.h:62:2: error: unknown type name 'gid_t'
           62 |  gid_t  st_gid;
              |  ^~~~~
      
      The errors can be fixed by prefixing the types with __kernel_.
      
      Then, remove the no-header-test entry from user/include/Makefile.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      8c1a381a
    • Masahiro Yamada's avatar
      riscv: add linux/bpf_perf_event.h to UAPI compile-test coverage · 5c41778e
      Masahiro Yamada authored
      I can compile this for ARCH=riscv with CONFIG_UAPI_HEADER_TEST=y.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      5c41778e
    • Masahiro Yamada's avatar
      kbuild: prevent exported headers from including <stdlib.h>, <stdbool.h> · 02a6e4be
      Masahiro Yamada authored
      Some UAPI headers included <stdlib.h>, like this:
      
        #ifndef __KERNEL__
        #include <stdlib.h>
        #endif
      
      As it turned out, they just included it for no good reason.
      
      After some fixes, now I can compile-test UAPI headers
      (CONFIG_UAPI_HEADER_TEST=y) without including <stdlib.h> from the
      system header search paths.
      
      To avoid somebody getting it back again, this commit adds the dummy
      header, usr/dummy-include/stdlib.h
      
      I added $(srctree)/usr/dummy-include to the header search paths.
      Because it is searched before the system directories, if someone
      tries to include <stdlib.h>, they will see the error message.
      
      While I am here, I also replaced $(objtree)/usr/include with $(obj),
      but it has no functional change.
      
      If we can make kernel headers self-contained (that is, none of exported
      kernel headers includes system headers), we will be able to add the
      -nostdinc flag, but that is much far from where we stand now.
      
      As a realistic solution, we can ban header inclusion individually by
      putting a dummy header into usr/dummy-include/.
      
      Currently, no header include <stdbool.h>. I put it as well before somebody
      attempts to use it.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      02a6e4be
    • Masahiro Yamada's avatar
      agpgart.h: do not include <stdlib.h> from exported header · 783eb354
      Masahiro Yamada authored
      Commit 35d0f1d5 ("include/uapi/linux/agpgart.h: include stdlib.h in
      userspace") included <stdlib.h> to fix the unknown size_t error, but
      I do not think it is the right fix.
      
      This header already uses __kernel_size_t a few lines below.
      
      Replace the remaining size_t, and stop including <stdlib.h>.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      783eb354
  2. 03 Apr, 2022 8 commits
  3. 02 Apr, 2022 27 commits