1. 06 Apr, 2023 5 commits
    • Linus Torvalds's avatar
      Merge tag 'pwm/for-6.3-rc6' of... · ae52f797
      Linus Torvalds authored
      Merge tag 'pwm/for-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
      
      Pull pwm fixes from Thierry Reding:
       "These are some fixes to make sure the PWM state structure is always
        initialized to a known state.
      
        Prior to this it could happen in some situations that random data from
        the stack would leak into the data structure and cause subtle bugs"
      
      * tag 'pwm/for-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
        pwm: Zero-initialize the pwm_state passed to driver's .get_state()
        pwm: meson: Explicitly set .polarity in .get_state()
        pwm: sprd: Explicitly set .polarity in .get_state()
        pwm: iqs620a: Explicitly set .polarity in .get_state()
        pwm: cros-ec: Explicitly set .polarity in .get_state()
        pwm: hibvt: Explicitly set .polarity in .get_state()
      ae52f797
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2023-04-06' of git://anongit.freedesktop.org/drm/drm · ac6c0433
      Linus Torvalds authored
      Pull drm fixes from Daniel Vetter:
       "Mostly i915 fixes: dp mst for compression/dsc, perf ioctl uaf, ctx rpm
        accounting, gt reset vs huc loading.
      
        And a few individual driver fixes: ivpu dma fence&suspend, panfrost
        mmap, nouveau color depth"
      
      * tag 'drm-fixes-2023-04-06' of git://anongit.freedesktop.org/drm/drm:
        accel/ivpu: Fix S3 system suspend when not idle
        accel/ivpu: Add dma fence to command buffers only
        drm/i915: Fix context runtime accounting
        drm/i915: fix race condition UAF in i915_perf_add_config_ioctl
        drm/i915: Use compressed bpp when calculating m/n value for DP MST DSC
        drm/i915/huc: Cancel HuC delayed load timer on reset.
        drm/i915/ttm: fix sparse warning
        drm/panfrost: Fix the panfrost_mmu_map_fault_addr() error path
        drm/nouveau/disp: Support more modes by checking with lower bpc
      ac6c0433
    • Linus Torvalds's avatar
      Merge tag 'sound-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 2a28a8b3
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "The majority of changes here are various fixes for Intel drivers,
        and there is a change in ASoC PCM core for the format constraints.
      
        In addition, a workaround for HD-audio HDMI regressions and usual
        HD-audio quirks are found"
      
      * tag 'sound-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda/hdmi: Preserve the previous PCM device upon re-enablement
        ALSA: hda/realtek: Add quirk for Clevo X370SNW
        ALSA: hda/realtek: fix mute/micmute LEDs for a HP ProBook
        ASoC: SOF: avoid a NULL dereference with unsupported widgets
        ASoC: da7213.c: add missing pm_runtime_disable()
        ASoC: hdac_hdmi: use set_stream() instead of set_tdm_slots()
        ASoC: codecs: lpass: fix the order or clks turn off during suspend
        ASoC: Intel: bytcr_rt5640: Add quirk for the Acer Iconia One 7 B1-750
        ASoC: SOF: ipc4: Ensure DSP is in D0I0 during sof_ipc4_set_get_data()
        ASoC: amd: yc: Add DMI entries to support Victus by HP Laptop 16-e1xxx (8A22)
        ASoC: soc-pcm: fix hw->formats cleared by soc_pcm_hw_init() for dpcm
        ASoC: Intel: soc-acpi: add table for Intel 'Rooks County' NUC M15
        ASOC: Intel: sof_sdw: add quirk for Intel 'Rooks County' NUC M15
      2a28a8b3
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v6.3-5' of... · 8dfab523
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v6.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
      
      Pull x86 platform driver fixes from Hans de Goede:
      
       -  more think-lmi fixes
      
       -  one DMI quirk addition
      
      * tag 'platform-drivers-x86-v6.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
        platform/x86: thinkpad_acpi: Add missing T14s Gen1 type to s2idle quirk list
        platform/x86: think-lmi: Clean up display of current_value on Thinkstation
        platform/x86: think-lmi: Fix memory leaks when parsing ThinkStation WMI strings
        platform/x86: think-lmi: Fix memory leak when showing current settings
      8dfab523
    • Linus Torvalds's avatar
      Merge tag 'asm-generic-fixes-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic · fcff5f99
      Linus Torvalds authored
      Pull asm-generic fixes from Arnd Bergmann:
       "These are minor fixes to address false-positive build warnings:
      
        Some of the less common I/O accessors are missing __force casts and
        cause sparse warnings for their implied byteswap, and a recent change
        to __generic_cmpxchg_local() causes a warning about constant integer
        truncation"
      
      * tag 'asm-generic-fixes-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
        asm-generic: avoid __generic_cmpxchg_local warnings
        asm-generic/io.h: suppress endianness warnings for relaxed accessors
        asm-generic/io.h: suppress endianness warnings for readq() and writeq()
      fcff5f99
  2. 05 Apr, 2023 8 commits
    • Daniel Vetter's avatar
      Merge tag 'drm-misc-fixes-2023-04-05' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · 3dfa8926
      Daniel Vetter authored
      Short summary of fixes pull:
      
       * ivpu: DMA fence and suspend fixes
       * nouveau: Color-depth fixes
       * panfrost: Fix mmap error handling
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      From: Thomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230405182855.GA1551@linux-uq9g
      3dfa8926
    • Linus Torvalds's avatar
      Merge tag 'trace-v6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · 99ddf225
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
      
       - Fix timerlat notification, as it was not triggering the notify to
         users when a new max latency was hit.
      
       - Do not trigger max latency if the tracing is off.
      
         When tracing is off, the ring buffer is not updated, it does not make
         sense to notify when there's a new max latency detected by the
         tracer, as why that latency happened is not available. The tracing
         logic still runs when the ring buffer is disabled, but it should not
         be triggering notifications.
      
       - Fix race on freeing the synthetic event "last_cmd" variable by adding
         a mutex around it.
      
       - Fix race between reader and writer of the ring buffer by adding
         memory barriers. When the writer is still on the reader page it must
         have its content visible on the buffer before it moves the commit
         index that the reader uses to know how much content is on the page.
      
       - Make get_lock_parent_ip() always inlined, as it uses _THIS_IP_ and
         _RET_IP_, which gets broken if it is not inlined.
      
       - Make __field(int, arr[5]) in a TRACE_EVENT() macro fail to build.
      
         The field formats of trace events are calculated by using
         sizeof(type) and other means by what is passed into the structure
         macros like __field(). The __field() macro is only meant for atom
         types like int, long, short, pointer, etc. It is not meant for
         arrays.
      
         The code will currently compile with arrays, but then the format
         produced will be inaccurate, and user space parsing tools will break.
      
         Two bugs have already been fixed, now add code that will make the
         kernel fail to build if another trace event includes this buggy field
         format.
      
       - Fix boot up snapshot code:
      
         Boot snapshots were triggering when not even asked for on the kernel
         command line. This was caused by two bugs:
      
          1) It would trigger a snapshot on any instance if one was created
             from the kernel command line.
      
          2) The error handling would only affect the top level instance.
             So the fact that a snapshot was done on a instance that didn't
             allocate a buffer triggered a warning written into the top level
             buffer, and worse yet, disabled the top level buffer.
      
       - Fix memory leak that was caused when an error was logged in a trace
         buffer instance, and then the buffer instance was removed.
      
         The allocated error log messages still needed to be freed.
      
      * tag 'trace-v6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        tracing: Free error logs of tracing instances
        tracing: Fix ftrace_boot_snapshot command line logic
        tracing: Have tracing_snapshot_instance_cond() write errors to the appropriate instance
        tracing: Error if a trace event has an array for a __field()
        tracing/osnoise: Fix notify new tracing_max_latency
        tracing/timerlat: Notify new max thread latency
        ftrace: Mark get_lock_parent_ip() __always_inline
        ring-buffer: Fix race while reader and writer are on the same page
        tracing/synthetic: Fix races on freeing last_cmd
      99ddf225
    • Steven Rostedt (Google)'s avatar
      tracing: Free error logs of tracing instances · 3357c6e4
      Steven Rostedt (Google) authored
      When a tracing instance is removed, the error messages that hold errors
      that occurred in the instance needs to be freed. The following reports a
      memory leak:
      
       # cd /sys/kernel/tracing
       # mkdir instances/foo
       # echo 'hist:keys=x' > instances/foo/events/sched/sched_switch/trigger
       # cat instances/foo/error_log
       [  117.404795] hist:sched:sched_switch: error: Couldn't find field
         Command: hist:keys=x
                            ^
       # rmdir instances/foo
      
      Then check for memory leaks:
      
       # echo scan > /sys/kernel/debug/kmemleak
       # cat /sys/kernel/debug/kmemleak
      unreferenced object 0xffff88810d8ec700 (size 192):
        comm "bash", pid 869, jiffies 4294950577 (age 215.752s)
        hex dump (first 32 bytes):
          60 dd 68 61 81 88 ff ff 60 dd 68 61 81 88 ff ff  `.ha....`.ha....
          a0 30 8c 83 ff ff ff ff 26 00 0a 00 00 00 00 00  .0......&.......
        backtrace:
          [<00000000dae26536>] kmalloc_trace+0x2a/0xa0
          [<00000000b2938940>] tracing_log_err+0x277/0x2e0
          [<000000004a0e1b07>] parse_atom+0x966/0xb40
          [<0000000023b24337>] parse_expr+0x5f3/0xdb0
          [<00000000594ad074>] event_hist_trigger_parse+0x27f8/0x3560
          [<00000000293a9645>] trigger_process_regex+0x135/0x1a0
          [<000000005c22b4f2>] event_trigger_write+0x87/0xf0
          [<000000002cadc509>] vfs_write+0x162/0x670
          [<0000000059c3b9be>] ksys_write+0xca/0x170
          [<00000000f1cddc00>] do_syscall_64+0x3e/0xc0
          [<00000000868ac68c>] entry_SYSCALL_64_after_hwframe+0x72/0xdc
      unreferenced object 0xffff888170c35a00 (size 32):
        comm "bash", pid 869, jiffies 4294950577 (age 215.752s)
        hex dump (first 32 bytes):
          0a 20 20 43 6f 6d 6d 61 6e 64 3a 20 68 69 73 74  .  Command: hist
          3a 6b 65 79 73 3d 78 0a 00 00 00 00 00 00 00 00  :keys=x.........
        backtrace:
          [<000000006a747de5>] __kmalloc+0x4d/0x160
          [<000000000039df5f>] tracing_log_err+0x29b/0x2e0
          [<000000004a0e1b07>] parse_atom+0x966/0xb40
          [<0000000023b24337>] parse_expr+0x5f3/0xdb0
          [<00000000594ad074>] event_hist_trigger_parse+0x27f8/0x3560
          [<00000000293a9645>] trigger_process_regex+0x135/0x1a0
          [<000000005c22b4f2>] event_trigger_write+0x87/0xf0
          [<000000002cadc509>] vfs_write+0x162/0x670
          [<0000000059c3b9be>] ksys_write+0xca/0x170
          [<00000000f1cddc00>] do_syscall_64+0x3e/0xc0
          [<00000000868ac68c>] entry_SYSCALL_64_after_hwframe+0x72/0xdc
      
      The problem is that the error log needs to be freed when the instance is
      removed.
      
      Link: https://lore.kernel.org/lkml/76134d9f-a5ba-6a0d-37b3-28310b4a1e91@alu.unizg.hr/
      Link: https://lore.kernel.org/linux-trace-kernel/20230404194504.5790b95f@gandalf.local.home
      
      Cc: stable@vger.kernel.org
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Thorsten Leemhuis <regressions@leemhuis.info>
      Cc: Ulf Hansson <ulf.hansson@linaro.org>
      Cc: Eric Biggers <ebiggers@kernel.org>
      Fixes: 2f754e77 ("tracing: Have the error logs show up in the proper instances")
      Reported-by: default avatarMirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr>
      Tested-by: default avatarMirsad Todorovac <mirsad.todorovac@alu.unizg.hr>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      3357c6e4
    • Daniel Vetter's avatar
      Merge tag 'drm-intel-fixes-2023-04-05' of... · 1a4edef8
      Daniel Vetter authored
      Merge tag 'drm-intel-fixes-2023-04-05' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      drm/i915 fixes for v6.3-rc6:
      - Fix DP MST DSC M/N calculation to use compressed bpp
      - Fix racy use-after-free in perf ioctl
      - Fix context runtime accounting
      - Fix handling of GT reset during HuC loading
      - Fix use of unsigned vm_fault_t for error values
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      From: Jani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/87zg7mzomz.fsf@intel.com
      1a4edef8
    • Jacek Lawrynowicz's avatar
      accel/ivpu: Fix S3 system suspend when not idle · 0ec86718
      Jacek Lawrynowicz authored
      Wait for VPU to be idle in ivpu_pm_suspend_cb() before powering off
      the device, so jobs are not lost and TDRs are not triggered after
      resume.
      
      Fixes: 852be13f ("accel/ivpu: Add PM support")
      Signed-off-by: default avatarStanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
      Reviewed-by: default avatarJeffrey Hugo <quic_jhugo@quicinc.com>
      Signed-off-by: default avatarJacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230331113603.2802515-3-stanislaw.gruszka@linux.intel.com
      0ec86718
    • Karol Wachowski's avatar
      accel/ivpu: Add dma fence to command buffers only · 774e7cb5
      Karol Wachowski authored
      Currently job->done_fence is added to every BO handle within a job. If job
      handle (command buffer) is shared between multiple submits, KMD will add
      the fence in each of them. Then bo_wait_ioctl() executed on command buffer
      will exit only when all jobs containing that handle are done.
      
      This creates deadlock scenario for user mode driver in case when job handle
      is added as dependency of another job, because bo_wait_ioctl() of first job
      will wait until second job finishes, and second job can not finish before
      first one.
      
      Having fences added only to job buffer handle allows user space to execute
      bo_wait_ioctl() on the job even if it's handle is submitted with other job.
      
      Fixes: cd727221 ("accel/ivpu: Add command buffer submission logic")
      Signed-off-by: default avatarKarol Wachowski <karol.wachowski@linux.intel.com>
      Signed-off-by: default avatarStanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
      Reviewed-by: default avatarJeffrey Hugo <quic_jhugo@quicinc.com>
      Signed-off-by: default avatarJacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230331113603.2802515-2-stanislaw.gruszka@linux.intel.com
      774e7cb5
    • Steven Rostedt (Google)'s avatar
      tracing: Fix ftrace_boot_snapshot command line logic · e9489164
      Steven Rostedt (Google) authored
      The kernel command line ftrace_boot_snapshot by itself is supposed to
      trigger a snapshot at the end of boot up of the main top level trace
      buffer. A ftrace_boot_snapshot=foo will do the same for an instance called
      foo that was created by trace_instance=foo,...
      
      The logic was broken where if ftrace_boot_snapshot was by itself, it would
      trigger a snapshot for all instances that had tracing enabled, regardless
      if it asked for a snapshot or not.
      
      When a snapshot is requested for a buffer, the buffer's
      tr->allocated_snapshot is set to true. Use that to know if a trace buffer
      wants a snapshot at boot up or not.
      
      Since the top level buffer is part of the ftrace_trace_arrays list,
      there's no reason to treat it differently than the other buffers. Just
      iterate the list if ftrace_boot_snapshot was specified.
      
      Link: https://lkml.kernel.org/r/20230405022341.895334039@goodmis.org
      
      Cc: stable@vger.kernel.org
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Ross Zwisler <zwisler@google.com>
      Fixes: 9c1c251d ("tracing: Allow boot instances to have snapshot buffers")
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      e9489164
    • Steven Rostedt (Google)'s avatar
      tracing: Have tracing_snapshot_instance_cond() write errors to the appropriate instance · 9d52727f
      Steven Rostedt (Google) authored
      If a trace instance has a failure with its snapshot code, the error
      message is to be written to that instance's buffer. But currently, the
      message is written to the top level buffer. Worse yet, it may also disable
      the top level buffer and not the instance that had the issue.
      
      Link: https://lkml.kernel.org/r/20230405022341.688730321@goodmis.org
      
      Cc: stable@vger.kernel.org
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Ross Zwisler <zwisler@google.com>
      Fixes: 2824f503 ("tracing: Make the snapshot trigger work with instances")
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      9d52727f
  3. 04 Apr, 2023 9 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 76f598ba
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "PPC:
         - Hide KVM_CAP_IRQFD_RESAMPLE if XIVE is enabled
      
        s390:
         - Fix handling of external interrupts in protected guests
      
        x86:
         - Resample the pending state of IOAPIC interrupts when unmasking them
      
         - Fix usage of Hyper-V "enlightened TLB" on AMD
      
         - Small fixes to real mode exceptions
      
         - Suppress pending MMIO write exits if emulator detects exception
      
        Documentation:
         - Fix rST syntax"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        docs: kvm: x86: Fix broken field list
        KVM: PPC: Make KVM_CAP_IRQFD_RESAMPLE platform dependent
        KVM: s390: pv: fix external interruption loop not always detected
        KVM: nVMX: Do not report error code when synthesizing VM-Exit from Real Mode
        KVM: x86: Clear "has_error_code", not "error_code", for RM exception injection
        KVM: x86: Suppress pending MMIO write exits if emulator detects exception
        KVM: x86/ioapic: Resample the pending state of an IRQ when unmasking
        KVM: irqfd: Make resampler_list an RCU list
        KVM: SVM: Flush Hyper-V TLB when required
      76f598ba
    • Linus Torvalds's avatar
      Merge tag 'nfsd-6.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux · ceeea1b7
      Linus Torvalds authored
      Pull nfsd fixes from Chuck Lever:
      
       - Fix a crash and a resource leak in NFSv4 COMPOUND processing
      
       - Fix issues with AUTH_SYS credential handling
      
       - Try again to address an NFS/NFSD/SUNRPC build dependency regression
      
      * tag 'nfsd-6.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
        NFSD: callback request does not use correct credential for AUTH_SYS
        NFS: Remove "select RPCSEC_GSS_KRB5
        sunrpc: only free unix grouplist after RCU settles
        nfsd: call op_release, even when op_func returns an error
        NFSD: Avoid calling OPDESC() with ops->opnum == OP_ILLEGAL
      ceeea1b7
    • Takahiro Itazuri's avatar
      docs: kvm: x86: Fix broken field list · fb5015bc
      Takahiro Itazuri authored
      Add a missing ":" to fix a broken field list.
      Signed-off-by: default avatarTakahiro Itazuri <itazur@amazon.com>
      Fixes: ba7bb663 ("KVM: x86: Provide per VM capability for disabling PMU virtualization")
      Message-Id: <20230331093116.99820-1-itazur@amazon.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      fb5015bc
    • Arnd Bergmann's avatar
      asm-generic: avoid __generic_cmpxchg_local warnings · 656e9007
      Arnd Bergmann authored
      Code that passes a 32-bit constant into cmpxchg() produces a harmless
      sparse warning because of the truncation in the branch that is not taken:
      
      fs/erofs/zdata.c: note: in included file (through /home/arnd/arm-soc/arch/arm/include/asm/cmpxchg.h, /home/arnd/arm-soc/arch/arm/include/asm/atomic.h, /home/arnd/arm-soc/include/linux/atomic.h, ...):
      include/asm-generic/cmpxchg-local.h:29:33: warning: cast truncates bits from constant value (5f0ecafe becomes fe)
      include/asm-generic/cmpxchg-local.h:33:34: warning: cast truncates bits from constant value (5f0ecafe becomes cafe)
      include/asm-generic/cmpxchg-local.h:29:33: warning: cast truncates bits from constant value (5f0ecafe becomes fe)
      include/asm-generic/cmpxchg-local.h:30:42: warning: cast truncates bits from constant value (5f0edead becomes ad)
      include/asm-generic/cmpxchg-local.h:33:34: warning: cast truncates bits from constant value (5f0ecafe becomes cafe)
      include/asm-generic/cmpxchg-local.h:34:44: warning: cast truncates bits from constant value (5f0edead becomes dead)
      
      This was reported as a regression to Matt's recent __generic_cmpxchg_local
      patch, though this patch only added more warnings on top of the ones
      that were already there.
      
      Rewording the truncation to use an explicit bitmask instead of a cast
      to a smaller type avoids the warning but otherwise leaves the code
      unchanged.
      
      I had another look at why the cast is even needed for atomic_cmpxchg(),
      and as Matt describes the problem here is that atomic_t contains a
      signed 'int', but cmpxchg() takes an 'unsigned long' argument, and
      converting between the two leads to a 64-bit sign-extension of
      negative 32-bit atomics.
      
      I checked the other implementations of arch_cmpxchg() and did not find
      any others that run into the same problem as __generic_cmpxchg_local(),
      but it's easy to be on the safe side here and always convert the
      signed int into an unsigned int when calling arch_cmpxchg(), as this
      will work even when any of the arch_cmpxchg() implementations run
      into the same problem.
      
      Fixes: 62465415 ("locking/atomic: cmpxchg: Make __generic_cmpxchg_local compare against zero-extended 'old' value")
      Reviewed-by: default avatarMatt Evans <mev@rivosinc.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      656e9007
    • Vladimir Oltean's avatar
      asm-generic/io.h: suppress endianness warnings for relaxed accessors · 05d3855b
      Vladimir Oltean authored
      Copy the forced type casts from the normal MMIO accessors to suppress
      the sparse warnings that point out __raw_readl() returns a native endian
      word (just like readl()).
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      05d3855b
    • Vladimir Oltean's avatar
      asm-generic/io.h: suppress endianness warnings for readq() and writeq() · d564fa1f
      Vladimir Oltean authored
      Commit c1d55d50 ("asm-generic/io.h: Fix sparse warnings on
      big-endian architectures") missed fixing the 64-bit accessors.
      
      Arnd explains in the attached link why the casts are necessary, even if
      __raw_readq() and __raw_writeq() do not take endian-specific types.
      
      Link: https://lore.kernel.org/lkml/9105d6fc-880b-4734-857d-e3d30b87ccf6@app.fastmail.com/Suggested-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      d564fa1f
    • Dai Ngo's avatar
      NFSD: callback request does not use correct credential for AUTH_SYS · 7de82c2f
      Dai Ngo authored
      Currently callback request does not use the credential specified in
      CREATE_SESSION if the security flavor for the back channel is AUTH_SYS.
      
      Problem was discovered by pynfs 4.1 DELEG5 and DELEG7 test with error:
      DELEG5   st_delegation.testCBSecParms     : FAILURE
                 expected callback with uid, gid == 17, 19, got 0, 0
      Signed-off-by: default avatarDai Ngo <dai.ngo@oracle.com>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      Fixes: 8276c902 ("SUNRPC: remove uid and gid from struct auth_cred")
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      7de82c2f
    • Chuck Lever's avatar
      NFS: Remove "select RPCSEC_GSS_KRB5 · 8be8f170
      Chuck Lever authored
      If CONFIG_CRYPTO=n (e.g. arm/shmobile_defconfig):
      
         WARNING: unmet direct dependencies detected for RPCSEC_GSS_KRB5
           Depends on [n]: NETWORK_FILESYSTEMS [=y] && SUNRPC [=y] && CRYPTO [=n]
           Selected by [y]:
           - NFS_V4 [=y] && NETWORK_FILESYSTEMS [=y] && NFS_FS [=y]
      
      As NFSv4 can work without crypto enabled, remove the RPCSEC_GSS_KRB5
      dependency altogether.
      
      Trond says:
      > It is possible to use the NFSv4.1 client with just AUTH_SYS, and
      > in fact there are plenty of people out there using only that. The
      > fact that RFC5661 gets its knickers in a twist about RPCSEC_GSS
      > support is largely irrelevant to those people.
      >
      > The other issue is that ’select’ enforces the strict dependency
      > that if the NFS client is compiled into the kernel, then the
      > RPCSEC_GSS and kerberos code needs to be compiled in as well: they
      > cannot exist as modules.
      
      Fixes: e57d0652 ("NFS & NFSD: Update GSS dependencies")
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Reported-by: default avatarNiklas Söderlund <niklas.soderlund@ragnatech.se>
      Suggested-by: default avatarTrond Myklebust <trondmy@hammerspace.com>
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      8be8f170
    • Jeff Layton's avatar
      sunrpc: only free unix grouplist after RCU settles · 5085e41f
      Jeff Layton authored
      While the unix_gid object is rcu-freed, the group_info list that it
      contains is not. Ensure that we only put the group list reference once
      we are really freeing the unix_gid object.
      Reported-by: default avatarZhi Li <yieli@redhat.com>
      Link: https://bugzilla.redhat.com/show_bug.cgi?id=2183056Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
      Fixes: fd5d2f78 ("SUNRPC: Make server side AUTH_UNIX use lockless lookups")
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      5085e41f
  4. 03 Apr, 2023 18 commits