1. 07 Jun, 2023 1 commit
  2. 26 May, 2023 13 commits
  3. 24 May, 2023 13 commits
    • Linus Walleij's avatar
      ARM/musb: omap2: Remove global GPIO numbers from TUSB6010 · 8e0285ab
      Linus Walleij authored
      The TUSB6010 (MUSB) device is picking up some GPIO lines
      hardcoded by number and passing on to the TUSB6010 device
      when registering it.
      
      Instead of nasty workarounds, provide a GPIO descriptor
      table and then make the TUSB6010 MUSB glue driver pick up
      the GPIO lines directly, convert it to an IRQ and pass down
      to the MUSB driver. OMAP2 is the only system using the
      TUSB6010.
      
      Stash the GPIO descriptors in the glue layer and use
      then to power up and down the TUSB6010 on-demand, instead
      of using boardfile callbacks.
      
      Since the OMAP2 boards are the only boards using the
      .set_power() and .board_set_power() callbacks, we can
      just delete them as the power is now handled directly
      in the TUSB6010 glue code.
      
      Cc: Bin Liu <b-liu@ti.com>
      Cc: linux-usb@vger.kernel.org
      Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base")
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      8e0285ab
    • Linus Walleij's avatar
      ARM: omap2: Rewrite WLAN quirk to use GPIO descriptors · 078dc519
      Linus Walleij authored
      The OMAP2 platform data quirk is using the global GPIO numberspace
      to obtain two WLAN GPIOs to drive power and xcvr reset GPIO
      lines during start-up.
      
      Rewrite the quirk to use a GPIO descriptor table so we avoid using
      global GPIO numbers.
      
      This gets rid of the final dependency on the legacy <linux/gpio.h>
      header from the OMAP2/3 platforms.
      
      Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base")
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      078dc519
    • Linus Walleij's avatar
      ARM: omap2: Get USB hub reset GPIO from descriptor · 94075d16
      Linus Walleij authored
      This switches the USB hub GPIO reset line handling in the
      OMAP2 pdata quirks over to using GPIO descriptors to avoid using
      the global GPIO numberspace.
      
      Since the GPIOs are exported and assumedly used by some kind
      of userspace we cannot simply use hogs in the device tree.
      
      Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base")
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      94075d16
    • Linus Walleij's avatar
      ARM/gpio: Push OMAP2 quirk down into TWL4030 driver · d5f4fa60
      Linus Walleij authored
      The TWL4030 GPIO driver has a custom platform data .set_up()
      callback to call back into the platform and do misc stuff such
      as hog and export a GPIO for WLAN PWR on a specific OMAP3 board.
      
      Avoid all the kludgery in the platform data and the boardfile
      and just put the quirks right into the driver. Make it
      conditional on OMAP3.
      
      I think the exported GPIO is used by some kind of userspace
      so ordinary DTS hogs will probably not work.
      
      Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base")
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      d5f4fa60
    • Linus Walleij's avatar
      ARM: omap1: Exorcise the legacy GPIO header · c729baa8
      Linus Walleij authored
      After fixing all the offending users referencing the global GPIO
      numberspace in OMAP1, a few sites still remain including the
      legacy <linus/gpio.h> header for no reason.
      
      Delete the last remaining users, and OMAP1 is free from legacy
      GPIO dependencies.
      
      Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base")
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      c729baa8
    • Linus Walleij's avatar
      ARM: omap1: Make serial wakeup GPIOs use descriptors · df89de97
      Linus Walleij authored
      The code in serial.c looks up GPIOs corresponding to a line
      on the UART when muxed in as GPIO to use this as a wakeup
      on serial activity for OMAP1.
      
      Utilize the NULL device to define some board-specific
      GPIO lookups and use these to immediately look up the
      same GPIOs, set as input and convert to IRQ numbers,
      then set these to wakeup IRQs. This is ugly but should work.
      
      This is only needed on the OSK1 and Nokia 770 devices that
      use the OMAP16xx.
      
      Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base")
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      df89de97
    • Linus Walleij's avatar
      ARM: omap1: Fix up the Nokia 770 board device IRQs · 084b6f21
      Linus Walleij authored
      The platform devices on the Nokia 770 is using some
      board-specific IRQs that get statically assigned to platform
      devices in the boardfile.
      
      This does not work with dynamic IRQ chip bases.
      
      Utilize the NULL device to define some board-specific
      GPIO lookups and use these to immediately look up the
      same GPIOs, convert to IRQ numbers and pass as resources
      to the devices. This is ugly but should work.
      
      Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base")
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      084b6f21
    • Linus Walleij's avatar
      ARM/mmc: Convert old mmci-omap to GPIO descriptors · e519f0bb
      Linus Walleij authored
      A recent change to the OMAP driver making it use a dynamic GPIO
      base created problems with some old OMAP1 board files, among
      them Nokia 770, SX1 and also the OMAP2 Nokia n8x0.
      
      Fix up all instances of GPIOs being used for the MMC driver
      by pushing the handling of power, slot selection and MMC
      "cover" into the driver as optional GPIOs.
      
      This is maybe not the most perfect solution as the MMC
      framework have some central handlers for some of the
      stuff, but it at least makes the situtation better and
      solves the immediate issue.
      
      Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base")
      Acked-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      e519f0bb
    • Linus Walleij's avatar
      Input: ads7846 - Convert to use software nodes · 767d8336
      Linus Walleij authored
      The Nokia 770 is using GPIOs from the global numberspace on the
      CBUS node to pass down to the LCD controller. This regresses when we
      let the OMAP GPIO driver use dynamic GPIO base.
      
      The Nokia 770 now has dynamic allocation of IRQ numbers, so this
      needs to be fixed for it to work.
      
      As this is the only user of LCD MIPID we can easily augment the
      driver to use a GPIO descriptor instead and resolve the issue.
      
      The platform data .shutdown() callback wasn't even used in the
      code, but we encode a shutdown asserting RESET in the remove()
      callback for completeness sake.
      
      The CBUS also has the ADS7846 touchscreen attached.
      
      Populate the devices on the Nokia 770 CBUS I2C using software
      nodes instead of platform data quirks. This includes the LCD
      and the ADS7846 touchscreen so the conversion just brings the LCD
      along with it as software nodes is an all-or-nothing design
      pattern.
      
      The ADS7846 has some limited support for using GPIO descriptors,
      let's convert it over completely to using device properties and then
      fix all remaining boardfile users to provide all platform data using
      software nodes.
      
      Dump the of includes and of_match_ptr() in the ADS7846 driver as part
      of the job.
      
      Since we have to move ADS7846 over to obtaining the GPIOs it is
      using exclusively from descriptors, we provide descriptor tables
      for the two remaining in-kernel boardfiles using ADS7846:
      
      - PXA Spitz
      - MIPS Alchemy DB1000 development board
      
      It was too hard for me to include software node conversion of
      these two remaining users at this time: the spitz is using a
      hscync callback in the platform data that would require further
      GPIO descriptor conversion of the Spitz, and moving the hsync
      callback down into the driver: it will just become too big of
      a job, but it can be done separately.
      
      The MIPS Alchemy DB1000 is simply something I cannot test, so take
      the easier approach of just providing some GPIO descriptors in
      this case as I don't want the patch to grow too intrusive.
      
      As we see that several device trees have incorrect polarity flags
      and just expect to bypass the gpiolib polarity handling, fix up
      all device trees too, in a separate patch.
      Suggested-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base")
      Acked-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Reviewed-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      767d8336
    • Linus Walleij's avatar
      ARM: omap1: Remove reliance on GPIO numbers from SX1 · 480c82da
      Linus Walleij authored
      It appears this happens because the OMAP driver now
      allocates GPIO numbers dynamically, so all that is
      references by number is a bit up in the air.
      
      Utilize the NULL device to define some board-specific
      GPIO lookups and use these to immediately look up the
      same GPIOs, convert to IRQ numbers and pass as resources
      to the devices. This is ugly but should work.
      
      Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base")
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      480c82da
    • Linus Walleij's avatar
      ARM: omap1: Remove reliance on GPIO numbers from PalmTE · 4c40db62
      Linus Walleij authored
      It appears this happens because the OMAP driver now
      allocates GPIO numbers dynamically, so all that is
      references by number is a bit up in the air.
      
      Utilize the NULL device to define some board-specific
      GPIO lookups and use these to immediately look up the
      same GPIOs, convert to IRQ numbers and pass as resources
      to the devices. This is ugly but should work.
      
      Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base")
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      4c40db62
    • Linus Walleij's avatar
      ARM: omap1: Drop header on AMS Delta · fa1ae0cd
      Linus Walleij authored
      The AMS Delta board uses GPIO descriptors exclusively and
      does not have any dependencies on the legacy <linux/gpio.h>
      header, so just drop it.
      Acked-by: default avatarJanusz Krzysztofik <jmkrzyszt@gmail.com>
      Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base")
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      fa1ae0cd
    • Linus Walleij's avatar
      ARM/mfd/gpio: Fixup TPS65010 regression on OMAP1 OSK1 · c32c81f3
      Linus Walleij authored
      Aaro reports problems on the OSK1 board after we altered
      the dynamic base for GPIO allocations.
      
      It appears this happens because the OMAP driver now
      allocates GPIO numbers dynamically, so all that is
      references by number is a bit up in the air.
      
      Let's bite the bullet and try to just move the gpio_chip
      in the tps65010 MFD driver over to using dynamic allocations.
      Alter everything in the OSK1 board file to use a GPIO
      descriptor table and lookups.
      
      Utilize the NULL device to define some board-specific
      GPIO lookups and use these to immediately look up the
      same GPIOs, convert to IRQ numbers and pass as resources
      to the devices. This is ugly but should work.
      
      The .setup() callback for tps65010 was used for some GPIO
      hogging, but since the OSK1 is the only user in the entire
      kernel we can alter the signatures to something that
      is helpful and make a clean transition.
      
      Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base")
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: andy.shevchenko@gmail.com
      Cc: Andreas Kemnade <andreas@kemnade.info>
      Acked-by: default avatarLee Jones <lee@kernel.org>
      Reviewed-by: default avatarLee Jones <lee@kernel.org>
      Reported-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
      Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      c32c81f3
  4. 21 May, 2023 12 commits
    • Linus Torvalds's avatar
      Linux 6.4-rc3 · 44c026a7
      Linus Torvalds authored
      44c026a7
    • Linus Torvalds's avatar
      Merge tag 'uml-for-linus-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux · fa4fe8ce
      Linus Torvalds authored
      Pull UML fix from Richard Weinberger:
      
       - Fix modular build for UML watchdog
      
      * tag 'uml-for-linus-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux:
        um: harddog: fix modular build
      fa4fe8ce
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · a35747c3
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "ARM:
      
         - Plug a race in the stage-2 mapping code where the IPA and the PA
           would end up being out of sync
      
         - Make better use of the bitmap API (bitmap_zero, bitmap_zalloc...)
      
         - FP/SVE/SME documentation update, in the hope that this field
           becomes clearer...
      
         - Add workaround for Apple SEIS brokenness to a new SoC
      
         - Random comment fixes
      
        x86:
      
         - add MSR_IA32_TSX_CTRL into msrs_to_save
      
         - fixes for XCR0 handling in SGX enclaves
      
        Generic:
      
         - Fix vcpu_array[0] races
      
         - Fix race between starting a VM and 'reboot -f'"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: VMX: add MSR_IA32_TSX_CTRL into msrs_to_save
        KVM: x86: Don't adjust guest's CPUID.0x12.1 (allowed SGX enclave XFRM)
        KVM: VMX: Don't rely _only_ on CPUID to enforce XCR0 restrictions for ECREATE
        KVM: Fix vcpu_array[0] races
        KVM: VMX: Fix header file dependency of asm/vmx.h
        KVM: Don't enable hardware after a restart/shutdown is initiated
        KVM: Use syscore_ops instead of reboot_notifier to hook restart/shutdown
        KVM: arm64: vgic: Add Apple M2 PRO/MAX cpus to the list of broken SEIS implementations
        KVM: arm64: Clarify host SME state management
        KVM: arm64: Restructure check for SVE support in FP trap handler
        KVM: arm64: Document check for TIF_FOREIGN_FPSTATE
        KVM: arm64: Fix repeated words in comments
        KVM: arm64: Constify start/end/phys fields of the pgtable walker data
        KVM: arm64: Infer PA offset from VA in hyp map walker
        KVM: arm64: Infer the PA offset from IPA in stage-2 map walker
        KVM: arm64: Use the bitmap API to allocate bitmaps
        KVM: arm64: Slightly optimize flush_context()
      a35747c3
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v6.4-1-2023-05-20' of... · c47d122c
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v6.4-1-2023-05-20' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Fail graciously if BUILD_BPF_SKEL=1 is specified and clang isn't
         available
      
       - Add empty 'struct rq' to 'perf lock contention' to satisfy libbpf
         'runqueue' type verification. This feature is built only with
         BUILD_BPF_SKEL=1
      
       - Make vmlinux.h use bpf.h and perf_event.h in source directory, not
         system ones that may be old and not have things like 'union
         perf_sample_weight'
      
       - Add system include paths to BPF builds to pick things missing in the
         headers included by clang -target bpf
      
       - Update various header copies with the kernel sources
      
       - Change divide by zero and not supported events behavior to show
         'nan'/'not counted' in 'perf stat' output.
      
         This happens when using things like 'perf stat -M TopdownL2 true',
         involving JSON metrics
      
       - Update no event/metric expectations affected by using JSON metrics in
         'perf stat -ddd' perf test
      
       - Avoid segv with 'perf stat --topdown' for metrics without a group
      
       - Do not assume which events may have a PMU name, allowing the logic to
         keep an AUX event group together. Makes this usecase work again:
      
           $ perf record --no-bpf-event -c 10 -e '{intel_pt//,tlb_flush.stlb_any/aux-sample-size=8192/pp}:u' -- sleep 0.1
           [ perf record: Woken up 1 times to write data ]
           [ perf record: Captured and wrote 0.078 MB perf.data ]
           $ perf script -F-dso,+addr | grep -C5 tlb_flush.stlb_any | head -11
           sleep 20444 [003]  7939.510243:  1  branches:uH:  7f5350cc82a2 dl_main+0x9a2 => 7f5350cb38f0 _dl_add_to_namespace_list+0x0
           sleep 20444 [003]  7939.510243:  1  branches:uH:  7f5350cb3908 _dl_add_to_namespace_list+0x18 => 7f5350cbb080 rtld_mutex_dummy+0x0
           sleep 20444 [003]  7939.510243:  1  branches:uH:  7f5350cc8350 dl_main+0xa50 => 0 [unknown]
           sleep 20444 [003]  7939.510244:  1  branches:uH:  7f5350cc83ca dl_main+0xaca => 7f5350caeb60 _dl_process_pt_gnu_property+0x0
           sleep 20444 [003]  7939.510245:  1  branches:uH:  7f5350caeb60 _dl_process_pt_gnu_property+0x0 => 0 [unknown]
           sleep 20444  7939.510245:       10 tlb_flush.stlb_any/aux-sample-size=8192/pp: 0 7f5350caeb60 _dl_process_pt_gnu_property+0x0
           sleep 20444 [003]  7939.510254:  1  branches:uH:  7f5350cc87fe dl_main+0xefe => 7f5350ccd240 strcmp+0x0
           sleep 20444 [003]  7939.510254:  1  branches:uH:  7f5350cc8862 dl_main+0xf62 => 0 [unknown]
      
       - Add a check for the above use case in 'perf test test_intel_pt'
      
       - Fix build with refcount checking on arm64, it was still accessing
         fields that need to be wrapped so that the refcounted struct gets
         checked
      
       - Fix contextid validation in ARM's CS-ETM, so that older kernels
         without that field can still be supported
      
       - Skip unsupported aggregation for stat events found in perf.data files
         in 'perf script'
      
       - Add stat test for record and script to check the previous problem
      
       - Remove needless debuginfod queries from 'perf test java symbol', this
         was just making the test take a long time to complete
      
       - Address python SafeConfigParser() deprecation warning in 'perf test
         attr'
      
       - Fix __NR_execve undeclared on i386 'perf bench syscall' build error
      
      * tag 'perf-tools-fixes-for-v6.4-1-2023-05-20' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (33 commits)
        perf bench syscall: Fix __NR_execve undeclared build error
        perf test attr: Fix python SafeConfigParser() deprecation warning
        perf test attr: Update no event/metric expectations
        tools headers disabled-features: Sync with the kernel sources
        tools headers UAPI: Sync arch prctl headers with the kernel sources
        tools headers: Update the copy of x86's mem{cpy,set}_64.S used in 'perf bench'
        tools headers x86 cpufeatures: Sync with the kernel sources
        tools headers UAPI: Sync s390 syscall table file that wires up the memfd_secret syscall
        tools headers UAPI: Sync linux/prctl.h with the kernel sources
        perf metrics: Avoid segv with --topdown for metrics without a group
        perf lock contention: Add empty 'struct rq' to satisfy libbpf 'runqueue' type verification
        perf cs-etm: Fix contextid validation
        perf arm64: Fix build with refcount checking
        perf test: Add stat test for record and script
        perf script: Skip aggregation for stat events
        perf build: Add system include paths to BPF builds
        perf bpf skels: Make vmlinux.h use bpf.h and perf_event.h in source directory
        perf parse-events: Do not break up AUX event group
        perf test test_intel_pt.sh: Test sample mode with event with PMU name
        perf evsel: Modify group pmu name for software events
        ...
      c47d122c
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 4927cb98
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - Fix broken soft dirty tracking when using the Radix MMU (>= P9)
      
       - Fix ISA mapping when "ranges" property is not present, for PASemi
         Nemo boards
      
       - Fix a possible WARN_ON_ONCE hitting in BPF extable handling
      
       - Fix incorrect DMA address handling when using 2MB TCEs
      
       - Fix a bug in IOMMU table handling for SR-IOV devices
      
       - Fix the recent rework of IOMMU handling which left arch code calling
         clean up routines that are handled by the IOMMU core
      
       - A few assorted build fixes
      
      Thanks to Christian Zigotzky, Dan Horák, Gaurav Batra, Hari Bathini,
      Jason Gunthorpe, Nathan Chancellor, Naveen N. Rao, Nicholas Piggin, Pali
      Rohár, Randy Dunlap, and Rob Herring.
      
      * tag 'powerpc-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/iommu: Incorrect DDW Table is referenced for SR-IOV device
        powerpc/iommu: DMA address offset is incorrectly calculated with 2MB TCEs
        powerpc/iommu: Remove iommu_del_device()
        powerpc/crypto: Fix aes-gcm-p10 build when VSX=n
        powerpc/bpf: populate extable entries only during the last pass
        powerpc/boot: Disable power10 features after BOOTAFLAGS assignment
        powerpc/64s/radix: Fix soft dirty tracking
        powerpc/fsl_uli1575: fix kconfig warnings and build errors
        powerpc/isa-bridge: Fix ISA mapping when "ranges" is not present
      4927cb98
    • Linus Torvalds's avatar
      Merge tag 'ata-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata · 90af47ed
      Linus Torvalds authored
      Pull ata fix from Damien Le Moal:
      
       - Fix DT binding for the ahci-ceva driver to fully describe all iommus,
         from Michal
      
      * tag 'ata-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata:
        dt-bindings: ata: ahci-ceva: Cover all 4 iommus entries
      90af47ed
    • Linus Torvalds's avatar
      Merge tag 'fbdev-for-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev · 70e137e3
      Linus Torvalds authored
      Pull fbdev fixes from Helge Deller:
       "A few small unspectacular fbdev fixes:
      
         - Fix for USB endpoint check in udlfb (found by syzbot fuzzer)
      
         - Small fix in error code path in omapfb
      
         - compiler warning fixes in fbmem & i810
      
         - code removal and whitespace cleanups in stifb and atyfb"
      
      * tag 'fbdev-for-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
        fbdev: stifb: Whitespace cleanups
        fbdev: udlfb: Use usb_control_msg_send()
        fbdev: udlfb: Fix endpoint check
        fbdev: atyfb: Remove unused clock determination
        fbdev: i810: include i810_main.h in i810_dvt.c
        fbdev: fbmem: mark get_fb_unmapped_area() static
        fbdev: omapfb: panel-tpo-td043mtea1: fix error code in probe()
      70e137e3
    • Linus Torvalds's avatar
      Merge tag '6.4-rc2-ksmbd-server-fixes' of git://git.samba.org/ksmbd · e2065b8c
      Linus Torvalds authored
      Pull ksmbd server fixes from Steve French:
      
       - two fixes for incorrect SMB3 message validation (one for client which
         uses 8 byte padding, and one for empty bcc)
      
       - two fixes for out of bounds bugs: one for username offset checks (in
         session setup) and the other for create context name length checks in
         open requests
      
      * tag '6.4-rc2-ksmbd-server-fixes' of git://git.samba.org/ksmbd:
        ksmbd: smb2: Allow messages padded to 8byte boundary
        ksmbd: allocate one more byte for implied bcc[0]
        ksmbd: fix wrong UserName check in session_user
        ksmbd: fix global-out-of-bounds in smb2_find_context_vals
      e2065b8c
    • Linus Torvalds's avatar
      Merge tag '6.4-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 0c9dcf12
      Linus Torvalds authored
      Pull cifs client fixes from Steve French:
       "Two smb3 client fixes, both related to deferred close, and also for
        stable:
      
         - send close for deferred handles before not after lease break
           response to avoid possible sharing violations
      
         - check all opens on an inode (looking for deferred handles) when
           lease break is returned not just the handle the lease break came in
           on"
      
      * tag '6.4-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        SMB3: drop reference to cfile before sending oplock break
        SMB3: Close all deferred handles of inode in case of handle lease break
      0c9dcf12
    • Mingwei Zhang's avatar
      KVM: VMX: add MSR_IA32_TSX_CTRL into msrs_to_save · b9846a69
      Mingwei Zhang authored
      Add MSR_IA32_TSX_CTRL into msrs_to_save[] to explicitly tell userspace to
      save/restore the register value during migration. Missing this may cause
      userspace that relies on KVM ioctl(KVM_GET_MSR_INDEX_LIST) fail to port the
      value to the target VM.
      
      In addition, there is no need to add MSR_IA32_TSX_CTRL when
      ARCH_CAP_TSX_CTRL_MSR is not supported in kvm_get_arch_capabilities(). So
      add the checking in kvm_probe_msr_to_save().
      
      Fixes: c11f83e0 ("KVM: vmx: implement MSR_IA32_TSX_CTRL disable RTM functionality")
      Reported-by: default avatarJim Mattson <jmattson@google.com>
      Signed-off-by: default avatarMingwei Zhang <mizhang@google.com>
      Reviewed-by: default avatarXiaoyao Li <xiaoyao.li@intel.com>
      Reviewed-by: default avatarJim Mattson <jmattson@google.com>
      Message-Id: <20230509032348.1153070-1-mizhang@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      b9846a69
    • Sean Christopherson's avatar
      KVM: x86: Don't adjust guest's CPUID.0x12.1 (allowed SGX enclave XFRM) · 275a8724
      Sean Christopherson authored
      Drop KVM's manipulation of guest's CPUID.0x12.1 ECX and EDX, i.e. the
      allowed XFRM of SGX enclaves, now that KVM explicitly checks the guest's
      allowed XCR0 when emulating ECREATE.
      
      Note, this could theoretically break a setup where userspace advertises
      a "bad" XFRM and relies on KVM to provide a sane CPUID model, but QEMU
      is the only known user of KVM SGX, and QEMU explicitly sets the SGX CPUID
      XFRM subleaf based on the guest's XCR0.
      Reviewed-by: default avatarKai Huang <kai.huang@intel.com>
      Tested-by: default avatarKai Huang <kai.huang@intel.com>
      Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
      Message-Id: <20230503160838.3412617-3-seanjc@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      275a8724
    • Sean Christopherson's avatar
      KVM: VMX: Don't rely _only_ on CPUID to enforce XCR0 restrictions for ECREATE · ad45413d
      Sean Christopherson authored
      Explicitly check the vCPU's supported XCR0 when determining whether or not
      the XFRM for ECREATE is valid.  Checking CPUID works because KVM updates
      guest CPUID.0x12.1 to restrict the leaf to a subset of the guest's allowed
      XCR0, but that is rather subtle and KVM should not modify guest CPUID
      except for modeling true runtime behavior (allowed XFRM is most definitely
      not "runtime" behavior).
      Reviewed-by: default avatarKai Huang <kai.huang@intel.com>
      Tested-by: default avatarKai Huang <kai.huang@intel.com>
      Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
      Message-Id: <20230503160838.3412617-2-seanjc@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      ad45413d
  5. 20 May, 2023 1 commit