1. 05 Apr, 2022 1 commit
  2. 29 Mar, 2022 7 commits
    • Jeremy Sowden's avatar
      netfilter: bitwise: fix reduce comparisons · 31818213
      Jeremy Sowden authored
      The `nft_bitwise_reduce` and `nft_bitwise_fast_reduce` functions should
      compare the bitwise operation in `expr` with the tracked operation
      associated with the destination register of `expr`.  However, instead of
      being called on `expr` and `track->regs[priv->dreg].selector`,
      `nft_expr_priv` is called on `expr` twice, so both reduce functions
      return true even when the operations differ.
      
      Fixes: be5650f8 ("netfilter: nft_bitwise: track register operations")
      Signed-off-by: default avatarJeremy Sowden <jeremy@azazel.net>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      31818213
    • Michael Walle's avatar
      net: lan966x: fix kernel oops on ioctl when I/F is down · ad7da1ce
      Michael Walle authored
      ioctls handled by phy_mii_ioctl() will cause a kernel oops when the
      interface is down. Fix it by making sure there is a PHY attached.
      
      Fixes: 735fec99 ("net: lan966x: Implement SIOCSHWTSTAMP and SIOCGHWTSTAMP")
      Signed-off-by: default avatarMichael Walle <michael@walle.cc>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Link: https://lore.kernel.org/r/20220328220350.3118969-1-michael@walle.ccSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      ad7da1ce
    • Paolo Abeni's avatar
      Merge branch 'fix-uaf-bugs-caused-by-ax25_release' · 807ca64e
      Paolo Abeni authored
      Duoming Zhou says:
      
      ====================
      Fix UAF bugs caused by ax25_release()
      
      The first patch fixes UAF bugs in ax25_send_control, and
      the second patch fixes UAF bugs in ax25 timers.
      ====================
      
      Link: https://lore.kernel.org/r/cover.1648472006.git.duoming@zju.edu.cnSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      807ca64e
    • Duoming Zhou's avatar
      ax25: Fix UAF bugs in ax25 timers · 82e31755
      Duoming Zhou authored
      There are race conditions that may lead to UAF bugs in
      ax25_heartbeat_expiry(), ax25_t1timer_expiry(), ax25_t2timer_expiry(),
      ax25_t3timer_expiry() and ax25_idletimer_expiry(), when we call
      ax25_release() to deallocate ax25_dev.
      
      One of the UAF bugs caused by ax25_release() is shown below:
      
            (Thread 1)                    |      (Thread 2)
      ax25_dev_device_up() //(1)          |
      ...                                 | ax25_kill_by_device()
      ax25_bind()          //(2)          |
      ax25_connect()                      | ...
       ax25_std_establish_data_link()     |
        ax25_start_t1timer()              | ax25_dev_device_down() //(3)
         mod_timer(&ax25->t1timer,..)     |
                                          | ax25_release()
         (wait a time)                    |  ...
                                          |  ax25_dev_put(ax25_dev) //(4)FREE
         ax25_t1timer_expiry()            |
          ax25->ax25_dev->values[..] //USE|  ...
           ...                            |
      
      We increase the refcount of ax25_dev in position (1) and (2), and
      decrease the refcount of ax25_dev in position (3) and (4).
      The ax25_dev will be freed in position (4) and be used in
      ax25_t1timer_expiry().
      
      The fail log is shown below:
      ==============================================================
      
      [  106.116942] BUG: KASAN: use-after-free in ax25_t1timer_expiry+0x1c/0x60
      [  106.116942] Read of size 8 at addr ffff88800bda9028 by task swapper/0/0
      [  106.116942] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.17.0-06123-g0905eec574
      [  106.116942] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-14
      [  106.116942] Call Trace:
      ...
      [  106.116942]  ax25_t1timer_expiry+0x1c/0x60
      [  106.116942]  call_timer_fn+0x122/0x3d0
      [  106.116942]  __run_timers.part.0+0x3f6/0x520
      [  106.116942]  run_timer_softirq+0x4f/0xb0
      [  106.116942]  __do_softirq+0x1c2/0x651
      ...
      
      This patch adds del_timer_sync() in ax25_release(), which could ensure
      that all timers stop before we deallocate ax25_dev.
      Signed-off-by: default avatarDuoming Zhou <duoming@zju.edu.cn>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      82e31755
    • Duoming Zhou's avatar
      ax25: fix UAF bug in ax25_send_control() · 5352a761
      Duoming Zhou authored
      There are UAF bugs in ax25_send_control(), when we call ax25_release()
      to deallocate ax25_dev. The possible race condition is shown below:
      
            (Thread 1)              |     (Thread 2)
      ax25_dev_device_up() //(1)    |
                                    | ax25_kill_by_device()
      ax25_bind()          //(2)    |
      ax25_connect()                | ...
       ax25->state = AX25_STATE_1   |
       ...                          | ax25_dev_device_down() //(3)
      
            (Thread 3)
      ax25_release()                |
       ax25_dev_put()  //(4) FREE   |
       case AX25_STATE_1:           |
        ax25_send_control()         |
         alloc_skb()       //USE    |
      
      The refcount of ax25_dev increases in position (1) and (2), and
      decreases in position (3) and (4). The ax25_dev will be freed
      before dereference sites in ax25_send_control().
      
      The following is part of the report:
      
      [  102.297448] BUG: KASAN: use-after-free in ax25_send_control+0x33/0x210
      [  102.297448] Read of size 8 at addr ffff888009e6e408 by task ax25_close/602
      [  102.297448] Call Trace:
      [  102.303751]  ax25_send_control+0x33/0x210
      [  102.303751]  ax25_release+0x356/0x450
      [  102.305431]  __sock_release+0x6d/0x120
      [  102.305431]  sock_close+0xf/0x20
      [  102.305431]  __fput+0x11f/0x420
      [  102.305431]  task_work_run+0x86/0xd0
      [  102.307130]  get_signal+0x1075/0x1220
      [  102.308253]  arch_do_signal_or_restart+0x1df/0xc00
      [  102.308253]  exit_to_user_mode_prepare+0x150/0x1e0
      [  102.308253]  syscall_exit_to_user_mode+0x19/0x50
      [  102.308253]  do_syscall_64+0x48/0x90
      [  102.308253]  entry_SYSCALL_64_after_hwframe+0x44/0xae
      [  102.308253] RIP: 0033:0x405ae7
      
      This patch defers the free operation of ax25_dev and net_device after
      all corresponding dereference sites in ax25_release() to avoid UAF.
      
      Fixes: 9fd75b66 ("ax25: Fix refcount leaks caused by ax25_cb_del()")
      Signed-off-by: default avatarDuoming Zhou <duoming@zju.edu.cn>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      5352a761
    • Martin Varghese's avatar
      openvswitch: Fixed nd target mask field in the flow dump. · f19c4445
      Martin Varghese authored
      IPv6 nd target mask was not getting populated in flow dump.
      
      In the function __ovs_nla_put_key the icmp code mask field was checked
      instead of icmp code key field to classify the flow as neighbour discovery.
      
      ufid:bdfbe3e5-60c2-43b0-a5ff-dfcac1c37328, recirc_id(0),dp_hash(0/0),
      skb_priority(0/0),in_port(ovs-nm1),skb_mark(0/0),ct_state(0/0),
      ct_zone(0/0),ct_mark(0/0),ct_label(0/0),
      eth(src=00:00:00:00:00:00/00:00:00:00:00:00,
      dst=00:00:00:00:00:00/00:00:00:00:00:00),
      eth_type(0x86dd),
      ipv6(src=::/::,dst=::/::,label=0/0,proto=58,tclass=0/0,hlimit=0/0,frag=no),
      icmpv6(type=135,code=0),
      nd(target=2001::2/::,
      sll=00:00:00:00:00:00/00:00:00:00:00:00,
      tll=00:00:00:00:00:00/00:00:00:00:00:00),
      packets:10, bytes:860, used:0.504s, dp:ovs, actions:ovs-nm2
      
      Fixes: e6445719 (openvswitch: Restructure datapath.c and flow.c)
      Signed-off-by: default avatarMartin Varghese <martin.varghese@nokia.com>
      Link: https://lore.kernel.org/r/20220328054148.3057-1-martinvarghesenokia@gmail.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      f19c4445
    • Linus Torvalds's avatar
      Merge tag 'net-5.18-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · d717e4ca
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from netfilter.
      
        Current release - regressions:
      
         - llc: only change llc->dev when bind() succeeds, fix null-deref
      
        Current release - new code bugs:
      
         - smc: fix a memory leak in smc_sysctl_net_exit()
      
         - dsa: realtek: make interface drivers depend on OF
      
        Previous releases - regressions:
      
         - sched: act_ct: fix ref leak when switching zones
      
        Previous releases - always broken:
      
         - netfilter: egress: report interface as outgoing
      
         - vsock/virtio: enable VQs early on probe and finish the setup before
           using them
      
        Misc:
      
         - memcg: enable accounting for nft objects"
      
      * tag 'net-5.18-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (39 commits)
        Revert "selftests: net: Add tls config dependency for tls selftests"
        net/smc: Send out the remaining data in sndbuf before close
        net: move net_unlink_todo() out of the header
        net: dsa: bcm_sf2_cfp: fix an incorrect NULL check on list iterator
        net: bnxt_ptp: fix compilation error
        selftests: net: Add tls config dependency for tls selftests
        memcg: enable accounting for nft objects
        net/sched: act_ct: fix ref leak when switching zones
        net/smc: fix a memory leak in smc_sysctl_net_exit()
        selftests: tls: skip cmsg_to_pipe tests with TLS=n
        octeontx2-af: initialize action variable
        net: sparx5: switchdev: fix possible NULL pointer dereference
        net/x25: Fix null-ptr-deref caused by x25_disconnect
        qlcnic: dcb: default to returning -EOPNOTSUPP
        net: sparx5: depends on PTP_1588_CLOCK_OPTIONAL
        net: hns3: fix phy can not link up when autoneg off and reset
        net: hns3: add NULL pointer check for hns3_set/get_ringparam()
        net: hns3: add netdev reset check for hns3_set_tunable()
        net: hns3: clean residual vf config after disable sriov
        net: hns3: add max order judgement for tx spare buffer
        ...
      d717e4ca
  3. 28 Mar, 2022 22 commits
    • Jakub Kicinski's avatar
      Revert "selftests: net: Add tls config dependency for tls selftests" · 20695e9a
      Jakub Kicinski authored
      This reverts commit d9142e1c.
      
      The test is supposed to run cleanly with TLS is disabled,
      to test compatibility with TCP behavior. I can't repro
      the failure [1], the problem should be debugged rather
      than papered over.
      
      Link: https://lore.kernel.org/all/20220325161203.7000698c@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com/ [1]
      Fixes: d9142e1c ("selftests: net: Add tls config dependency for tls selftests")
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Link: https://lore.kernel.org/r/20220328212904.2685395-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      20695e9a
    • Wen Gu's avatar
      net/smc: Send out the remaining data in sndbuf before close · 906b3d64
      Wen Gu authored
      The current autocork algorithms will delay the data transmission
      in BH context to smc_release_cb() when sock_lock is hold by user.
      
      So there is a possibility that when connection is being actively
      closed (sock_lock is hold by user now), some corked data still
      remains in sndbuf, waiting to be sent by smc_release_cb(). This
      will cause:
      
      - smc_close_stream_wait(), which is called under the sock_lock,
        has a high probability of timeout because data transmission is
        delayed until sock_lock is released.
      
      - Unexpected data sends may happen after connction closed and use
        the rtoken which has been deleted by remote peer through
        LLC_DELETE_RKEY messages.
      
      So this patch will try to send out the remaining corked data in
      sndbuf before active close process, to ensure data integrity and
      avoid unexpected data transmission after close.
      Reported-by: default avatarGuangguan Wang <guangguan.wang@linux.alibaba.com>
      Fixes: 6b88af83 ("net/smc: don't send in the BH context if sock_owned_by_user")
      Signed-off-by: default avatarWen Gu <guwen@linux.alibaba.com>
      Acked-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
      Link: https://lore.kernel.org/r/1648447836-111521-1-git-send-email-guwen@linux.alibaba.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      906b3d64
    • Linus Torvalds's avatar
      Merge tag 'kgdb-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux · cffb2b72
      Linus Torvalds authored
      Pull kgdb update from Daniel Thompson:
       "Only a single patch this cycle. Fix an obvious mistake with the kdb
        memory accessors.
      
        It was a stupid mistake (to/from backwards) but it has been there for
        a long time since many architectures tolerated it with surprisingly
        good grace"
      
      * tag 'kgdb-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux:
        kdb: Fix the putarea helper function
      cffb2b72
    • Linus Torvalds's avatar
      Merge tag 'hexagon-5.18-0' of git://git.kernel.org/pub/scm/linux/kernel/git/bcain/linux · 023f3fef
      Linus Torvalds authored
      Pull hexagon update from Brian Cain:
       "Maintainer email update"
      
      * tag 'hexagon-5.18-0' of git://git.kernel.org/pub/scm/linux/kernel/git/bcain/linux:
        MAINTAINERS: update hexagon maintainer email, tree
      023f3fef
    • Linus Torvalds's avatar
      Merge tag 'microblaze-v5.18' of git://git.monstr.eu/linux-2.6-microblaze · b83d85a5
      Linus Torvalds authored
      Pull microblaze updates from Michal Simek:
      
       - Small fixups
      
       - Remove unused pci_phys_mem_access_prot()
      
      * tag 'microblaze-v5.18' of git://git.monstr.eu/linux-2.6-microblaze:
        microblaze/PCI: Remove pci_phys_mem_access_prot() dead code
        microblaze: add const to of_device_id
        microblaze: fix typo in a comment
      b83d85a5
    • Johannes Berg's avatar
      net: move net_unlink_todo() out of the header · f32404ae
      Johannes Berg authored
      There's no reason for this to be in netdevice.h, it's all
      just used in dev.c. Also make it no longer inline and let
      the compiler decide to do that by itself.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Link: https://lore.kernel.org/r/20220325225023.f49b9056fe1c.I6b901a2df00000837a9bd251a8dd259bd23f5ded@changeidSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f32404ae
    • Xiaomeng Tong's avatar
      net: dsa: bcm_sf2_cfp: fix an incorrect NULL check on list iterator · 6da69b1d
      Xiaomeng Tong authored
      The bug is here:
      	return rule;
      
      The list iterator value 'rule' will *always* be set and non-NULL
      by list_for_each_entry(), so it is incorrect to assume that the
      iterator value will be NULL if the list is empty or no element
      is found.
      
      To fix the bug, return 'rule' when found, otherwise return NULL.
      
      Fixes: ae7a5aff ("net: dsa: bcm_sf2: Keep copy of inserted rules")
      Reviewed-by: default avatarVladimir Oltean <olteanv@gmail.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarXiaomeng Tong <xiam0nd.tong@gmail.com>
      Link: https://lore.kernel.org/r/20220328032431.22538-1-xiam0nd.tong@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6da69b1d
    • Linus Torvalds's avatar
      Merge tag 'livepatching-for-5.18' of... · d111c9f0
      Linus Torvalds authored
      Merge tag 'livepatching-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching
      
      Pull livepatching updates from Petr Mladek:
      
       - Forced transitions block only to-be-removed livepatches [Chengming]
      
       - Detect when ftrace handler could not be disabled in self-tests [David]
      
       - Calm down warning from a static analyzer [Tom]
      
      * tag 'livepatching-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching:
        livepatch: Reorder to use before freeing a pointer
        livepatch: Don't block removal of patches that are safe to unload
        livepatch: Skip livepatch tests if ftrace cannot be configured
      d111c9f0
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.18-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · a701f370
      Linus Torvalds authored
      Pull xen updates from Juergen Gross:
      
       - A bunch of minor cleanups
      
       - A fix for kexec in Xen dom0 when executed on a high cpu number
      
       - A fix for resuming after suspend of a Xen guest with assigned PCI
         devices
      
       - A fix for a crash due to not disabled preemption when resuming as Xen
         dom0
      
      * tag 'for-linus-5.18-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen: fix is_xen_pmu()
        xen: don't hang when resuming PCI device
        arch:x86:xen: Remove unnecessary assignment in xen_apic_read()
        xen/grant-table: remove readonly parameter from functions
        xen/grant-table: remove gnttab_*transfer*() functions
        drivers/xen: use helper macro __ATTR_RW
        x86/xen: Fix kerneldoc warning
        xen: delay xen_hvm_init_time_ops() if kdump is boot on vcpu>=32
        xen: use time_is_before_eq_jiffies() instead of open coding it
      a701f370
    • Brian Cain's avatar
      MAINTAINERS: update hexagon maintainer email, tree · b0cf9b4b
      Brian Cain authored
      Some email infrastructure changes required this switch.
      Signed-off-by: default avatarBrian Cain <bcain@quicinc.com>
      b0cf9b4b
    • Damien Le Moal's avatar
      net: bnxt_ptp: fix compilation error · dcf50006
      Damien Le Moal authored
      The Broadcom bnxt_ptp driver does not compile with GCC 11.2.2 when
      CONFIG_WERROR is enabled. The following error is generated:
      
      drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c: In function ‘bnxt_ptp_enable’:
      drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c:400:43: error: array
      subscript 255 is above array bounds of ‘struct pps_pin[4]’
      [-Werror=array-bounds]
        400 |  ptp->pps_info.pins[pin_id].event = BNXT_PPS_EVENT_EXTERNAL;
            |  ~~~~~~~~~~~~~~~~~~^~~~~~~~
      In file included from drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c:20:
      drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h:75:24: note: while
      referencing ‘pins’
         75 |         struct pps_pin pins[BNXT_MAX_TSIO_PINS];
            |                        ^~~~
      cc1: all warnings being treated as errors
      
      This is due to the function ptp_find_pin() returning a pin ID of -1 when
      a valid pin is not found and this error never being checked.
      Change the TSIO_PIN_VALID() function to also check that a pin ID is not
      negative and use this macro in bnxt_ptp_enable() to check the result of
      the calls to ptp_find_pin() to return an error early for invalid pins.
      This fixes the compilation error.
      
      Cc: <stable@vger.kernel.org>
      Fixes: 9e518f25 ("bnxt_en: 1PPS functions to configure TSIO pins")
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
      Reviewed-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Link: https://lore.kernel.org/r/20220328062708.207079-1-damien.lemoal@opensource.wdc.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      dcf50006
    • Linus Torvalds's avatar
      Merge tag 'tty-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 72030621
      Linus Torvalds authored
      Pull tty/serial driver updates from Greg KH:
       "Here are the big set of tty and serial driver changes for 5.18-rc1.
      
        Nothing major, some more good cleanups from Jiri and 2 new serial
        drivers. Highlights include:
      
         - termbits cleanups
      
         - export symbol cleanups and other core cleanups from Jiri Slaby
      
         - new sunplus and mvebu uart drivers (amazing that people are still
           creating new uarts...)
      
         - samsung serial driver cleanups
      
         - ldisc 29 is now "reserved" for experimental/development line
           disciplines
      
         - lots of other tiny fixes and cleanups to serial drivers and
           bindings
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'tty-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (104 commits)
        vt_ioctl: fix potential spectre v1 in VT_DISALLOCATE
        serial: 8250: fix XOFF/XON sending when DMA is used
        tty: serial: samsung: Add ARTPEC-8 support
        dt-bindings: serial: samsung: Add ARTPEC-8 UART
        serial: sc16is7xx: Clear RS485 bits in the shutdown
        tty: serial: samsung: simplify getting OF match data
        tty: serial: samsung: constify variables and pointers
        tty: serial: samsung: constify s3c24xx_serial_drv_data members
        tty: serial: samsung: constify UART name
        tty: serial: samsung: constify s3c24xx_serial_drv_data
        tty: serial: samsung: reduce number of casts
        tty: serial: samsung: embed s3c2410_uartcfg in parent structure
        tty: serial: samsung: embed s3c24xx_uart_info in parent structure
        serial: 8250_tegra: mark acpi_device_id as unused with !ACPI
        tty: serial: bcm63xx: use more precise Kconfig symbol
        serial: SERIAL_SUNPLUS should depend on ARCH_SUNPLUS
        tty: serial: jsm: fix two assignments in if conditions
        tty: serial: jsm: remove redundant assignments to variable linestatus
        serial: 8250_mtk: make two read-only arrays static const
        serial: samsung_tty: do not unlock port->lock for uart_write_wakeup()
        ...
      72030621
    • Linus Torvalds's avatar
      Merge tag 'staging-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · dfdc1de6
      Linus Torvalds authored
      Pull staging driver updates from Greg KH:
       "Here is the big set of staging driver updates for 5.18-rc1.
      
        Loads of tiny cleanups for almost all staging drivers in here, nothing
        major at all. Highlights include:
      
         - remove the ashmem Android driver. It is long-dead and if there are
           any legacy userspace applications still using it, the Android
           kernel images will maintain it, the community shouldn't care about
           it anymore
      
         - wfx wifi driver major cleanups. Should be ready to merge out of
           staging soon, and will coordinate with the wifi maintainers after
           -rc1 is out
      
         - major cleanups and unwinding of the layers of the r8188eu driver.
           It's amazing just how many unneeded layers of abstraction is in
           there, just when we think it's done, another is found...
      
         - lots of tiny coding style cleanups in many other staging drivers.
      
        All have been in linux-next for a while with no reported problems"
      
      * tag 'staging-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (455 commits)
        staging: r8188eu: remove unnecessary memset in r8188eu
        staging: greybus: introduce pwm_ops::apply
        staging: rts5208: Resolve checkpatch.pl issues.
        staging: sm750fb: fix naming style
        staging: fbtft: Consider type of init sequence values in fbtft_init_display()
        staging: fbtft: Constify buf parameter in fbtft_dbg_hex()
        staging: mmal-vchiq: clear redundant item named bulk_scratch
        mips: dts: ralink: add MT7621 SoC
        staging: r8188eu: remove some unused local ieee80211 macros
        staging: r8188eu: make rtl8188e_process_phy_info static
        staging: r8188eu: remove unused function prototype
        staging: r8188eu: remove three unused receive defines
        staging: r8188eu: remove unnecessary initializations
        staging: rtl8192e: Fix spelling mistake "RESQUEST" -> "REQUEST"
        MAINTAINERS: remove the obsolete file entry for staging in ANDROID DRIVERS
        staging: r8188eu: proper error handling in rtw_init_drv_sw
        staging: r8188eu: call _cancel_timer_ex from _rtw_free_recv_priv
        staging: vt6656: Removed unused variable vt3342_vnt_threshold
        staging: vt6656: Removed unused variable bb_vga_0
        staging: remove ashmem
        ...
      dfdc1de6
    • Linus Torvalds's avatar
      Merge tag 'driver-core-5.18-rc1' of... · 266d17a8
      Linus Torvalds authored
      Merge tag 'driver-core-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core updates from Greg KH:
       "Here is the set of driver core changes for 5.18-rc1.
      
        Not much here, primarily it was a bunch of cleanups and small updates:
      
         - kobj_type cleanups for default_groups
      
         - documentation updates
      
         - firmware loader minor changes
      
         - component common helper added and take advantage of it in many
           drivers (the largest part of this pull request).
      
        All of these have been in linux-next for a while with no reported
        problems"
      
      * tag 'driver-core-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (54 commits)
        Documentation: update stable review cycle documentation
        drivers/base/dd.c : Remove the initial value of the global variable
        Documentation: update stable tree link
        Documentation: add link to stable release candidate tree
        devres: fix typos in comments
        Documentation: add note block surrounding security patch note
        samples/kobject: Use sysfs_emit instead of sprintf
        base: soc: Make soc_device_match() simpler and easier to read
        driver core: dd: fix return value of __setup handler
        driver core: Refactor sysfs and drv/bus remove hooks
        driver core: Refactor multiple copies of device cleanup
        scripts: get_abi.pl: Fix typo in help message
        kernfs: fix typos in comments
        kernfs: remove unneeded #if 0 guard
        ALSA: hda/realtek: Make use of the helper component_compare_dev_name
        video: omapfb: dss: Make use of the helper component_compare_dev
        power: supply: ab8500: Make use of the helper component_compare_dev
        ASoC: codecs: wcd938x: Make use of the helper component_compare/release_of
        iommu/mediatek: Make use of the helper component_compare/release_of
        drm: of: Make use of the helper component_release_of
        ...
      266d17a8
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 02e2af20
      Linus Torvalds authored
      Pull char/misc and other driver updates from Greg KH:
       "Here is the big set of char/misc and other small driver subsystem
        updates for 5.18-rc1.
      
        Included in here are merges from driver subsystems which contain:
      
         - iio driver updates and new drivers
      
         - fsi driver updates
      
         - fpga driver updates
      
         - habanalabs driver updates and support for new hardware
      
         - soundwire driver updates and new drivers
      
         - phy driver updates and new drivers
      
         - coresight driver updates
      
         - icc driver updates
      
        Individual changes include:
      
         - mei driver updates
      
         - interconnect driver updates
      
         - new PECI driver subsystem added
      
         - vmci driver updates
      
         - lots of tiny misc/char driver updates
      
        All of these have been in linux-next for a while with no reported
        problems"
      
      * tag 'char-misc-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (556 commits)
        firmware: google: Properly state IOMEM dependency
        kgdbts: fix return value of __setup handler
        firmware: sysfb: fix platform-device leak in error path
        firmware: stratix10-svc: add missing callback parameter on RSU
        arm64: dts: qcom: add non-secure domain property to fastrpc nodes
        misc: fastrpc: Add dma handle implementation
        misc: fastrpc: Add fdlist implementation
        misc: fastrpc: Add helper function to get list and page
        misc: fastrpc: Add support to secure memory map
        dt-bindings: misc: add fastrpc domain vmid property
        misc: fastrpc: check before loading process to the DSP
        misc: fastrpc: add secure domain support
        dt-bindings: misc: add property to support non-secure DSP
        misc: fastrpc: Add support to get DSP capabilities
        misc: fastrpc: add support for FASTRPC_IOCTL_MEM_MAP/UNMAP
        misc: fastrpc: separate fastrpc device from channel context
        dt-bindings: nvmem: brcm,nvram: add basic NVMEM cells
        dt-bindings: nvmem: make "reg" property optional
        nvmem: brcm_nvram: parse NVRAM content into NVMEM cells
        nvmem: dt-bindings: Fix the error of dt-bindings check
        ...
      02e2af20
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v5.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · ff61bc81
      Linus Torvalds authored
      Pull pin control updates from Linus Walleij:
       "No core changes this time. Just new driver code and improvements!
      
        New drivers:
      
         - New driver for the Broadcom BCM4908 SoC.
      
         - New subdriver for Tesla FSD (Full Self Driving) SoC, a derivative
           of the Samsung Exynos pin control driver.
      
         - New driver for the Amlogic Meson S4 SoC.
      
         - New driver for the Sunplus SP7021 SoC.
      
         - New driver for the Microsemi Ocelot family ServalT SoC.
      
         - New subdriver for Intel Alder Lake-M SoC.
      
         - New subdriver for Intel Ice Lake-N SoC, including PCH support.
      
         - New subdriver for Renesas R8A779F0 SoC.
      
         - New subdriver for Mediatek MT8186 SoC.
      
         - New subdriver for NXP Freescale i.MX93 SoC.
      
         - New driver for Nuvoton WPCM450 SoC.
      
         - New driver for Qualcomm SC8280XP SoC.
      
        Improvements:
      
         - Wakeup support on Samsung Exynos850 and ExynosAutov9.
      
         - Serious and voluminous maintenance cleanup and refactoring in the
           Renesas drivers. Mainly sharing similar data between the different
           SoC subdrivers.
      
         - Qualcomm SM8450 EGPIO support.
      
         - Drive strength support on the Mediatek MT8195.
      
         - Add some missing groups and functions to the Ralink RT2880"
      
      * tag 'pinctrl-v5.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (188 commits)
        pinctrl: mediatek: common-v1: fix semicolon.cocci warnings
        pinctrl: nuvoton: wpcm450: Fix build error without OF
        pinctrl: qcom-pmic-gpio: Add support for pm8450
        dt-bindings: pinctrl: aspeed: Update gfx node in example
        dt-bindings: pinctrl: rt2880: add missing pin groups and functions
        pinctrl: ingenic: Fix regmap on X series SoCs
        pinctrl: nuvoton: Fix return value check in wpcm450_gpio_register()
        pinctrl: nuvoton: wpcm450: off by one in wpcm450_gpio_register()
        pinctrl: nuvoton: wpcm450: select GENERIC_PINCTRL_GROUPS
        pinctrl: nuvoton: Fix sparse warning
        pinctrl: mediatek: mt8186: Account for probe refactoring
        pinctrl: mediatek: common-v1: Commonize spec_ies_smt_set callback
        pinctrl: mediatek: common-v1: Commonize spec_pupd callback
        pinctrl: mediatek: common-v1: Use common probe function
        pinctrl: mediatek: common-v1: Add common probe function
        pinctrl: mediatek: paris: Unify probe function by using OF match data
        pinctrl/rockchip: Add missing of_node_put() in rockchip_pinctrl_probe
        pinctrl: nomadik: Add missing of_node_put() in nmk_pinctrl_probe
        pinctrl: berlin: fix error return code of berlin_pinctrl_build_state()
        pinctrl: qcom: Introduce sc8280xp TLMM driver
        ...
      ff61bc81
    • Linus Torvalds's avatar
      Reinstate some of "swiotlb: rework "fix info leak with DMA_FROM_DEVICE"" · 901c7280
      Linus Torvalds authored
      Halil Pasic points out [1] that the full revert of that commit (revert
      in bddac7c1), and that a partial revert that only reverts the
      problematic case, but still keeps some of the cleanups is probably
      better.  
      
      And that partial revert [2] had already been verified by Oleksandr
      Natalenko to also fix the issue, I had just missed that in the long
      discussion.
      
      So let's reinstate the cleanups from commit aa6f8dcb ("swiotlb:
      rework "fix info leak with DMA_FROM_DEVICE""), and effectively only
      revert the part that caused problems.
      
      Link: https://lore.kernel.org/all/20220328013731.017ae3e3.pasic@linux.ibm.com/ [1]
      Link: https://lore.kernel.org/all/20220324055732.GB12078@lst.de/ [2]
      Link: https://lore.kernel.org/all/4386660.LvFx2qVVIh@natalenko.name/ [3]
      Suggested-by: default avatarHalil Pasic <pasic@linux.ibm.com>
      Tested-by: default avatarOleksandr Natalenko <oleksandr@natalenko.name>
      Cc: Christoph Hellwig" <hch@lst.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      901c7280
    • Naresh Kamboju's avatar
      selftests: net: Add tls config dependency for tls selftests · d9142e1c
      Naresh Kamboju authored
      selftest net tls test cases need TLS=m without this the test hangs.
      Enabling config TLS solves this problem and runs to complete.
        - CONFIG_TLS=m
      Reported-by: default avatarLinux Kernel Functional Testing <lkft@linaro.org>
      Signed-off-by: default avatarNaresh Kamboju <naresh.kamboju@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d9142e1c
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf · 2aa2f88c
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      The following patchset contains Netfilter fixes for net:
      
      1) Incorrect output device in nf_egress hook, from Phill Sutter.
      
      2) Preserve liberal flag in TCP conntrack state, reported by Sven Auhagen.
      
      3) Use GFP_KERNEL_ACCOUNT flag for nf_tables objects, from Vasily Averin.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2aa2f88c
    • Petr Mladek's avatar
      e7dbd4d5
    • Vasily Averin's avatar
      memcg: enable accounting for nft objects · 33758c89
      Vasily Averin authored
      nftables replaces iptables, but it lacks memcg accounting.
      
      This patch account most of the memory allocation associated with nft
      and should protect the host from misusing nft inside a memcg restricted
      container.
      Signed-off-by: default avatarVasily Averin <vvs@openvz.org>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      33758c89
    • Muchun Song's avatar
      mm: kfence: fix missing objcg housekeeping for SLAB · ae085d7f
      Muchun Song authored
      The objcg is not cleared and put for kfence object when it is freed,
      which could lead to memory leak for struct obj_cgroup and wrong
      statistics of NR_SLAB_RECLAIMABLE_B or NR_SLAB_UNRECLAIMABLE_B.
      
      Since the last freed object's objcg is not cleared,
      mem_cgroup_from_obj() could return the wrong memcg when this kfence
      object, which is not charged to any objcgs, is reallocated to other
      users.
      
      A real word issue [1] is caused by this bug.
      
      Link: https://lore.kernel.org/all/000000000000cabcb505dae9e577@google.com/ [1]
      Reported-by: syzbot+f8c45ccc7d5d45fc5965@syzkaller.appspotmail.com
      Fixes: d3fb45f3 ("mm, kfence: insert KFENCE hooks for SLAB")
      Signed-off-by: default avatarMuchun Song <songmuchun@bytedance.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Marco Elver <elver@google.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ae085d7f
  4. 27 Mar, 2022 10 commits
    • Stephen Rothwell's avatar
      f82da161
    • Linus Torvalds's avatar
      Merge tag 'landlock-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux · 29cbaa3e
      Linus Torvalds authored
      Pull landlock updates from Mickaël Salaün:
       "These two commits contain a minor fix for the sandboxer sample, and a
        Landlock ruleset FD name standardization"
      
      * tag 'landlock-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux:
        landlock: Use square brackets around "landlock-ruleset"
        samples/landlock: Fix path_list memory leak
      29cbaa3e
    • Linus Torvalds's avatar
      Merge tag 'mailbox-v5.18' of git://git.linaro.org/landing-teams/working/fujitsu/integration · 50d602d8
      Linus Torvalds authored
      Pull mailbox updates from Jassi Brar:
       "qcom:
         - add support for MSM8976
      
        mtk:
         - enable mt8186
         - add ADSP controller driver
      
        ti:
         - use poll mode during suspend
      
        tegra:
         - fix tx channel flush
      
        imx:
         - add i.MX8 SECO MU support
         - prepare for, and add iMX93 support"
      
      * tag 'mailbox-v5.18' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
        dt-bindings: mailbox: add definition for mt8186
        mailbox: ti-msgmgr: Operate mailbox in polled mode during system suspend
        mailbox: ti-msgmgr: Refactor message read during interrupt handler
        mailbox: imx: support i.MX93 S401 MU
        mailbox: imx: support dual interrupts
        mailbox: imx: extend irq to an array
        dt-bindings: mailbox: imx-mu: add i.MX93 S4 MU support
        dt-bindings: mailbox: imx-mu: add i.MX93 MU
        mailbox: imx: add i.MX8 SECO MU support
        mailbox: imx: introduce rxdb callback
        dt-bindings: mailbox: imx-mu: add i.MX8 SECO MU support
        mailbox: imx: enlarge timeout while reading/writing messages to SCFW
        mailbox: imx: fix crash in resume on i.mx8ulp
        mailbox: imx: fix wakeup failure from freeze mode
        mailbox: mediatek: add support for adsp mailbox controller
        dt-bindings: mailbox: mtk,adsp-mbox: add mtk adsp-mbox document
        mailbox: qcom-apcs-ipc: Add compatible for MSM8976 SoC
        dt-bindings: mailbox: Add compatible for the MSM8976
        mailbox: tegra-hsp: Flush whole channel
      50d602d8
    • Linus Torvalds's avatar
      Merge tag 'leds-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds · dfb0a0b7
      Linus Torvalds authored
      Pull LED updates from Pavel Machek:
       "Nothing major here, there are two drivers that need review and did not
        make it into this round"
      
      * tag 'leds-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds:
        leds: pca955x: Allow zero LEDs to be specified
        leds: pca955x: Make the gpiochip always expose all pins
        leds: simatic-ipc-leds: Don't directly deref ioremap_resource() returned ptr
        leds: simatic-ipc-leds: Make simatic_ipc_led_mem_res static
        leds: lm3692x: Return 0 from remove callback
        leds: sgm3140: Add ocs,ocp8110 compatible
        dt-bindings: vendor-prefixes: Add ocs prefix
        dt-bindings: leds: common: fix unit address in max77693 example
      dfb0a0b7
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-for-v5.18-2022-03-26' of... · 7b58b82b
      Linus Torvalds authored
      Merge tag 'perf-tools-for-v5.18-2022-03-26' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools updates from Arnaldo Carvalho de Melo:
       "New features:
      
        perf ftrace:
      
         - Add -n/--use-nsec option to the 'latency' subcommand.
      
           Default: usecs:
      
           $ sudo perf ftrace latency -T dput -a sleep 1
           #   DURATION     |      COUNT | GRAPH                          |
                0 - 1    us |    2098375 | #############################  |
                1 - 2    us |         61 |                                |
                2 - 4    us |         33 |                                |
                4 - 8    us |         13 |                                |
                8 - 16   us |        124 |                                |
               16 - 32   us |        123 |                                |
               32 - 64   us |          1 |                                |
               64 - 128  us |          0 |                                |
              128 - 256  us |          1 |                                |
              256 - 512  us |          0 |                                |
      
           Better granularity with nsec:
      
           $ sudo perf ftrace latency -T dput -a -n sleep 1
           #   DURATION     |      COUNT | GRAPH                          |
                0 - 1    us |          0 |                                |
                1 - 2    ns |          0 |                                |
                2 - 4    ns |          0 |                                |
                4 - 8    ns |          0 |                                |
                8 - 16   ns |          0 |                                |
               16 - 32   ns |          0 |                                |
               32 - 64   ns |          0 |                                |
               64 - 128  ns |    1163434 | ##############                 |
              128 - 256  ns |     914102 | #############                  |
              256 - 512  ns |        884 |                                |
              512 - 1024 ns |        613 |                                |
                1 - 2    us |         31 |                                |
                2 - 4    us |         17 |                                |
                4 - 8    us |          7 |                                |
                8 - 16   us |        123 |                                |
               16 - 32   us |         83 |                                |
      
        perf lock:
      
         - Add -c/--combine-locks option to merge lock instances in the same
           class into a single entry.
      
           # perf lock report -c
                          Name acquired contended avg wait(ns) total wait(ns) max wait(ns) min wait(ns)
      
                 rcu_read_lock   251225         0            0              0            0            0
            hrtimer_bases.lock    39450         0            0              0            0            0
           &sb->s_type->i_l...    10301         1          662            662          662          662
              ptlock_ptr(page)    10173         2          701           1402          760          642
           &(ei->i_block_re...     8732         0            0              0            0            0
                  &xa->xa_lock     8088         0            0              0            0            0
                   &base->lock     6705         0            0              0            0            0
                   &p->pi_lock     5549         0            0              0            0            0
           &dentry->d_lockr...     5010         4         1274           5097         1844          789
                     &ep->lock     3958         0            0              0            0            0
      
            - Add -F/--field option to customize the list of fields to output:
      
           $ perf lock report -F contended,wait_max -k avg_wait
                           Name contended max wait(ns) avg wait(ns)
      
                 slock-AF_INET6         1        23543        23543
              &lruvec->lru_lock         5        18317        11254
                 slock-AF_INET6         1        10379        10379
                     rcu_node_1         1         2104         2104
            &dentry->d_lockr...         1         1844         1844
            &dentry->d_lockr...         1         1672         1672
               &newf->file_lock        15         2279         1025
            &dentry->d_lockr...         1          792          792
      
         - Add --synth=no option for record, as there is no need to symbolize,
           lock names comes from the tracepoints.
      
        perf record:
      
         - Threaded recording, opt-in, via the new --threads command line
           option.
      
         - Improve AMD IBS (Instruction-Based Sampling) error handling
           messages.
      
        perf script:
      
         - Add 'brstackinsnlen' field (use it with -F) for branch stacks.
      
         - Output branch sample type in 'perf script'.
      
        perf report:
      
         - Add "addr_from" and "addr_to" sort dimensions.
      
         - Print branch stack entry type in 'perf report --dump-raw-trace'
      
         - Fix symbolization for chrooted workloads.
      
        Hardware tracing:
      
        Intel PT:
      
         - Add CFE (Control Flow Event) and EVD (Event Data) packets support.
      
         - Add MODE.Exec IFLAG bit support.
      
           Explanation about these features from the "Intel® 64 and IA-32
           architectures software developer’s manual combined volumes: 1, 2A,
           2B, 2C, 2D, 3A, 3B, 3C, 3D, and 4" PDF at:
      
              https://cdrdv2.intel.com/v1/dl/getContent/671200
      
           At page 3951:
            "32.2.4
      
             Event Trace is a capability that exposes details about the
             asynchronous events, when they are generated, and when their
             corresponding software event handler completes execution. These
             include:
      
              o Interrupts, including NMI and SMI, including the interrupt
                vector when defined.
      
              o Faults, exceptions including the fault vector.
      
                 - Page faults additionally include the page fault address,
                   when in context.
      
              o Event handler returns, including IRET and RSM.
      
              o VM exits and VM entries.¹
      
                 - VM exits include the values written to the “exit reason”
                   and “exit qualification” VMCS fields. INIT and SIPI events.
      
              o TSX aborts, including the abort status returned for the RTM
                instructions.
      
              o Shutdown.
      
             Additionally, it provides indication of the status of the
             Interrupt Flag (IF), to indicate when interrupts are masked"
      
        ARM CoreSight:
      
         - Use advertised caps/min_interval as default sample_period on ARM
           spe.
      
         - Update deduction of TRCCONFIGR register for branch broadcast on
           ARM's CoreSight ETM.
      
        Vendor Events (JSON):
      
        Intel:
      
         - Update events and metrics for: Alderlake, Broadwell, Broadwell DE,
           BroadwellX, CascadelakeX, Elkhartlake, Bonnell, Goldmont,
           GoldmontPlus, Westmere EP-DP, Haswell, HaswellX, Icelake, IcelakeX,
           Ivybridge, Ivytown, Jaketown, Knights Landing, Nehalem EP,
           Sandybridge, Silvermont, Skylake, Skylake Server, SkylakeX,
           Tigerlake, TremontX, Westmere EP-SP, and Westmere EX.
      
        ARM:
      
         - Add support for HiSilicon CPA PMU aliasing.
      
        perf stat:
      
         - Fix forked applications enablement of counters.
      
         - The 'slots' should only be printed on a different order than the
           one specified on the command line when 'topdown' events are
           present, fix it.
      
        Miscellaneous:
      
         - Sync msr-index, cpufeatures header files with the kernel sources.
      
         - Stop using some deprecated libbpf APIs in 'perf trace'.
      
         - Fix some spelling mistakes.
      
         - Refactor the maps pointers usage to pave the way for using refcount
           debugging.
      
         - Only offer the --tui option on perf top, report and annotate when
           perf was built with libslang.
      
         - Don't mention --to-ctf in 'perf data --help' when not linking with
           the required library, libbabeltrace.
      
         - Use ARRAY_SIZE() instead of ad hoc equivalent, spotted by
           array_size.cocci.
      
         - Enhance the matching of sub-commands abbreviations:
      	'perf c2c rec' -> 'perf c2c record'
      	'perf c2c recport -> error
      
         - Set build-id using build-id header on new mmap records.
      
         - Fix generation of 'perf --version' string.
      
        perf test:
      
         - Add test for the arm_spe event.
      
         - Add test to check unwinding using fame-pointer (fp) mode on arm64.
      
         - Make metric testing more robust in 'perf test'.
      
         - Add error message for unsupported branch stack cases.
      
        libperf:
      
         - Add API for allocating new thread map array.
      
         - Fix typo in perf_evlist__open() failure error messages in libperf
           tests.
      
        perf c2c:
      
         - Replace bitmap_weight() with bitmap_empty() where appropriate"
      
      * tag 'perf-tools-for-v5.18-2022-03-26' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (143 commits)
        perf evsel: Improve AMD IBS (Instruction-Based Sampling) error handling messages
        perf python: Add perf_env stubs that will be needed in evsel__open_strerror()
        perf tools: Enhance the matching of sub-commands abbreviations
        libperf tests: Fix typo in perf_evlist__open() failure error messages
        tools arm64: Import cputype.h
        perf lock: Add -F/--field option to control output
        perf lock: Extend struct lock_key to have print function
        perf lock: Add --synth=no option for record
        tools headers cpufeatures: Sync with the kernel sources
        tools headers cpufeatures: Sync with the kernel sources
        perf stat: Fix forked applications enablement of counters
        tools arch x86: Sync the msr-index.h copy with the kernel sources
        perf evsel: Make evsel__env() always return a valid env
        perf build-id: Fix spelling mistake "Cant" -> "Can't"
        perf header: Fix spelling mistake "could't" -> "couldn't"
        perf script: Add 'brstackinsnlen' for branch stacks
        perf parse-events: Move slots only with topdown
        perf ftrace latency: Update documentation
        perf ftrace latency: Add -n/--use-nsec option
        perf tools: Fix version kernel tag
        ...
      7b58b82b
    • Linus Torvalds's avatar
      Merge tag 'memblock-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock · 02f9a04d
      Linus Torvalds authored
      Pull memblock updates from Mike Rapoport:
       "Test suite and a small cleanup:
      
         - A small cleanup of unused variable in __next_mem_pfn_range_in_zone
      
         - Initial test suite to simulate memblock behaviour in userspace"
      
      * tag 'memblock-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: (27 commits)
        memblock tests: Add TODO and README files
        memblock tests: Add memblock_alloc_try_nid tests for bottom up
        memblock tests: Add memblock_alloc_try_nid tests for top down
        memblock tests: Add memblock_alloc_from tests for bottom up
        memblock tests: Add memblock_alloc_from tests for top down
        memblock tests: Add memblock_alloc tests for bottom up
        memblock tests: Add memblock_alloc tests for top down
        memblock tests: Add simulation of physical memory
        memblock tests: Split up reset_memblock function
        memblock tests: Fix testing with 32-bit physical addresses
        memblock: __next_mem_pfn_range_in_zone: remove unneeded local variable nid
        memblock tests: Add memblock_free tests
        memblock tests: Add memblock_add_node test
        memblock tests: Add memblock_remove tests
        memblock tests: Add memblock_reserve tests
        memblock tests: Add memblock_add tests
        memblock tests: Add memblock reset function
        memblock tests: Add skeleton of the memblock simulator
        tools/include: Add debugfs.h stub
        tools/include: Add pfn.h stub
        ...
      02f9a04d
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of https://github.com/openrisc/linux · 88b3be5c
      Linus Torvalds authored
      Pull OpenRISC updates from Stafford Horne:
       "Not much for OpenRISC this merge window, I do have some things on the
        back burner like sparse warning cleanups and new defconfigs. But I
        didn't get time to polish the patches off for this round. There are
        OpenRISC updates coming in via other queues like removal of set_fs()
        and possibly new generic ticket locks.
      
        This just has a small fixup to remove duplicate initializer in memcpy
        from Kuniyuki Iwashima"
      
      * tag 'for-linus' of https://github.com/openrisc/linux:
        openrisc/boot: Remove unnecessary initialisation in memcpy().
      88b3be5c
    • Linus Torvalds's avatar
      Merge tag 'x86_core_for_5.18_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 70010521
      Linus Torvalds authored
      Pull x86 CET-IBT (Control-Flow-Integrity) support from Peter Zijlstra:
       "Add support for Intel CET-IBT, available since Tigerlake (11th gen),
        which is a coarse grained, hardware based, forward edge
        Control-Flow-Integrity mechanism where any indirect CALL/JMP must
        target an ENDBR instruction or suffer #CP.
      
        Additionally, since Alderlake (12th gen)/Sapphire-Rapids, speculation
        is limited to 2 instructions (and typically fewer) on branch targets
        not starting with ENDBR. CET-IBT also limits speculation of the next
        sequential instruction after the indirect CALL/JMP [1].
      
        CET-IBT is fundamentally incompatible with retpolines, but provides,
        as described above, speculation limits itself"
      
      [1] https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/branch-history-injection.html
      
      * tag 'x86_core_for_5.18_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (53 commits)
        kvm/emulate: Fix SETcc emulation for ENDBR
        x86/Kconfig: Only allow CONFIG_X86_KERNEL_IBT with ld.lld >= 14.0.0
        x86/Kconfig: Only enable CONFIG_CC_HAS_IBT for clang >= 14.0.0
        kbuild: Fixup the IBT kbuild changes
        x86/Kconfig: Do not allow CONFIG_X86_X32_ABI=y with llvm-objcopy
        x86: Remove toolchain check for X32 ABI capability
        x86/alternative: Use .ibt_endbr_seal to seal indirect calls
        objtool: Find unused ENDBR instructions
        objtool: Validate IBT assumptions
        objtool: Add IBT/ENDBR decoding
        objtool: Read the NOENDBR annotation
        x86: Annotate idtentry_df()
        x86,objtool: Move the ASM_REACHABLE annotation to objtool.h
        x86: Annotate call_on_stack()
        objtool: Rework ASM_REACHABLE
        x86: Mark __invalid_creds() __noreturn
        exit: Mark do_group_exit() __noreturn
        x86: Mark stop_this_cpu() __noreturn
        objtool: Ignore extra-symbol code
        objtool: Rename --duplicate to --lto
        ...
      70010521
    • kernel test robot's avatar
      pinctrl: mediatek: common-v1: fix semicolon.cocci warnings · 4a6d0149
      kernel test robot authored
      drivers/pinctrl/mediatek/pinctrl-mtk-common.c:171:2-3: Unneeded semicolon
      
       Remove unneeded semicolon.
      
      Generated by: scripts/coccinelle/misc/semicolon.cocci
      
      Fixes: 156f7217 ("pinctrl: mediatek: common-v1: Commonize spec_ies_smt_set callback")
      CC: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarkernel test robot <lkp@intel.com>
      Link: https://lore.kernel.org/r/20220322130308.GA21877@65fc916127a5Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      4a6d0149
    • Marcelo Ricardo Leitner's avatar
      net/sched: act_ct: fix ref leak when switching zones · bcb74e13
      Marcelo Ricardo Leitner authored
      When switching zones or network namespaces without doing a ct clear in
      between, it is now leaking a reference to the old ct entry. That's
      because tcf_ct_skb_nfct_cached() returns false and
      tcf_ct_flow_table_lookup() may simply overwrite it.
      
      The fix is to, as the ct entry is not reusable, free it already at
      tcf_ct_skb_nfct_cached().
      Reported-by: default avatarFlorian Westphal <fw@strlen.de>
      Fixes: 2f131de3 ("net/sched: act_ct: Fix flow table lookup after ct clear or switching zones")
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bcb74e13