1. 02 Jun, 2022 2 commits
  2. 20 May, 2022 1 commit
  3. 13 May, 2022 7 commits
    • Arnd Bergmann's avatar
      Merge branch 'asm-generic-headers-cleanup' into asm-generic · 678e9c3a
      Arnd Bergmann authored
      A series from Masahiro Yamada to clean up the uapi headers, making
      sure they can actually be included from user space without additional
      dependencies on either kernel headers or specific libc versions.
      
      * asm-generic-headers-cleanup:
        sparc: add asm/stat.h to UAPI compile-test coverage
        powerpc: add asm/stat.h to UAPI compile-test coverage
        mips: add asm/stat.h to UAPI compile-test coverage
        riscv: add linux/bpf_perf_event.h to UAPI compile-test coverage
        kbuild: prevent exported headers from including <stdlib.h>, <stdbool.h>
        agpgart.h: do not include <stdlib.h> from exported header
      678e9c3a
    • Masahiro Yamada's avatar
      sparc: add asm/stat.h to UAPI compile-test coverage · 31a088b6
      Masahiro Yamada authored
      asm/stat.h is currently excluded from the UAPI compile-test for
      ARCH=sparc because of the errors like follows:
      
        In file included from <command-line>:
        ./usr/include/asm/stat.h:11:2: error: unknown type name 'ino_t'
           11 |  ino_t   st_ino;
              |  ^~~~~
          HDRTEST usr/include/asm/param.h
        ./usr/include/asm/stat.h:12:2: error: unknown type name 'mode_t'
           12 |  mode_t  st_mode;
              |  ^~~~~~
        ./usr/include/asm/stat.h:14:2: error: unknown type name 'uid_t'
           14 |  uid_t   st_uid;
              |  ^~~~~
        ./usr/include/asm/stat.h:15:2: error: unknown type name 'gid_t'
           15 |  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>
      31a088b6
    • 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
  4. 11 May, 2022 8 commits
  5. 04 Apr, 2022 1 commit
    • Arnd Bergmann's avatar
      Merge branch 'remove-h8300' of git://git.infradead.org/users/hch/misc into asm-generic · fba2689e
      Arnd Bergmann authored
      * 'remove-h8300' of git://git.infradead.org/users/hch/misc:
        remove the h8300 architecture
      
      This is clearly the least actively maintained architecture we have at
      the moment, and probably the least useful. It is now the only one that
      does not support MMUs at all, and most of the boards only support 4MB
      of RAM, out of which the defconfig kernel needs more than half just
      for .text/.data.
      
      Guenter Roeck did the original patch to remove the architecture in 2013
      after it had already been obsolete for a while, and Yoshinori Sato brought
      it back in a much more modern form in 2015. Looking at the git history
      since the reinstantiation, it's clear that almost all commits in the tree
      are build fixes or cross-architecture cleanups:
      
      $ git log --no-merges --format=%an v4.5.. arch/h8300/  | sort | uniq
      -c | sort -rn | head -n 12
           25 Masahiro Yamada
           18 Christoph Hellwig
           14 Mike Rapoport
            9 Arnd Bergmann
            8 Mark Rutland
            7 Peter Zijlstra
            6 Kees Cook
            6 Ingo Molnar
            6 Al Viro
            5 Randy Dunlap
            4 Yury Norov
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      fba2689e
  6. 03 Apr, 2022 8 commits
  7. 02 Apr, 2022 13 commits