24 Apr, 2019

1 commit

  • Pull syscall numbering updates from Arnd Bergmann:
    "arch: add pidfd and io_uring syscalls everywhere

    This comes a bit late, but should be in 5.1 anyway: we want the newly
    added system calls to be synchronized across all architectures in the
    release.

    I hope that in the future, any newly added system calls can be added
    to all architectures at the same time, and tested there while they are
    in linux-next, avoiding dependencies between the architecture
    maintainer trees and the tree that contains the new system call"

    * tag 'syscalls-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
    arch: add pidfd and io_uring syscalls everywhere

    Linus Torvalds
     

15 Apr, 2019

1 commit

  • Add the io_uring and pidfd_send_signal system calls to all architectures.

    These system calls are designed to handle both native and compat tasks,
    so all entries are the same across architectures, only arm-compat and
    the generic tale still use an old format.

    Acked-by: Michael Ellerman (powerpc)
    Acked-by: Heiko Carstens (s390)
    Acked-by: Geert Uytterhoeven
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

07 Apr, 2019

3 commits

  • While adding LASI support to QEMU, I noticed that the QEMU detection in
    the kernel happens much too late. For example, when a LASI chip is found
    by the kernel, it registers the LASI LED driver as well. But when we
    run on QEMU it makes sense to avoid spending unnecessary CPU cycles, so
    we need to access the running_on_QEMU flag earlier than before.

    This patch now makes the QEMU detection the fist task of the Linux
    kernel by moving it to where the kernel enters the C-coding.

    Fixes: 310d82784fb4 ("parisc: qemu idle sleep support")
    Signed-off-by: Helge Deller
    Cc: stable@vger.kernel.org # v4.14+

    Helge Deller
     
  • When setting the instruction pointer on PA-RISC we also need
    to set the back of the instruction queue to the new offset, otherwise
    we will execute on instruction from the new location, and jumping
    back to the old location stored in iaoq_b.

    Signed-off-by: Sven Schnelle
    Signed-off-by: Helge Deller
    Fixes: 75ebedf1d263 ("parisc: Add HAVE_REGS_AND_STACK_ACCESS_API feature")
    Cc: stable@vger.kernel.org # 4.19+

    Sven Schnelle
     
  • While working on kretprobes for PA-RISC I was wondering while the
    kprobes sanity test always fails on kretprobes. This is caused by
    returning gpr20 instead of gpr28.

    Signed-off-by: Sven Schnelle
    Signed-off-by: Helge Deller
    Cc: stable@vger.kernel.org # 4.14+

    Sven Schnelle
     

05 Apr, 2019

1 commit

  • At Linux Plumbers, Andy Lutomirski approached me and pointed out that the
    function call syscall_get_arguments() implemented in x86 was horribly
    written and not optimized for the standard case of passing in 0 and 6 for
    the starting index and the number of system calls to get. When looking at
    all the users of this function, I discovered that all instances pass in only
    0 and 6 for these arguments. Instead of having this function handle
    different cases that are never used, simply rewrite it to return the first 6
    arguments of a system call.

    This should help out the performance of tracing system calls by ptrace,
    ftrace and perf.

    Link: http://lkml.kernel.org/r/20161107213233.754809394@goodmis.org

    Cc: Oleg Nesterov
    Cc: Kees Cook
    Cc: Andy Lutomirski
    Cc: Dominik Brodowski
    Cc: Dave Martin
    Cc: "Dmitry V. Levin"
    Cc: x86@kernel.org
    Cc: linux-snps-arc@lists.infradead.org
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-c6x-dev@linux-c6x.org
    Cc: uclinux-h8-devel@lists.sourceforge.jp
    Cc: linux-hexagon@vger.kernel.org
    Cc: linux-ia64@vger.kernel.org
    Cc: linux-mips@vger.kernel.org
    Cc: nios2-dev@lists.rocketboards.org
    Cc: openrisc@lists.librecores.org
    Cc: linux-parisc@vger.kernel.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: linux-riscv@lists.infradead.org
    Cc: linux-s390@vger.kernel.org
    Cc: linux-sh@vger.kernel.org
    Cc: sparclinux@vger.kernel.org
    Cc: linux-um@lists.infradead.org
    Cc: linux-xtensa@linux-xtensa.org
    Cc: linux-arch@vger.kernel.org
    Acked-by: Paul Burton # MIPS parts
    Acked-by: Max Filippov # For xtensa changes
    Acked-by: Will Deacon # For the arm64 bits
    Reviewed-by: Thomas Gleixner # for x86
    Reviewed-by: Dmitry V. Levin
    Reported-by: Andy Lutomirski
    Signed-off-by: Steven Rostedt (VMware)

    Steven Rostedt (Red Hat)
     

