1. 18 Dec, 2018 5 commits
    • Arnd Bergmann's avatar
      sh: sh03: rtc: push down rtc class ops into driver · 09e81263
      Arnd Bergmann authored
      The SH RTC support has an extra level of indirection to provide
      either the old read_persistent_clock/update_persistent_clock
      interface or the rtc-generic device for hctosys/systohc.
      
      By removing the indirection and always using the RTC_CLASS interface,
      we can avoid the lossy double conversion between rtc_time and timespec,
      so we end up supporting the entire range of 'year' values, and clarifying
      the rtc_set_time callback.
      
      I did not change the behavior of sh03_rtc_settimeofday(), which keeps
      just updating the seconds/minutes by calling set_rtc_mmss(), this
      could be improved if anyone cares. Also, the file should ideally be
      moved into drivers/rtc and not use rtc-generic.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      09e81263
    • Arnd Bergmann's avatar
      sh: dreamcast: rtc: push down rtc class ops into driver · b0495e4b
      Arnd Bergmann authored
      The SH RTC support has an extra level of indirection to provide
      either the old read_persistent_clock/update_persistent_clock
      interface or the rtc-generic device for hctosys/systohc.
      
      Both do the same thing for dreamcast, so we can do away with the
      abstraction and simply let the RTC core code to take care of it.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      b0495e4b
    • Arnd Bergmann's avatar
      y2038: signal: Add compat_sys_rt_sigtimedwait_time64 · 2367c4b5
      Arnd Bergmann authored
      Now that 32-bit architectures have two variants of sys_rt_sigtimedwaid()
      for 32-bit and 64-bit time_t, we also need to have a second compat system
      call entry point on the corresponding 64-bit architectures.
      
      The traditional system call keeps getting handled
      by compat_sys_rt_sigtimedwait(), and this adds a new
      compat_sys_rt_sigtimedwait_time64() that differs only in the timeout
      argument type.
      
      The naming remains a bit asymmetric for the moment. Ideally we would
      want to have compat_sys_rt_sigtimedwait_time32() for the old version
      and compat_sys_rt_sigtimedwait() for the new one to mirror the names
      of the native entry points, but renaming the existing system call
      tables causes unnecessary churn. I would suggest renaming all such
      system calls together at a later point.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      2367c4b5
    • Arnd Bergmann's avatar
      y2038: signal: Add sys_rt_sigtimedwait_time32 · df8522a3
      Arnd Bergmann authored
      Once sys_rt_sigtimedwait() gets changed to a 64-bit time_t, we have
      to provide compatibility support for existing binaries.
      
      An earlier version of this patch reused the compat_sys_rt_sigtimedwait
      entry point to avoid code duplication, but this newer approach
      duplicates the existing native entry point instead, which seems
      a bit cleaner.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      df8522a3
    • Arnd Bergmann's avatar
      y2038: socket: Add compat_sys_recvmmsg_time64 · e11d4284
      Arnd Bergmann authored
      recvmmsg() takes two arguments to pointers of structures that differ
      between 32-bit and 64-bit architectures: mmsghdr and timespec.
      
      For y2038 compatbility, we are changing the native system call from
      timespec to __kernel_timespec with a 64-bit time_t (in another patch),
      and use the existing compat system call on both 32-bit and 64-bit
      architectures for compatibility with traditional 32-bit user space.
      
      As we now have two variants of recvmmsg() for 32-bit tasks that are both
      different from the variant that we use on 64-bit tasks, this means we
      also require two compat system calls!
      
      The solution I picked is to flip things around: The existing
      compat_sys_recvmmsg() call gets moved from net/compat.c into net/socket.c
      and now handles the case for old user space on all architectures that
      have set CONFIG_COMPAT_32BIT_TIME.  A new compat_sys_recvmmsg_time64()
      call gets added in the old place for 64-bit architectures only, this
      one handles the case of a compat mmsghdr structure combined with
      __kernel_timespec.
      
      In the indirect sys_socketcall(), we now need to call either
      do_sys_recvmmsg() or __compat_sys_recvmmsg(), depending on what kind of
      architecture we are on. For compat_sys_socketcall(), no such change is
      needed, we always call __compat_sys_recvmmsg().
      
      I decided to not add a new SYS_RECVMMSG_TIME64 socketcall: Any libc
      implementation for 64-bit time_t will need significant changes including
      an updated asm/unistd.h, and it seems better to consistently use the
      separate syscalls that configuration, leaving the socketcall only for
      backward compatibility with 32-bit time_t based libc.
      
      The naming is asymmetric for the moment, so both existing syscalls
      entry points keep their names, while the new ones are recvmmsg_time32
      and compat_recvmmsg_time64 respectively. I expect that we will rename
      the compat syscalls later as we start using generated syscall tables
      everywhere and add these entry points.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      e11d4284
  2. 07 Dec, 2018 2 commits
    • Arnd Bergmann's avatar
      y2038: futex: Add support for __kernel_timespec · bec2f7cb
      Arnd Bergmann authored
      This prepares sys_futex for y2038 safe calling: the native
      syscall is changed to receive a __kernel_timespec argument, which
      will be switched to 64-bit time_t in the future. All the internal
      time handling gets changed to timespec64, and the compat_sys_futex
      entry point is moved under the CONFIG_COMPAT_32BIT_TIME check
      to provide compatibility for existing 32-bit architectures.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      bec2f7cb
    • Arnd Bergmann's avatar
      y2038: futex: Move compat implementation into futex.c · 04e7712f
      Arnd Bergmann authored
      We are going to share the compat_sys_futex() handler between 64-bit
      architectures and 32-bit architectures that need to deal with both 32-bit
      and 64-bit time_t, and this is easier if both entry points are in the
      same file.
      
      In fact, most other system call handlers do the same thing these days, so
      let's follow the trend here and merge all of futex_compat.c into futex.c.
      
      In the process, a few minor changes have to be done to make sure everything
      still makes sense: handle_futex_death() and futex_cmpxchg_enabled() become
      local symbol, and the compat version of the fetch_robust_entry() function
      gets renamed to compat_fetch_robust_entry() to avoid a symbol clash.
      
      This is intended as a purely cosmetic patch, no behavior should
      change.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      04e7712f
  3. 06 Dec, 2018 5 commits
    • Deepa Dinamani's avatar
      io_pgetevents: use __kernel_timespec · 7a35397f
      Deepa Dinamani authored
      struct timespec is not y2038 safe.
      struct __kernel_timespec is the new y2038 safe structure for all
      syscalls that are using struct timespec.
      Update io_pgetevents interfaces to use struct __kernel_timespec.
      
      sigset_t also has different representations on 32 bit and 64 bit
      architectures. Hence, we need to support the following different
      syscalls:
      
      New y2038 safe syscalls:
      (Controlled by CONFIG_64BIT_TIME for 32 bit ABIs)
      
      Native 64 bit(unchanged) and native 32 bit : sys_io_pgetevents
      Compat : compat_sys_io_pgetevents_time64
      
      Older y2038 unsafe syscalls:
      (Controlled by CONFIG_32BIT_COMPAT_TIME for 32 bit ABIs)
      
      Native 32 bit : sys_io_pgetevents_time32
      Compat : compat_sys_io_pgetevents
      
      Note that io_getevents syscalls do not have a y2038 safe solution.
      Signed-off-by: default avatarDeepa Dinamani <deepa.kernel@gmail.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      7a35397f
    • Deepa Dinamani's avatar
      pselect6: use __kernel_timespec · e024707b
      Deepa Dinamani authored
      struct timespec is not y2038 safe.
      struct __kernel_timespec is the new y2038 safe structure for all
      syscalls that are using struct timespec.
      Update pselect interfaces to use struct __kernel_timespec.
      
      sigset_t also has different representations on 32 bit and 64 bit
      architectures. Hence, we need to support the following different
      syscalls:
      
      New y2038 safe syscalls:
      (Controlled by CONFIG_64BIT_TIME for 32 bit ABIs)
      
      Native 64 bit(unchanged) and native 32 bit : sys_pselect6
      Compat : compat_sys_pselect6_time64
      
      Older y2038 unsafe syscalls:
      (Controlled by CONFIG_32BIT_COMPAT_TIME for 32 bit ABIs)
      
      Native 32 bit : pselect6_time32
      Compat : compat_sys_pselect6
      
      Note that all other versions of select syscalls will not have
      y2038 safe versions.
      Signed-off-by: default avatarDeepa Dinamani <deepa.kernel@gmail.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      e024707b
    • Deepa Dinamani's avatar
      ppoll: use __kernel_timespec · 8bd27a30
      Deepa Dinamani authored
      struct timespec is not y2038 safe.
      struct __kernel_timespec is the new y2038 safe structure for all
      syscalls that are using struct timespec.
      Update ppoll interfaces to use struct __kernel_timespec.
      
      sigset_t also has different representations on 32 bit and 64 bit
      architectures. Hence, we need to support the following different
      syscalls:
      
      New y2038 safe syscalls:
      (Controlled by CONFIG_64BIT_TIME for 32 bit ABIs)
      
      Native 64 bit(unchanged) and native 32 bit : sys_ppoll
      Compat : compat_sys_ppoll_time64
      
      Older y2038 unsafe syscalls:
      (Controlled by CONFIG_32BIT_COMPAT_TIME for 32 bit ABIs)
      
      Native 32 bit : ppoll_time32
      Compat : compat_sys_ppoll
      Signed-off-by: default avatarDeepa Dinamani <deepa.kernel@gmail.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      8bd27a30
    • Deepa Dinamani's avatar
      signal: Add restore_user_sigmask() · 854a6ed5
      Deepa Dinamani authored
      Refactor the logic to restore the sigmask before the syscall
      returns into an api.
      This is useful for versions of syscalls that pass in the
      sigmask and expect the current->sigmask to be changed during
      the execution and restored after the execution of the syscall.
      
      With the advent of new y2038 syscalls in the subsequent patches,
      we add two more new versions of the syscalls (for pselect, ppoll
      and io_pgetevents) in addition to the existing native and compat
      versions. Adding such an api reduces the logic that would need to
      be replicated otherwise.
      Signed-off-by: default avatarDeepa Dinamani <deepa.kernel@gmail.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      854a6ed5
    • Deepa Dinamani's avatar
      signal: Add set_user_sigmask() · ded653cc
      Deepa Dinamani authored
      Refactor reading sigset from userspace and updating sigmask
      into an api.
      
      This is useful for versions of syscalls that pass in the
      sigmask and expect the current->sigmask to be changed during,
      and restored after, the execution of the syscall.
      
      With the advent of new y2038 syscalls in the subsequent patches,
      we add two more new versions of the syscalls (for pselect, ppoll,
      and io_pgetevents) in addition to the existing native and compat
      versions. Adding such an api reduces the logic that would need to
      be replicated otherwise.
      
      Note that the calls to sigprocmask() ignored the return value
      from the api as the function only returns an error on an invalid
      first argument that is hardcoded at these call sites.
      The updated logic uses set_current_blocked() instead.
      Signed-off-by: default avatarDeepa Dinamani <deepa.kernel@gmail.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      ded653cc
  4. 04 Nov, 2018 9 commits
    • Linus Torvalds's avatar
      Linux 4.20-rc1 · 65102238
      Linus Torvalds authored
      65102238
    • Linus Torvalds's avatar
      Merge tag 'tags/upstream-4.20-rc1' of git://git.infradead.org/linux-ubifs · 42bd06e9
      Linus Torvalds authored
      Pull UBIFS updates from Richard Weinberger:
      
       - Full filesystem authentication feature, UBIFS is now able to have the
         whole filesystem structure authenticated plus user data encrypted and
         authenticated.
      
       - Minor cleanups
      
      * tag 'tags/upstream-4.20-rc1' of git://git.infradead.org/linux-ubifs: (26 commits)
        ubifs: Remove unneeded semicolon
        Documentation: ubifs: Add authentication whitepaper
        ubifs: Enable authentication support
        ubifs: Do not update inode size in-place in authenticated mode
        ubifs: Add hashes and HMACs to default filesystem
        ubifs: authentication: Authenticate super block node
        ubifs: Create hash for default LPT
        ubfis: authentication: Authenticate master node
        ubifs: authentication: Authenticate LPT
        ubifs: Authenticate replayed journal
        ubifs: Add auth nodes to garbage collector journal head
        ubifs: Add authentication nodes to journal
        ubifs: authentication: Add hashes to index nodes
        ubifs: Add hashes to the tree node cache
        ubifs: Create functions to embed a HMAC in a node
        ubifs: Add helper functions for authentication support
        ubifs: Add separate functions to init/crc a node
        ubifs: Format changes for authentication support
        ubifs: Store read superblock node
        ubifs: Drop write_node
        ...
      42bd06e9
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-4.20-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 4710e789
      Linus Torvalds authored
      Pull NFS client bugfixes from Trond Myklebust:
       "Highlights include:
      
        Bugfix:
         - Fix build issues on architectures that don't provide 64-bit cmpxchg
      
        Cleanups:
         - Fix a spelling mistake"
      
      * tag 'nfs-for-4.20-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFS: fix spelling mistake, EACCESS -> EACCES
        SUNRPC: Use atomic(64)_t for seq_send(64)
      4710e789
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 35e74524
      Linus Torvalds authored
      Pull more timer updates from Thomas Gleixner:
       "A set of commits for the new C-SKY architecture timers"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        dt-bindings: timer: gx6605s SOC timer
        clocksource/drivers/c-sky: Add gx6605s SOC system timer
        dt-bindings: timer: C-SKY Multi-processor timer
        clocksource/drivers/c-sky: Add C-SKY SMP timer
      35e74524
    • Linus Torvalds's avatar
      Merge tag 'ntb-4.20' of git://github.com/jonmason/ntb · 04578e84
      Linus Torvalds authored
      Pull NTB updates from Jon Mason:
       "Fairly minor changes and bug fixes:
      
        NTB IDT thermal changes and hook into hwmon, ntb_netdev clean-up of
        private struct, and a few bug fixes"
      
      * tag 'ntb-4.20' of git://github.com/jonmason/ntb:
        ntb: idt: Alter the driver info comments
        ntb: idt: Discard temperature sensor IRQ handler
        ntb: idt: Add basic hwmon sysfs interface
        ntb: idt: Alter temperature read method
        ntb_netdev: Simplify remove with client device drvdata
        NTB: transport: Try harder to alloc an aligned MW buffer
        ntb: ntb_transport: Mark expected switch fall-throughs
        ntb: idt: Set PCIe bus address to BARLIMITx
        NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks
        ntb: intel: fix return value for ndev_vec_mask()
        ntb_netdev: fix sleep time mismatch
      04578e84
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 71e56028
      Linus Torvalds authored
      Pull scheduler fixes from Ingo Molnar:
       "A memory (under-)allocation fix and a comment fix"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/topology: Fix off by one bug
        sched/rt: Update comment in pick_next_task_rt()
      71e56028
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 601a8807
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "A number of fixes and some late updates:
      
         - make in_compat_syscall() behavior on x86-32 similar to other
           platforms, this touches a number of generic files but is not
           intended to impact non-x86 platforms.
      
         - objtool fixes
      
         - PAT preemption fix
      
         - paravirt fixes/cleanups
      
         - cpufeatures updates for new instructions
      
         - earlyprintk quirk
      
         - make microcode version in sysfs world-readable (it is already
           world-readable in procfs)
      
         - minor cleanups and fixes"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        compat: Cleanup in_compat_syscall() callers
        x86/compat: Adjust in_compat_syscall() to generic code under !COMPAT
        objtool: Support GCC 9 cold subfunction naming scheme
        x86/numa_emulation: Fix uniform-split numa emulation
        x86/paravirt: Remove unused _paravirt_ident_32
        x86/mm/pat: Disable preemption around __flush_tlb_all()
        x86/paravirt: Remove GPL from pv_ops export
        x86/traps: Use format string with panic() call
        x86: Clean up 'sizeof x' => 'sizeof(x)'
        x86/cpufeatures: Enumerate MOVDIR64B instruction
        x86/cpufeatures: Enumerate MOVDIRI instruction
        x86/earlyprintk: Add a force option for pciserial device
        objtool: Support per-function rodata sections
        x86/microcode: Make revision and processor flags world-readable
      601a8807
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 01897f3e
      Linus Torvalds authored
      Pull perf updates and fixes from Ingo Molnar:
       "These are almost all tooling updates: 'perf top', 'perf trace' and
        'perf script' fixes and updates, an UAPI header sync with the merge
        window versions, license marker updates, much improved Sparc support
        from David Miller, and a number of fixes"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (66 commits)
        perf intel-pt/bts: Calculate cpumode for synthesized samples
        perf intel-pt: Insert callchain context into synthesized callchains
        perf tools: Don't clone maps from parent when synthesizing forks
        perf top: Start display thread earlier
        tools headers uapi: Update linux/if_link.h header copy
        tools headers uapi: Update linux/netlink.h header copy
        tools headers: Sync the various kvm.h header copies
        tools include uapi: Update linux/mmap.h copy
        perf trace beauty: Use the mmap flags table generated from headers
        perf beauty: Wire up the mmap flags table generator to the Makefile
        perf beauty: Add a generator for MAP_ mmap's flag constants
        tools include uapi: Update asound.h copy
        tools arch uapi: Update asm-generic/unistd.h and arm64 unistd.h copies
        tools include uapi: Update linux/fs.h copy
        perf callchain: Honour the ordering of PERF_CONTEXT_{USER,KERNEL,etc}
        perf cs-etm: Correct CPU mode for samples
        perf unwind: Take pgoff into account when reporting elf to libdwfl
        perf top: Do not use overwrite mode by default
        perf top: Allow disabling the overwrite mode
        perf trace: Beautify mount's first pathname arg
        ...
      01897f3e
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e9ebc215
      Linus Torvalds authored
      Pull irq fixes from Ingo Molnar:
       "An irqchip driver fix and a memory (over-)allocation fix"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/irq-mvebu-sei: Fix a NULL vs IS_ERR() bug in probe function
        irq/matrix: Fix memory overallocation
      e9ebc215
  5. 03 Nov, 2018 19 commits