1. 13 Jan, 2023 27 commits
  2. 12 Jan, 2023 13 commits
    • Linus Torvalds's avatar
      Merge tag 's390-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 5be413a6
      Linus Torvalds authored
      Pull s390 fixes from Heiko Carstens:
      
       - Add various missing READ_ONCE() to cmpxchg() loops prevent the
         compiler from potentially generating incorrect code. This includes a
         rather large change to the s390 specific hardware sampling code and
         its current use of cmpxchg_double().
      
         Do the fix now to get it out of the way of Peter Zijlstra's
         cmpxchg128() work, and have something that can be backported. The
         added new code includes a private 128 bit cmpxchg variant which will
         be removed again after Peter's rework is available. Also note that
         this 128 bit cmpxchg variant is used to implement 128 bit
         READ_ONCE(), while strictly speaking it wouldn't be necessary, and
         _READ_ONCE() should also be sufficient; even though it isn't obvious
         for all converted locations that this is the case. Therefore use this
         implementation for for the sake of clarity and consistency for now.
      
       - Fix ipl report address handling to avoid kdump failures/hangs.
      
       - Fix misuse of #(el)if in kernel decompressor.
      
       - Define RUNTIME_DISCARD_EXIT to fix link error with GNU ld < 2.36,
         caused by the recently changed discard behaviour.
      
       - Make sure _edata and _end symbols are always page aligned.
      
       - The current header guard DEBUG_H in one of the s390 specific header
         files is too generic and conflicts with the ath9k wireless driver.
         Add an _ASM_S390_ prefix to the guard to make it unique.
      
       - Update defconfigs.
      
      * tag 's390-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390: update defconfigs
        KVM: s390: interrupt: use READ_ONCE() before cmpxchg()
        s390/percpu: add READ_ONCE() to arch_this_cpu_to_op_simple()
        s390/cpum_sf: add READ_ONCE() semantics to compare and swap loops
        s390/kexec: fix ipl report address for kdump
        s390: fix -Wundef warning for CONFIG_KERNEL_ZSTD
        s390: define RUNTIME_DISCARD_EXIT to fix link error with GNU ld < 2.36
        s390: expicitly align _edata and _end symbols on page boundary
        s390/debug: add _ASM_S390_ prefix to header guard
      5be413a6
    • Linus Torvalds's avatar
      Merge tag 'for-linus-6.2-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · bad8c4a8
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
      
       - two cleanup patches
      
       - a fix of a memory leak in the Xen pvfront driver
      
       - a fix of a locking issue in the Xen hypervisor console driver
      
      * tag 'for-linus-6.2-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/pvcalls: free active map buffer on pvcalls_front_free_map
        hvc/xen: lock console list traversal
        x86/xen: Remove the unused function p2m_index()
        xen: make remove callback of xen driver void returned
      bad8c4a8
    • Linus Torvalds's avatar
      Merge tag 'timers-urgent-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 772d0e91
      Linus Torvalds authored
      Pull timer doc fixes from Ingo Molnar:
      
       - Fix various DocBook formatting errors in kernel/time/ that generated
         (justified) warnings during a kernel-doc build.
      
      * tag 'timers-urgent-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        time: Fix various kernel-doc problems
      772d0e91
    • Linus Torvalds's avatar
      Merge tag 'perf-urgent-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a7b19c60
      Linus Torvalds authored
      Pull perf events hw enablement from Ingo Molnar:
      
       - More hardware-enablement for Intel Meteor Lake & Emerald Rapid
         systems: pure model ID enumeration additions that do not affect other
         systems.
      
      * tag 'perf-urgent-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/intel/uncore: Add Emerald Rapids
        perf/x86/msr: Add Emerald Rapids
        perf/x86/msr: Add Meteor Lake support
        perf/x86/cstate: Add Meteor Lake support
      a7b19c60
    • Linus Torvalds's avatar
      Merge tag 'sched-urgent-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ea66bf86
      Linus Torvalds authored
      Pull scheduler fixes from Ingo Molnar:
      
       - Fix scheduler frequency invariance bug related to overly long
         tickless periods triggering an integer overflow and disabling the
         feature.
      
       - Fix use-after-free bug in dup_user_cpus_ptr().
      
       - Fix do_set_cpus_allowed() deadlock scenarios related to calling
         kfree() with the pi_lock held. NOTE: the rcu_free() is the 'lazy'
         solution here - we looked at patches to free the structure after the
         pi_lock got dropped, but that looked quite a bit messier - and none
         of this is truly performance critical. We can revisit this if it's
         too lazy of a solution ...
      
      * tag 'sched-urgent-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/core: Use kfree_rcu() in do_set_cpus_allowed()
        sched/core: Fix use-after-free bug in dup_user_cpus_ptr()
        sched/core: Fix arch_scale_freq_tick() on tickless systems
      ea66bf86
    • Linus Torvalds's avatar
      Merge tag 'core-urgent-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · cf4d5be8
      Linus Torvalds authored
      Pull objtool fix from Ingo Molnar:
      
       - Fix objtool to be more permissive with hand-written assembly that
         uses non-function symbols in executable sections.
      
      * tag 'core-urgent-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        objtool: Tolerate STT_NOTYPE symbols at end of section
      cf4d5be8
    • Linus Torvalds's avatar
      Merge tag 'urgent-nolibc.2023.01.09a' of... · f129b616
      Linus Torvalds authored
      Merge tag 'urgent-nolibc.2023.01.09a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu
      
      Pull nolibc fixes from Paul McKenney:
      
       - The fd_set structure was incorrectly defined as arrays of u32 instead
         of long, which breaks BE64. Fix courtesy of Sven Schnelle.
      
       - S_ISxxx macros were incorrectly testing the bits after applying them
         instead of bitwise ANDing S_FMT with the value. Fix from Warner Losh.
      
       - The mips code was randomly broken due to an unprotected "noreorder"
         directive in the _start code that could prevent the assembler from
         filling delayed slots. This in turn resulted in random other
         instructions being placed into those slots. Fix courtesy of Willy
         Tarreau.
      
       - The current nolibc header layout refrains from including files that
         are not explicitly included by the code using nolibc. Unfortunately,
         this causes build failures when such files contain definitions that
         are used (for example) by libgcc. Example definitions include raise()
         and memset(), which are called by some architectures, but only at
         certain optimization levels. Fix courtesy of Willy Tarreau.
      
       - gcc 11.3 in ARM thumb2 mode at -O2 recognized a memset() construction
         inside the memset() definition. The compiler replaced this
         construction with a call to... memset(). Userland cannot be forced to
         build with -ffreestanding, so an empty asm() statement was introduced
         into the loop the loop in order to prevent the compiler from making
         this unproductive transformation. Fix courtesy of Willy Tarreau.
      
       - Most of the O_* macros were wrong on RISCV because their octal values
         were coded as hexadecimal. This resulted in the getdents64() selftest
         failing. Fix courtesy of Willy Tarreau.
      
      This was tested on x86_64, i386, armv5, armv7, thumb1, thumb2, mips and
      riscv, all at -O0, -Os and -O3.
      
      * tag 'urgent-nolibc.2023.01.09a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu:
        tools/nolibc: fix the O_* fcntl/open macro definitions for riscv
        tools/nolibc: prevent gcc from making memset() loop over itself
        tools/nolibc: fix missing includes causing build issues at -O0
        tools/nolibc: restore mips branch ordering in the _start block
        tools/nolibc: Fix S_ISxxx macros
        nolibc: fix fd_set type
      f129b616
    • Andre Przywara's avatar
      r8152: add vendor/device ID pair for Microsoft Devkit · be53771c
      Andre Przywara authored
      The Microsoft Devkit 2023 is a an ARM64 based machine featuring a
      Realtek 8153 USB3.0-to-GBit Ethernet adapter. As in their other
      machines, Microsoft uses a custom USB device ID.
      
      Add the respective ID values to the driver. This makes Ethernet work on
      the MS Devkit device. The chip has been visually confirmed to be a
      RTL8153.
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      Link: https://lore.kernel.org/r/20230111133228.190801-1-andre.przywara@arm.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      be53771c
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · c757fc92
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
      
       - Fixes for long standing issues with accesses to spidev->spi during
         teardown in the spidev userspace driver.
      
       - Rename the newly added spi-cs-setup-ns DT property to be more in line
         with our other delay properties before it becomes ABI.
      
       - A few driver specific fixes.
      
      * tag 'spi-fix-v6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: spidev: remove debug messages that access spidev->spi without locking
        spi: spidev: fix a race condition when accessing spidev->spi
        spi: Rename spi-cs-setup-ns property to spi-cs-setup-delay-ns
        spi: dt-bindings: Rename spi-cs-setup-ns to spi-cs-setup-delay-ns
        spi: cadence: Fix busy cycles calculation
        spi: mediatek: Enable irq before the spi registration
      c757fc92
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v6.2-rc3' of... · cf9668a2
      Linus Torvalds authored
      Merge tag 'regulator-fix-v6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
      
      Pull regulator fixes from Mark Brown:
       "A couple of small driver specific fixes, one of which I queued for 6.1
        but didn't actually send out so has had *plenty* of testing in -next"
      
      * tag 'regulator-fix-v6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: qcom-rpmh: PM8550 ldo11 regulator is an nldo
        regulator: da9211: Use irq handler when ready
      cf9668a2
    • Linus Torvalds's avatar
      Merge tag 'mtd/fixes-for-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux · e58f087e
      Linus Torvalds authored
      Pull MTD fixes from Miquel Raynal:
      
       - cfi: Allow building spi-intel standalone to avoid build issues
      
       - parsers: scpart: Fix __udivdi3 undefined on mips
      
       - parsers: tplink_safeloader: Fix potential memory leak during parsing
      
       - Update email of Tudor Ambarus
      
      * tag 'mtd/fixes-for-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
        MAINTAINERS: Update email of Tudor Ambarus
        mtd: cfi: allow building spi-intel standalone
        mtd: parsers: scpart: fix __udivdi3 undefined on mips
        mtd: parsers: Fix potential memory leak in mtd_parser_tplink_safeloader_parse()
      e58f087e
    • Paolo Abeni's avatar
      Merge branch 'vsock-update-tools-and-error-handling' · 55b98837
      Paolo Abeni authored
      Arseniy Krasnov says:
      
      ====================
      vsock: update tools and error handling
      
      Patchset consists of two parts:
      
      1) Kernel patch
      One patch from Bobby Eshleman. I took single patch from Bobby:
      https://lore.kernel.org/lkml/d81818b868216c774613dd03641fcfe63cc55a45
      .1660362668.git.bobby.eshleman@bytedance.com/ and use only part for
      af_vsock.c, as VMCI and Hyper-V parts were rejected.
      
      I used it, because for SOCK_SEQPACKET big messages handling was broken -
      ENOMEM was returned instead of EMSGSIZE. And anyway, current logic which
      always replaces any error code returned by transport to ENOMEM looks
      strange for me also(for example in EMSGSIZE case it was changed to
      ENOMEM).
      
      2) Tool patches
      Since there is work on several significant updates for vsock(virtio/
      vsock especially): skbuff, DGRAM, zerocopy rx/tx, so I think that this
      patchset will be useful.
      
      This patchset updates vsock tests and tools a little bit. First of all
      it updates test suite: two new tests are added. One test is reworked
      message bound test. Now it is more complex. Instead of sending 1 byte
      messages with one MSG_EOR bit, it sends messages of random length(one
      half of messages are smaller than page size, second half are bigger)
      with random number of MSG_EOR bits set. Receiver also don't know total
      number of messages. Message bounds control is maintained by hash sum
      of messages length calculation. Second test is for SOCK_SEQPACKET - it
      tries to send message with length more than allowed. I think both tests
      will be useful for DGRAM support also.
      
      Third thing that this patchset adds is small utility to test vsock
      performance for both rx and tx. I think this util could be useful as
      'iperf'/'uperf', because:
      1) It is small comparing to 'iperf' or 'uperf', so it very easy to add
         new mode or feature to it(especially vsock specific).
      2) It allows to set SO_RCVLOWAT and SO_VM_SOCKETS_BUFFER_SIZE option.
         Whole throughtput depends on both parameters.
      3) It is located in the kernel source tree, so it could be updated by
         the same patchset which changes related kernel functionality in vsock.
      
      I used this util very often to check performance of my rx zerocopy
      support(this tool has rx zerocopy support, but not in this patchset).
      
      Here is comparison of outputs from three utils: 'iperf', 'uperf' and
      'vsock_perf'. In all three cases sender was at guest side. rx and
      tx buffers were always 64Kb(because by default 'uperf' uses 8K).
      
      iperf:
      
         [ ID] Interval           Transfer     Bitrate
         [  5]   0.00-10.00  sec  12.8 GBytes  11.0 Gbits/sec sender
         [  5]   0.00-10.00  sec  12.8 GBytes  11.0 Gbits/sec receiver
      
      uperf:
      
         Total     16.27GB /  11.36(s) =    12.30Gb/s       23455op/s
      
      vsock_perf:
      
         tx performance: 12.301529 Gbits/s
         rx performance: 12.288011 Gbits/s
      
      Results are almost same in all three cases.
      
      Patchset was rebased and tested on skbuff v9 patch from Bobby Eshleman:
      https://lore.kernel.org/netdev/20230107002937.899605-1-bobby.eshleman@bytedance.com/
      
      ====================
      
      Link: https://lore.kernel.org/r/67cd2d0a-1c58-baac-7b39-b8d4ea44f719@sberdevices.ruSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      55b98837
    • Arseniy Krasnov's avatar
      test/vsock: vsock_perf utility · 8abbffd2
      Arseniy Krasnov authored
      This adds utility to check vsock rx/tx performance.
      
      Usage as sender:
      ./vsock_perf --sender <cid> --port <port> --bytes <bytes to send>
      Usage as receiver:
      ./vsock_perf --port <port> --rcvlowat <SO_RCVLOWAT>
      Signed-off-by: default avatarArseniy Krasnov <AVKrasnov@sberdevices.ru>
      Reviewed-by: default avatarStefano Garzarella <sgarzare@redhat.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      8abbffd2