1. 14 Sep, 2023 26 commits
  2. 13 Sep, 2023 14 commits
    • Linus Torvalds's avatar
      Merge tag 'pmdomain-v6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm · aed8aee1
      Linus Torvalds authored
      Pull genpm / pmdomain rename from Ulf Hansson:
       "This renames the genpd subsystem to pmdomain.
      
        As discussed on LKML, using 'genpd' as the name of a subsystem isn't
        very self-explanatory and the acronym itself that means Generic PM
        Domain, is known only by a limited group of people.
      
        The suggestion to improve the situation is to rename the subsystem to
        'pmdomain', which there seems to be a good consensus around using.
      
        Ideally it should indicate that its purpose is to manage Power Domains
        or 'PM domains' as we often also use within the Linux Kernel
        terminology"
      
      * tag 'pmdomain-v6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm:
        pmdomain: Rename the genpd subsystem to pmdomain
      aed8aee1
    • Linus Torvalds's avatar
      Merge tag 'tpmdd-v6.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd · 23f108dc
      Linus Torvalds authored
      Pull tpm fix from Jarkko Sakkinen.
      
      * tag 'tpmdd-v6.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd:
        tpm: Fix typo in tpmrm class definition
      23f108dc
    • Linus Torvalds's avatar
      Merge tag 'parisc-for-6.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 847165d7
      Linus Torvalds authored
      Pull parisc architecture fixes from Helge Deller:
      
       - fix reference to exported symbols for parisc64 [Masahiro Yamada]
      
       - Block-TLB (BTLB) support on 32-bit CPUs
      
       - sparse and build-warning fixes
      
      * tag 'parisc-for-6.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        linux/export: fix reference to exported functions for parisc64
        parisc: BTLB: Initialize BTLB tables at CPU startup
        parisc: firmware: Simplify calling non-PA20 functions
        parisc: BTLB: _edata symbol has to be page aligned for BTLB support
        parisc: BTLB: Add BTLB insert and purge firmware function wrappers
        parisc: BTLB: Clear possibly existing BTLB entries
        parisc: Prepare for Block-TLB support on 32-bit kernel
        parisc: shmparam.h: Document aliasing requirements of PA-RISC
        parisc: irq: Make irq_stack_union static to avoid sparse warning
        parisc: drivers: Fix sparse warning
        parisc: iosapic.c: Fix sparse warnings
        parisc: ccio-dma: Fix sparse warnings
        parisc: sba-iommu: Fix sparse warnigs
        parisc: sba: Fix compile warning wrt list of SBA devices
        parisc: sba_iommu: Fix build warning if procfs if disabled
      847165d7
    • Linus Torvalds's avatar
      Merge tag 'trace-v6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · 99214f67
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
      
       - Add missing LOCKDOWN checks for eventfs callers
      
         When LOCKDOWN is active for tracing, it causes inconsistent state
         when some functions succeed and others fail.
      
       - Use dput() to free the top level eventfs descriptor
      
         There was a race between accesses and freeing it.
      
       - Fix a long standing bug that eventfs exposed due to changing timings
         by dynamically creating files. That is, If a event file is opened for
         an instance, there's nothing preventing the instance from being
         removed which will make accessing the files cause use-after-free
         bugs.
      
       - Fix a ring buffer race that happens when iterating over the ring
         buffer while writers are active. Check to make sure not to read the
         event meta data if it's beyond the end of the ring buffer sub buffer.
      
       - Fix the print trigger that disappeared because the test to create it
         was looking for the event dir field being filled, but now it has the
         "ef" field filled for the eventfs structure.
      
       - Remove the unused "dir" field from the event structure.
      
       - Fix the order of the trace_dynamic_info as it had it backwards for
         the offset and len fields for which one was for which endianess.
      
       - Fix NULL pointer dereference with eventfs_remove_rec()
      
         If an allocation fails in one of the eventfs_add_*() functions, the
         caller of it in event_subsystem_dir() or event_create_dir() assigns
         the result to the structure. But it's assigning the ERR_PTR and not
         NULL. This was passed to eventfs_remove_rec() which expects either a
         good pointer or a NULL, not ERR_PTR. The fix is to not assign the
         ERR_PTR to the structure, but to keep it NULL on error.
      
       - Fix list_for_each_rcu() to use list_for_each_srcu() in
         dcache_dir_open_wrapper(). One iteration of the code used RCU but
         because it had to call sleepable code, it had to be changed to use
         SRCU, but one of the iterations was missed.
      
       - Fix synthetic event print function to use "as_u64" instead of passing
         in a pointer to the union. To fix big/little endian issues, the u64
         that represented several types was turned into a union to define the
         types properly.
      
      * tag 'trace-v6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        eventfs: Fix the NULL pointer dereference bug in eventfs_remove_rec()
        tracefs/eventfs: Use list_for_each_srcu() in dcache_dir_open_wrapper()
        tracing/synthetic: Print out u64 values properly
        tracing/synthetic: Fix order of struct trace_dynamic_info
        selftests/ftrace: Fix dependencies for some of the synthetic event tests
        tracing: Remove unused trace_event_file dir field
        tracing: Use the new eventfs descriptor for print trigger
        ring-buffer: Do not attempt to read past "commit"
        tracefs/eventfs: Free top level files on removal
        ring-buffer: Avoid softlockup in ring_buffer_resize()
        tracing: Have event inject files inc the trace array ref count
        tracing: Have option files inc the trace array ref count
        tracing: Have current_trace inc the trace array ref count
        tracing: Have tracing_max_latency inc the trace array ref count
        tracing: Increase trace array ref count on enable and filter files
        tracefs/eventfs: Use dput to free the toplevel events directory
        tracefs/eventfs: Add missing lockdown checks
        tracefs: Add missing lockdown check to tracefs_create_dir()
      99214f67
    • David S. Miller's avatar
      Merge branch 'selftests-classid' · ca5ab963
      David S. Miller authored
      Pedro Tammela says:
      
      ====================
      selftests/tc-testing: add tests covering classid
      
      Patches 1-3 add missing tests covering classid behaviour on tdc for cls_fw,
      cls_route and cls_fw. This behaviour was recently fixed by valis[0].
      
      Patch 4 comes from the development done in the previous patches as it turns out
      cls_route never returns meaningful errors.
      
      [0] https://lore.kernel.org/all/20230729123202.72406-1-jhs@mojatatu.com/
      
      v2->v3: https://lore.kernel.org/all/20230825155148.659895-1-pctammela@mojatatu.com/
         - Added changes that were left in the working tree (Jakub)
         - Fixed two typos in commit message titles
         - Added Victor tags
      
      v1->v2: https://lore.kernel.org/all/20230818163544.351104-1-pctammela@mojatatu.com/
         - Drop u32 updates
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ca5ab963
    • Pedro Tammela's avatar
      net/sched: cls_route: make netlink errors meaningful · ef765c25
      Pedro Tammela authored
      Use netlink extended ack and parsing policies to return more meaningful
      errors instead of the relying solely on errnos.
      Reviewed-by: default avatarVictor Nogueira <victor@mojatatu.com>
      Signed-off-by: default avatarPedro Tammela <pctammela@mojatatu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ef765c25
    • Pedro Tammela's avatar
      selftests/tc-testing: cls_u32: add tests for classid · e2f2fb3c
      Pedro Tammela authored
      As discussed in '3044b16e', cls_u32 was handling the use of classid
      incorrectly. Add a test to check if it's conforming to the correct
      behaviour.
      Reviewed-by: default avatarVictor Nogueira <victor@mojatatu.com>
      Signed-off-by: default avatarPedro Tammela <pctammela@mojatatu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e2f2fb3c
    • Pedro Tammela's avatar
      selftests/tc-testing: cls_route: add tests for classid · 7c339083
      Pedro Tammela authored
      As discussed in 'b80b829e', cls_route was handling the use of classid
      incorrectly. Add a test to check if it's conforming to the correct
      behaviour.
      Reviewed-by: default avatarVictor Nogueira <victor@mojatatu.com>
      Signed-off-by: default avatarPedro Tammela <pctammela@mojatatu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7c339083
    • Pedro Tammela's avatar
      selftests/tc-testing: cls_fw: add tests for classid · 70ad4333
      Pedro Tammela authored
      As discussed in '76e42ae8', cls_fw was handling the use of classid
      incorrectly. Add a few tests to check if it's conforming to the correct
      behaviour.
      Reviewed-by: default avatarVictor Nogueira <victor@mojatatu.com>
      Signed-off-by: default avatarPedro Tammela <pctammela@mojatatu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      70ad4333
    • Corinna Vinschen's avatar
      igb: clean up in all error paths when enabling SR-IOV · bc6ed2fa
      Corinna Vinschen authored
      After commit 50f30349 ("igb: Enable SR-IOV after reinit"), removing
      the igb module could hang or crash (depending on the machine) when the
      module has been loaded with the max_vfs parameter set to some value != 0.
      
      In case of one test machine with a dual port 82580, this hang occurred:
      
      [  232.480687] igb 0000:41:00.1: removed PHC on enp65s0f1
      [  233.093257] igb 0000:41:00.1: IOV Disabled
      [  233.329969] pcieport 0000:40:01.0: AER: Multiple Uncorrected (Non-Fatal) err0
      [  233.340302] igb 0000:41:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fata)
      [  233.352248] igb 0000:41:00.0:   device [8086:1516] error status/mask=00100000
      [  233.361088] igb 0000:41:00.0:    [20] UnsupReq               (First)
      [  233.368183] igb 0000:41:00.0: AER:   TLP Header: 40000001 0000040f cdbfc00c c
      [  233.376846] igb 0000:41:00.1: PCIe Bus Error: severity=Uncorrected (Non-Fata)
      [  233.388779] igb 0000:41:00.1:   device [8086:1516] error status/mask=00100000
      [  233.397629] igb 0000:41:00.1:    [20] UnsupReq               (First)
      [  233.404736] igb 0000:41:00.1: AER:   TLP Header: 40000001 0000040f cdbfc00c c
      [  233.538214] pci 0000:41:00.1: AER: can't recover (no error_detected callback)
      [  233.538401] igb 0000:41:00.0: removed PHC on enp65s0f0
      [  233.546197] pcieport 0000:40:01.0: AER: device recovery failed
      [  234.157244] igb 0000:41:00.0: IOV Disabled
      [  371.619705] INFO: task irq/35-aerdrv:257 blocked for more than 122 seconds.
      [  371.627489]       Not tainted 6.4.0-dirty #2
      [  371.632257] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this.
      [  371.641000] task:irq/35-aerdrv   state:D stack:0     pid:257   ppid:2      f0
      [  371.650330] Call Trace:
      [  371.653061]  <TASK>
      [  371.655407]  __schedule+0x20e/0x660
      [  371.659313]  schedule+0x5a/0xd0
      [  371.662824]  schedule_preempt_disabled+0x11/0x20
      [  371.667983]  __mutex_lock.constprop.0+0x372/0x6c0
      [  371.673237]  ? __pfx_aer_root_reset+0x10/0x10
      [  371.678105]  report_error_detected+0x25/0x1c0
      [  371.682974]  ? __pfx_report_normal_detected+0x10/0x10
      [  371.688618]  pci_walk_bus+0x72/0x90
      [  371.692519]  pcie_do_recovery+0xb2/0x330
      [  371.696899]  aer_process_err_devices+0x117/0x170
      [  371.702055]  aer_isr+0x1c0/0x1e0
      [  371.705661]  ? __set_cpus_allowed_ptr+0x54/0xa0
      [  371.710723]  ? __pfx_irq_thread_fn+0x10/0x10
      [  371.715496]  irq_thread_fn+0x20/0x60
      [  371.719491]  irq_thread+0xe6/0x1b0
      [  371.723291]  ? __pfx_irq_thread_dtor+0x10/0x10
      [  371.728255]  ? __pfx_irq_thread+0x10/0x10
      [  371.732731]  kthread+0xe2/0x110
      [  371.736243]  ? __pfx_kthread+0x10/0x10
      [  371.740430]  ret_from_fork+0x2c/0x50
      [  371.744428]  </TASK>
      
      The reproducer was a simple script:
      
        #!/bin/sh
        for i in `seq 1 5`; do
          modprobe -rv igb
          modprobe -v igb max_vfs=1
          sleep 1
          modprobe -rv igb
        done
      
      It turned out that this could only be reproduce on 82580 (quad and
      dual-port), but not on 82576, i350 and i210.  Further debugging showed
      that igb_enable_sriov()'s call to pci_enable_sriov() is failing, because
      dev->is_physfn is 0 on 82580.
      
      Prior to commit 50f30349 ("igb: Enable SR-IOV after reinit"),
      igb_enable_sriov() jumped into the "err_out" cleanup branch.  After this
      commit it only returned the error code.
      
      So the cleanup didn't take place, and the incorrect VF setup in the
      igb_adapter structure fooled the igb driver into assuming that VFs have
      been set up where no VF actually existed.
      
      Fix this problem by cleaning up again if pci_enable_sriov() fails.
      
      Fixes: 50f30349 ("igb: Enable SR-IOV after reinit")
      Signed-off-by: default avatarCorinna Vinschen <vinschen@redhat.com>
      Reviewed-by: default avatarAkihiko Odaki <akihiko.odaki@daynix.com>
      Tested-by: default avatarRafal Romanowski <rafal.romanowski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bc6ed2fa
    • Vadim Fedorenko's avatar
      ixgbe: fix timestamp configuration code · 3c44191d
      Vadim Fedorenko authored
      The commit in fixes introduced flags to control the status of hardware
      configuration while processing packets. At the same time another structure
      is used to provide configuration of timestamper to user-space applications.
      The way it was coded makes this structures go out of sync easily. The
      repro is easy for 82599 chips:
      
      [root@hostname ~]# hwstamp_ctl -i eth0 -r 12 -t 1
      current settings:
      tx_type 0
      rx_filter 0
      new settings:
      tx_type 1
      rx_filter 12
      
      The eth0 device is properly configured to timestamp any PTPv2 events.
      
      [root@hostname ~]# hwstamp_ctl -i eth0 -r 1 -t 1
      current settings:
      tx_type 1
      rx_filter 12
      SIOCSHWTSTAMP failed: Numerical result out of range
      The requested time stamping mode is not supported by the hardware.
      
      The error is properly returned because HW doesn't support all packets
      timestamping. But the adapter->flags is cleared of timestamp flags
      even though no HW configuration was done. From that point no RX timestamps
      are received by user-space application. But configuration shows good
      values:
      
      [root@hostname ~]# hwstamp_ctl -i eth0
      current settings:
      tx_type 1
      rx_filter 12
      
      Fix the issue by applying new flags only when the HW was actually
      configured.
      
      Fixes: a9763f3c ("ixgbe: Update PTP to support X550EM_x devices")
      Signed-off-by: default avatarVadim Fedorenko <vadim.fedorenko@linux.dev>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3c44191d
    • Andy Gospodarek's avatar
      MAINTAINERS: update tg3 maintainer list · a4a09ac6
      Andy Gospodarek authored
      Signed-off-by: default avatarAndy Gospodarek <gospo@broadcom.com>
      Signed-off-by: Pavan Chebbi pavan.chebbi@broadcom.com
      Signed-off-by: default avatarSiva Reddy Kallam <siva.kallam@broadcom.com>
      Signed-off-by: default avatarPrashant Sreedharan <prashant.sreedharan@broadcom.com>
      Reviewed-by: default avatarMichael Chan <mchan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a4a09ac6
    • Christophe JAILLET's avatar
      net: hinic: Use devm_kasprintf() · 9cc91173
      Christophe JAILLET authored
      Use devm_kasprintf() instead of hand writing it.
      This is less verbose and less error prone.
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9cc91173
    • Ulf Hansson's avatar
      pmdomain: Rename the genpd subsystem to pmdomain · e2ad626f
      Ulf Hansson authored
      It has been pointed out that naming a subsystem "genpd" isn't very
      self-explanatory and the acronym itself that means Generic PM Domain, is
      known only by a limited group of people.
      
      In a way to improve the situation, let's rename the subsystem to pmdomain,
      which ideally should indicate that this is about so called Power Domains or
      "PM domains" as we often also use within the Linux Kernel terminology.
      Suggested-by: default avatarRafael J. Wysocki <rafael@kernel.org>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Acked-by: default avatarRafael J. Wysocki <rafael@kernel.org>
      Acked-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Link: https://lore.kernel.org/r/20230912221127.487327-1-ulf.hansson@linaro.org
      e2ad626f