29 Mar, 2019

1 commit

  • I do not see any consistency about headers_install of
    and .

    According to my analysis of Linux 5.1-rc1, there are 3 groups:

    [1] Both and are exported

    alpha, arm, hexagon, mips, powerpc, s390, sparc, x86

    [2] is exported, but is not

    arc, arm64, c6x, h8300, ia64, m68k, microblaze, nios2, openrisc,
    parisc, sh, unicore32, xtensa

    [3] Neither nor is exported

    csky, nds32, riscv

    This does not match to the actual KVM support. At least, [2] is
    half-baked.

    Nor do arch maintainers look like they care about this. For example,
    commit 0add53713b1c ("microblaze: Add missing kvm_para.h to Kbuild")
    exported to user-space in order to fix an in-kernel
    build error.

    We have two ways to make this consistent:

    [A] export both and for all
    architectures, irrespective of the KVM support

    [B] Match the header export of and
    to the KVM support

    My first attempt was [A] because the code looks cleaner, but Paolo
    suggested [B].

    So, this commit goes with [B].

    For most architectures, was moved to the kernel-space.
    I changed include/uapi/linux/Kbuild so that it checks generated
    asm/kvm_para.h as well as check-in ones.

    After this commit, there will be two groups:

    [1] Both and are exported

    arm, arm64, mips, powerpc, s390, x86

    [2] Neither nor is exported

    alpha, arc, c6x, csky, h8300, hexagon, ia64, m68k, microblaze,
    nds32, nios2, openrisc, parisc, riscv, sh, sparc, unicore32, xtensa

    Signed-off-by: Masahiro Yamada
    Acked-by: Cornelia Huck
    Signed-off-by: Paolo Bonzini

    Masahiro Yamada
     

18 Mar, 2019

1 commit

  • Pull more Kbuild updates from Masahiro Yamada:

    - add more Build-Depends to Debian source package

    - prefix header search paths with $(srctree)/

    - make modpost show verbose section mismatch warnings

    - avoid hard-coded CROSS_COMPILE for h8300

    - fix regression for Debian make-kpkg command

    - add semantic patch to detect missing put_device()

    - fix some warnings of 'make deb-pkg'

    - optimize NOSTDINC_FLAGS evaluation

    - add warnings about redundant generic-y

    - clean up Makefiles and scripts

    * tag 'kbuild-v5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kconfig: remove stale lxdialog/.gitignore
    kbuild: force all architectures except um to include mandatory-y
    kbuild: warn redundant generic-y
    Revert "modsign: Abort modules_install when signing fails"
    kbuild: Make NOSTDINC_FLAGS a simply expanded variable
    kbuild: deb-pkg: avoid implicit effects
    coccinelle: semantic code search for missing put_device()
    kbuild: pkg: grep include/config/auto.conf instead of $KCONFIG_CONFIG
    kbuild: deb-pkg: introduce is_enabled and if_enabled_echo to builddeb
    kbuild: deb-pkg: add CONFIG_ prefix to kernel config options
    kbuild: add workaround for Debian make-kpkg
    kbuild: source include/config/auto.conf instead of ${KCONFIG_CONFIG}
    unicore32: simplify linker script generation for decompressor
    h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux-
    kbuild: move archive command to scripts/Makefile.lib
    modpost: always show verbose warning for section mismatch
    ia64: prefix header search path with $(srctree)/
    libfdt: prefix header search paths with $(srctree)/
    deb-pkg: generate correct build dependencies

    Linus Torvalds
     

17 Mar, 2019

