Skip to content
Snippets Groups Projects
  1. Dec 05, 2018
  2. Nov 02, 2018
  3. Oct 31, 2018
  4. Oct 26, 2018
  5. Oct 16, 2018
  6. Oct 11, 2018
  7. Oct 04, 2018
    • Nadav Amit's avatar
      x86/bug: Macrofy the BUG table section handling, to work around GCC inlining bugs · f81f8ad5
      Nadav Amit authored
      
      As described in:
      
        77b0bf55: ("kbuild/Makefile: Prepare for using macros in inline assembly code to work around asm() related GCC inlining bugs")
      
      GCC's inlining heuristics are broken with common asm() patterns used in
      kernel code, resulting in the effective disabling of inlining.
      
      The workaround is to set an assembly macro and call it from the inline
      assembly block. As a result GCC considers the inline assembly block as
      a single instruction. (Which it isn't, but that's the best we can get.)
      
      This patch increases the kernel size:
      
            text     data     bss      dec     hex  filename
        18146889 10225380 2957312 31329581 1de0d2d  ./vmlinux before
        18147336 10226688 2957312 31331336 1de1408  ./vmlinux after (+1755)
      
      But enables more aggressive inlining (and probably better branch decisions).
      
      The number of static text symbols in vmlinux is much lower:
      
       Before: 40218
       After:  40053 (-165)
      
      The assembly code gets harder to read due to the extra macro layer.
      
      [ mingo: Rewrote the changelog. ]
      
      Tested-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarNadav Amit <namit@vmware.com>
      Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/20181003213100.189959-7-namit@vmware.com
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      f81f8ad5
  8. Oct 02, 2018
  9. Sep 27, 2018
  10. Sep 20, 2018
  11. Sep 14, 2018
    • Andrew Murray's avatar
      asm-generic: io: Fix ioport_map() for !CONFIG_GENERIC_IOMAP && CONFIG_INDIRECT_PIO · 500dd232
      Andrew Murray authored
      
      The !CONFIG_GENERIC_IOMAP version of ioport_map uses MMIO_UPPER_LIMIT to
      prevent users from making I/O accesses outside the expected I/O range -
      however it erroneously treats MMIO_UPPER_LIMIT as a mask which is
      contradictory to its other users.
      
      The introduction of CONFIG_INDIRECT_PIO, which subtracts an arbitrary
      amount from IO_SPACE_LIMIT to form MMIO_UPPER_LIMIT, results in ioport_map
      mangling the given port rather than capping it.
      
      We address this by aligning more closely with the CONFIG_GENERIC_IOMAP
      implementation of ioport_map by using the comparison operator and
      returning NULL where the port exceeds MMIO_UPPER_LIMIT. Though note that
      we preserve the existing behavior of masking with IO_SPACE_LIMIT such that
      we don't break existing buggy drivers that somehow rely on this masking.
      
      Fixes: 5745392e ("PCI: Apply the new generic I/O management on PCI IO hosts")
      Reported-by: default avatarWill Deacon <will.deacon@arm.com>
      Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarAndrew Murray <andrew.murray@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      500dd232
  12. Sep 07, 2018
  13. Sep 04, 2018
  14. Aug 29, 2018
    • Arnd Bergmann's avatar
      asm-generic: Remove empty asm/unistd.h · c5ba7e6c
      Arnd Bergmann authored
      
      Nothing is left in asm/unistd.h except for the redirect to
      uapi/asm/unistd.h, so removing the file simply leads to that one being
      used directly.  The linux/export.h inclusion is a leftover from commit
      e1b5bb6d ("consolidate cond_syscall and SYSCALL_ALIAS declarations")
      and should not be used anyway.
      
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      c5ba7e6c
    • Arnd Bergmann's avatar
      asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro · caf6f9c8
      Arnd Bergmann authored
      
      The sys_llseek sytem call is needed on all 32-bit architectures and
      none of the 64-bit ones, so we can remove the __ARCH_WANT_SYS_LLSEEK guard
      and simplify the include/asm-generic/unistd.h header further.
      
      Since 32-bit tasks can run either natively or in compat mode on 64-bit
      architectures, we have to check for both !CONFIG_64BIT and CONFIG_COMPAT.
      
      There are a few 64-bit architectures that also reference sys_llseek
      in their 64-bit ABI (e.g. sparc), but I verified that those all
      select CONFIG_COMPAT, so the #if check is still correct here. It's
      a bit odd to include it in the syscall table though, as it's the
      same as sys_lseek() on 64-bit, but with strange calling conventions.
      
      Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      caf6f9c8
    • Arnd Bergmann's avatar
      asm-generic: Move common compat types to asm-generic/compat.h · fb373975
      Arnd Bergmann authored
      
      While converting compat system call handlers to work on 32-bit
      architectures, I found a number of types used in those handlers
      that are identical between all architectures.
      
      Let's move all the identical ones into asm-generic/compat.h to avoid
      having to add even more identical definitions of those types.
      
      For unknown reasons, mips defines __compat_gid32_t, __compat_uid32_t
      and compat_caddr_t as signed, while all others have them unsigned.
      This seems to be a mistake, but I'm leaving it alone here. The other
      types all differ by size or alignment on at least on architecture.
      
      compat_aio_context_t is currently defined in linux/compat.h but
      also needed for compat_sys_io_getevents(), so let's move it into
      the same place.
      
      While we still have not decided whether the 32-bit time handling
      will always use the compat syscalls, or in which form, I think this
      is a useful cleanup that we can merge regardless.
      
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      fb373975
    • Arnd Bergmann's avatar
      y2038: Remove stat64 family from default syscall set · bf4b6a7d
      Arnd Bergmann authored
      
      New architectures should no longer need stat64, which is not y2038
      safe and has been replaced by statx(). This removes the 'select
      __ARCH_WANT_STAT64' statement from asm-generic/unistd.h and instead
      moves it into the respective asm/unistd.h UAPI header files for each
      architecture that uses it today.
      
      In the generic file, the system call number and entry points are now
      made conditional, so newly added architectures (e.g. riscv32 or csky)
      will never need to carry backwards compatiblity for it.
      
      arm64 is the only 64-bit architecture using the asm-generic/unistd.h
      file, and it already sets __ARCH_WANT_NEW_STAT in its headers, and I
      use the same #ifdef here: future 64-bit architectures therefore won't
      see newstat or stat64 any more. They don't suffer from the y2038 time_t
      overflow, but for consistency it seems best to also let them use statx().
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      bf4b6a7d
  15. Aug 23, 2018
Loading