2 commits

  • Currently, every arch/*/include/uapi/asm/Kbuild explicitly includes
    the common Kbuild.asm file. Factor out the duplicated include directives
    to scripts/Makefile.asm-generic so that no architecture would opt out
    of the mandatory-y mechanism.

    um is not forced to include mandatory-y since it is a very exceptional
    case which does not support UAPI.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • The generic-y is redundant under the following condition:

    - arch has its own implementation

    - the same header is added to generated-y

    - the same header is added to mandatory-y

    If a redundant generic-y is found, the warning like follows is displayed:

    scripts/Makefile.asm-generic:20: redundant generic-y found in arch/arm/include/asm/Kbuild: timex.h

    I fixed up arch Kbuild files found by this.

    Suggested-by: Sam Ravnborg
    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

15 Mar, 2019

1 commit

  • Pull networking fixes from David Miller:
    "More fixes in the queue:

    1) Netfilter nat can erroneously register the device notifier twice,
    fix from Florian Westphal.

    2) Use after free in nf_tables, from Pablo Neira Ayuso.

    3) Parallel update of steering rule fix in mlx5 river, from Eli
    Britstein.

    4) RX processing panic in lan743x, fix from Bryan Whitehead.

    5) Use before initialization of TCP_SKB_CB, fix from Christoph Paasch.

    6) Fix locking in SRIOV mode of mlx4 driver, from Jack Morgenstein.

    7) Fix TX stalls in lan743x due to mishandling of interrupt ACKing
    modes, from Bryan Whitehead.

    8) Fix infoleak in l2tp_ip6_recvmsg(), from Eric Dumazet"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (43 commits)
    pptp: dst_release sk_dst_cache in pptp_sock_destruct
    MAINTAINERS: GENET & SYSTEMPORT: Add internal Broadcom list
    l2tp: fix infoleak in l2tp_ip6_recvmsg()
    net/tls: Inform user space about send buffer availability
    net_sched: return correct value for *notify* functions
    lan743x: Fix TX Stall Issue
    net/mlx4_core: Fix qp mtt size calculation
    net/mlx4_core: Fix locking in SRIOV mode when switching between events and polling
    net/mlx4_core: Fix reset flow when in command polling mode
    mlxsw: minimal: Initialize base_mac
    mlxsw: core: Prevent duplication during QSFP module initialization
    net: dwmac-sun8i: fix a missing check of of_get_phy_mode
    net: sh_eth: fix a missing check of of_get_phy_mode
    net: 8390: fix potential NULL pointer dereferences
    net: fujitsu: fix a potential NULL pointer dereference
    net: qlogic: fix a potential NULL pointer dereference
    isdn: hfcpci: fix potential NULL pointer dereference
    Documentation: devicetree: add a new optional property for port mac address
    net: rocker: fix a potential NULL pointer dereference
    net: qlge: fix a potential NULL pointer dereference
    ...

    Linus Torvalds
     

12 Mar, 2019

1 commit

  • Referencing the __kernel_long_t type caused some user space applications
    to stop compiling when they had not already included linux/posix_types.h,
    e.g.

    s/multicast.c -o ext/sockets/multicast.lo
    In file included from /builddir/build/BUILD/php-7.3.3/main/php.h:468,
    from /builddir/build/BUILD/php-7.3.3/ext/sockets/sockets.c:27:
    /builddir/build/BUILD/php-7.3.3/ext/sockets/sockets.c: In function 'zm_startup_sockets':
    /builddir/build/BUILD/php-7.3.3/ext/sockets/sockets.c:776:40: error: '__kernel_long_t' undeclared (first use in this function)
    776 | REGISTER_LONG_CONSTANT("SO_SNDTIMEO", SO_SNDTIMEO, CONST_CS | CONST_PERSISTENT);

    It is safe to include that header here, since it only contains kernel
    internal types that do not conflict with other user space types.

    It's still possible that some related build failures remain, but those
    are likely to be for code that is not already y2038 safe.

    Reported-by: Laura Abbott
    Fixes: a9beb86ae6e5 ("sock: Add SO_RCVTIMEO_NEW and SO_SNDTIMEO_NEW")
    Signed-off-by: Arnd Bergmann
    Signed-off-by: David S. Miller

    Arnd Bergmann
     

07 Mar, 2019

2 commits

  • Pull char/misc driver updates from Greg KH:
    "Here is the big char/misc driver patch pull request for 5.1-rc1.

    The largest thing by far is the new habanalabs driver for their AI
    accelerator chip. For now it is in the drivers/misc directory but will
    probably move to a new directory soon along with other drivers of this
    type.

    Other than that, just the usual set of individual driver updates and
    fixes. There's an "odd" merge in here from the DRM tree that they
    asked me to do as the MEI driver is starting to interact with the i915
    driver, and it needed some coordination. All of those patches have
    been properly acked by the relevant subsystem maintainers.

    All of these have been in linux-next with no reported issues, most for
    quite some time"

    * tag 'char-misc-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (219 commits)
    habanalabs: adjust Kconfig to fix build errors
    habanalabs: use %px instead of %p in error print
    habanalabs: use do_div for 64-bit divisions
    intel_th: gth: Fix an off-by-one in output unassigning
    habanalabs: fix little-endiancpu conversion warnings
    habanalabs: use NULL to initialize array of pointers
    habanalabs: fix little-endiancpu conversion warnings
    habanalabs: soft-reset device if context-switch fails
    habanalabs: print pointer using %p
    habanalabs: fix memory leak with CBs with unaligned size
    habanalabs: return correct error code on MMU mapping failure
    habanalabs: add comments in uapi/misc/habanalabs.h
    habanalabs: extend QMAN0 job timeout
    habanalabs: set DMA0 completion to SOB 1007
    habanalabs: fix validation of WREG32 to DMA completion
    habanalabs: fix mmu cache registers init
    habanalabs: disable CPU access on timeouts
    habanalabs: add MMU DRAM default page mapping
    habanalabs: Dissociate RAZWI info from event types
    misc/habanalabs: adjust Kconfig to fix build errors
    ...

    Linus Torvalds
     
  • Pull asm-generic updates from Arnd Bergmann:
    "Only a few small changes this time:

    - Michael S. Tsirkin cleans up linux/mman.h

    - Mike Rapoport found a typo

    I had originally merged another cleanup series for I/O accessors from
    Hugo Lefeuvre as well, but dropped it after the discussion of the
    barrier semantics and some conflicts. I expect this series to get
    merged for a later release though"

    * tag 'asm-generic-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
    asm-generic/page.h: fix typo in #error text requiring a real asm/page.h
    arch: move common mmap flags to linux/mman.h
    drm: tweak header name
    x86/mpx: tweak header name

    Linus Torvalds
     

06 Mar, 2019

3 commits

  • Pull year 2038 updates from Thomas Gleixner:
    "Another round of changes to make the kernel ready for 2038. After lots
    of preparatory work this is the first set of syscalls which are 2038
    safe:

    403 clock_gettime64
    404 clock_settime64
    405 clock_adjtime64
    406 clock_getres_time64
    407 clock_nanosleep_time64
    408 timer_gettime64
    409 timer_settime64
    410 timerfd_gettime64
    411 timerfd_settime64
    412 utimensat_time64
    413 pselect6_time64
    414 ppoll_time64
    416 io_pgetevents_time64
    417 recvmmsg_time64
    418 mq_timedsend_time64
    419 mq_timedreceiv_time64
    420 semtimedop_time64
    421 rt_sigtimedwait_time64
    422 futex_time64
    423 sched_rr_get_interval_time64

    The syscall numbers are identical all over the architectures"

    * 'timers-2038-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits)
    riscv: Use latest system call ABI
    checksyscalls: fix up mq_timedreceive and stat exceptions
    unicore32: Fix __ARCH_WANT_STAT64 definition
    asm-generic: Make time32 syscall numbers optional
    asm-generic: Drop getrlimit and setrlimit syscalls from default list
    32-bit userspace ABI: introduce ARCH_32BIT_OFF_T config option
    compat ABI: use non-compat openat and open_by_handle_at variants
    y2038: add 64-bit time_t syscalls to all 32-bit architectures
    y2038: rename old time and utime syscalls
    y2038: remove struct definition redirects
    y2038: use time32 syscall names on 32-bit
    syscalls: remove obsolete __IGNORE_ macros
    y2038: syscalls: rename y2038 compat syscalls
    x86/x32: use time64 versions of sigtimedwait and recvmmsg
    timex: change syscalls to use struct __kernel_timex
    timex: use __kernel_timex internally
    sparc64: add custom adjtimex/clock_adjtime functions
    time: fix sys_timer_settime prototype
    time: Add struct __kernel_timex
    time: make adjtime compat handling available for 32 bit
    ...

    Linus Torvalds
     
  • Pull parisc updates from Helge Deller:
    "The most important changes in this patch set are:

    - DMA-related cleanups for parisc with the aim to move anything not
    required by drivers out of , by Christoph
    Hellwig

    - Switch to memblock_alloc(), by Mike Rapoport

    - Makefile cleanups by Masahiro Yamada

    - Switch to bust_spinlocks(), by Sergey Senozhatsky

    - Improved initial SMP affinity selection for IRQs

    - Added IPI- and rescheduling interrupts in /proc/interrupts output"

    * 'parisc-5.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: (21 commits)
    parisc: use memblock_alloc() instead of custom get_memblock()
    parisc: Add constants for various PDC firmware calls
    parisc: Add constant for PDC_PAT_COMPLEX firmware call
    parisc: Show machine product number during boot
    parisc: Add constants for PDC_RELOCATE PDC call
    parisc: Add PDC_CRASH_PREP PDC function number
    parisc: Use F_EXTEND() macro in iosapic code
    parisc: remove the HBA_DATA macro
    parisc/lba_pci: use container_of in LBA_DEV
    parisc/dino: use container_of in DINO_DEV
    parisc: properly type the return value of parisc_walk_tree
    parisc: properly type the iommu field in struct pci_hba_data
    parisc: turn GET_IOC into an inline function
    parisc: move internal implementation details out of
    parisc: don't include in
    parisc: remove meaningless ccflags-y in arch/parisc/boot/Makefile
    parisc: replace oops_in_progress manipulation with bust_spinlocks()
    parisc: Improve initial IRQ to CPU assignment
    parisc: Count IPI function call interrupts
    parisc: Show rescheduling interrupts on SMP machines only
    ...

    Linus Torvalds
     
  • Pull networking updates from David Miller:
    "Here we go, another merge window full of networking and #ebpf changes:

    1) Snoop DHCPACKS in batman-adv to learn MAC/IP pairs in the DHCP
    range without dealing with floods of ARP traffic, from Linus
    Lüssing.

    2) Throttle buffered multicast packet transmission in mt76, from
    Felix Fietkau.

    3) Support adaptive interrupt moderation in ice, from Brett Creeley.

    4) A lot of struct_size conversions, from Gustavo A. R. Silva.

    5) Add peek/push/pop commands to bpftool, as well as bash completion,
    from Stanislav Fomichev.

    6) Optimize sk_msg_clone(), from Vakul Garg.

    7) Add SO_BINDTOIFINDEX, from David Herrmann.

    8) Be more conservative with local resends due to local congestion,
    from Yuchung Cheng.

    9) Allow vetoing of unsupported VXLAN FDBs, from Petr Machata.

    10) Add health buffer support to devlink, from Eran Ben Elisha.

    11) Add TXQ scheduling API to mac80211, from Toke Høiland-Jørgensen.

    12) Add statistics to basic packet scheduler filter, from Cong Wang.

    13) Add GRE tunnel support for mlxsw Spectrum-2, from Nir Dotan.

    14) Lots of new IP tunneling forwarding tests, also from Nir Dotan.

    15) Add 3ad stats to bonding, from Nikolay Aleksandrov.

    16) Lots of probing improvements for bpftool, from Quentin Monnet.

    17) Various nfp drive #ebpf JIT improvements from Jakub Kicinski.

    18) Allow #ebpf programs to access gso_segs from skb shared info, from
    Eric Dumazet.

    19) Add sock_diag support for AF_XDP sockets, from Björn Töpel.

    20) Support 22260 iwlwifi devices, from Luca Coelho.

    21) Use rbtree for ipv6 defragmentation, from Peter Oskolkov.

    22) Add JMP32 instruction class support to #ebpf, from Jiong Wang.

    23) Add spinlock support to #ebpf, from Alexei Starovoitov.

    24) Support 256-bit keys and TLS 1.3 in ktls, from Dave Watson.

    25) Add device infomation API to devlink, from Jakub Kicinski.

    26) Add new timestamping socket options which are y2038 safe, from
    Deepa Dinamani.

    27) Add RX checksum offloading for various sh_eth chips, from Sergei
    Shtylyov.

    28) Flow offload infrastructure, from Pablo Neira Ayuso.

    29) Numerous cleanups, improvements, and bug fixes to the PHY layer
    and many drivers from Heiner Kallweit.

    30) Lots of changes to try and make packet scheduler classifiers run
    lockless as much as possible, from Vlad Buslov.

    31) Support BCM957504 chip in bnxt_en driver, from Erik Burrows.

    32) Add concurrency tests to tc-tests infrastructure, from Vlad
    Buslov.

    33) Add hwmon support to aquantia, from Heiner Kallweit.

    34) Allow 64-bit values for SO_MAX_PACING_RATE, from Eric Dumazet.

    And I would be remiss if I didn't thank the various major networking
    subsystem maintainers for integrating much of this work before I even
    saw it. Alexei Starovoitov, Daniel Borkmann, Pablo Neira Ayuso,
    Johannes Berg, Kalle Valo, and many others. Thank you!"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2207 commits)
    net/sched: avoid unused-label warning
    net: ignore sysctl_devconf_inherit_init_net without SYSCTL
    phy: mdio-mux: fix Kconfig dependencies
    net: phy: use phy_modify_mmd_changed in genphy_c45_an_config_aneg
    net: dsa: mv88e6xxx: add call to mv88e6xxx_ports_cmode_init to probe for new DSA framework
    selftest/net: Remove duplicate header
    sky2: Disable MSI on Dell Inspiron 1545 and Gateway P-79
    net/mlx5e: Update tx reporter status in case channels were successfully opened
    devlink: Add support for direct reporter health state update
    devlink: Update reporter state to error even if recover aborted
    sctp: call iov_iter_revert() after sending ABORT
    team: Free BPF filter when unregistering netdev
    ip6mr: Do not call __IP6_INC_STATS() from preemptible context
    isdn: mISDN: Fix potential NULL pointer dereference of kzalloc
    net: dsa: mv88e6xxx: support in-band signalling on SGMII ports with external PHYs
    cxgb4/chtls: Prefix adapter flags with CXGB4
    net-sysfs: Switch to bitmap_zalloc()
    mellanox: Switch to bitmap_zalloc()
    bpf: add test cases for non-pointer sanitiation logic
    mlxsw: i2c: Extend initialization by querying resources data
    ...

    Linus Torvalds
     

05 Mar, 2019

1 commit

  • Every in-kernel use of this function defined it to KERNEL_DS (either as
    an actual define, or as an inline function). It's an entirely
    historical artifact, and long long long ago used to actually read the
    segment selector valueof '%ds' on x86.

    Which in the kernel is always KERNEL_DS.

    Inspired by a patch from Jann Horn that just did this for a very small
    subset of users (the ones in fs/), along with Al who suggested a script.
    I then just took it to the logical extreme and removed all the remaining
    gunk.

    Roughly scripted with

    git grep -l '(get_ds())' -- :^tools/ | xargs sed -i 's/(get_ds())/(KERNEL_DS)/'
    git grep -lw 'get_ds' -- :^tools/ | xargs sed -i '/^#define get_ds()/d'

    plus manual fixups to remove a few unusual usage patterns, the couple of
    inline function cases and to fix up a comment that had become stale.

    The 'get_ds()' function remains in an x86 kvm selftest, since in user
    space it actually does something relevant.

    Inspired-by: Jann Horn
    Inspired-by: Al Viro
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

25 Feb, 2019

1 commit

  • Three conflicts, one of which, for marvell10g.c is non-trivial and
    requires some follow-up from Heiner or someone else.

    The issue is that Heiner converted the marvell10g driver over to
    use the generic c45 code as much as possible.

    However, in 'net' a bug fix appeared which makes sure that a new
    local mask (MDIO_AN_10GBT_CTRL_ADV_NBT_MASK) with value 0x01e0
    is cleared.

    Signed-off-by: David S. Miller

    David S. Miller
     

22 Feb, 2019

16 commits


19 Feb, 2019

2 commits

  • All new 32-bit architectures should have 64-bit userspace off_t type, but
    existing architectures has 32-bit ones.

    To enforce the rule, new config option is added to arch/Kconfig that defaults
    ARCH_32BIT_OFF_T to be disabled for new 32-bit architectures. All existing
    32-bit architectures enable it explicitly.

    New option affects force_o_largefile() behaviour. Namely, if userspace
    off_t is 64-bits long, we have no reason to reject user to open big files.

    Note that even if architectures has only 64-bit off_t in the kernel
    (arc, c6x, h8300, hexagon, nios2, openrisc, and unicore32),
    a libc may use 32-bit off_t, and therefore want to limit the file size
    to 4GB unless specified differently in the open flags.

    Signed-off-by: Yury Norov
    Acked-by: Arnd Bergmann
    Signed-off-by: Yury Norov
    Signed-off-by: Arnd Bergmann

    Yury Norov
     
  • Now that we have 3 mmap flags shared by all architectures,
    let's move them into the common header.

    This will help discourage future architectures from duplicating code.

    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: Arnd Bergmann

    Michael S. Tsirkin
     

07 Feb, 2019

3 commits

  • This adds 21 new system calls on each ABI that has 32-bit time_t
    today. All of these have the exact same semantics as their existing
    counterparts, and the new ones all have macro names that end in 'time64'
    for clarification.

    This gets us to the point of being able to safely use a C library
    that has 64-bit time_t in user space. There are still a couple of
    loose ends to tie up in various areas of the code, but this is the
    big one, and should be entirely uncontroversial at this point.

    In particular, there are four system calls (getitimer, setitimer,
    waitid, and getrusage) that don't have a 64-bit counterpart yet,
    but these can all be safely implemented in the C library by wrapping
    around the existing system calls because the 32-bit time_t they
    pass only counts elapsed time, not time since the epoch. They
    will be dealt with later.

    Signed-off-by: Arnd Bergmann
    Acked-by: Heiko Carstens
    Acked-by: Geert Uytterhoeven
    Acked-by: Catalin Marinas

    Arnd Bergmann
     
  • The time, stime, utime, utimes, and futimesat system calls are only
    used on older architectures, and we do not provide y2038 safe variants
    of them, as they are replaced by clock_gettime64, clock_settime64,
    and utimensat_time64.

    However, for consistency it seems better to have the 32-bit architectures
    that still use them call the "time32" entry points (leaving the
    traditional handlers for the 64-bit architectures), like we do for system
    calls that now require two versions.

    Note: We used to always define __ARCH_WANT_SYS_TIME and
    __ARCH_WANT_SYS_UTIME and only set __ARCH_WANT_COMPAT_SYS_TIME and
    __ARCH_WANT_SYS_UTIME32 for compat mode on 64-bit kernels. Now this is
    reversed: only 64-bit architectures set __ARCH_WANT_SYS_TIME/UTIME, while
    we need __ARCH_WANT_SYS_TIME32/UTIME32 for 32-bit architectures and compat
    mode. The resulting asm/unistd.h changes look a bit counterintuitive.

    This is only a cleanup patch and it should not change any behavior.

    Signed-off-by: Arnd Bergmann
    Acked-by: Geert Uytterhoeven
    Acked-by: Heiko Carstens

    Arnd Bergmann
     
  • This is the big flip, where all 32-bit architectures set COMPAT_32BIT_TIME
    and use the _time32 system calls from the former compat layer instead
    of the system calls that take __kernel_timespec and similar arguments.

    The temporary redirects for __kernel_timespec, __kernel_itimerspec
    and __kernel_timex can get removed with this.

    It would be easy to split this commit by architecture, but with the new
    generated system call tables, it's easy enough to do it all at once,
    which makes it a little easier to check that the changes are the same
    in each table.

    Acked-by: Geert Uytterhoeven
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann