2022-09-06 15:31:52

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 000/107] 5.15.66-rc1 review

This is the start of the stable review cycle for the 5.15.66 release.
There are 107 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.

Responses should be made by Thu, 08 Sep 2022 13:27:58 +0000.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.15.66-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <[email protected]>
Linux 5.15.66-rc1

Johan Hovold <[email protected]>
USB: serial: ch341: fix disabled rx timer on older devices

Johan Hovold <[email protected]>
USB: serial: ch341: fix lost character on LCR updates

Johan Hovold <[email protected]>
usb: dwc3: disable USB core PHY management

Johan Hovold <[email protected]>
usb: dwc3: qcom: fix use-after-free on runtime-PM wakeup

Johan Hovold <[email protected]>
usb: dwc3: fix PHY disable sequence

Martin Rodriguez Reboredo <[email protected]>
kbuild: Add skip_encoding_btf_enum64 option to pahole

Jiri Olsa <[email protected]>
kbuild: Unify options for BTF generation for vmlinux and modules

Mazin Al Haddad <[email protected]>
tty: n_gsm: add sanity check for gsm->receive in gsm_receive_buf()

Ville Syrjälä <[email protected]>
drm/i915: Skip wm/ddb readout for disabled pipes

Diego Santa Cruz <[email protected]>
drm/i915/glk: ECS Liva Q2 needs GLK HDMI port timing quirk

Takashi Iwai <[email protected]>
ALSA: seq: Fix data-race at module auto-loading

Takashi Iwai <[email protected]>
ALSA: seq: oss: Fix data-race for max_midi_devs access

Kacper Michajłow <[email protected]>
ALSA: hda/realtek: Add speaker AMP init for Samsung laptops with ALC298

Miquel Raynal <[email protected]>
net: mac802154: Fix a condition in the receive path

Sebastian Andrzej Siewior <[email protected]>
net: Use u64_stats_fetch_begin_irq() for stats fetch.

Nicolas Dichtel <[email protected]>
ip: fix triggering of 'icmp redirect'

Siddh Raman Pant <[email protected]>
wifi: mac80211: Fix UAF in ieee80211_scan_rx()

Siddh Raman Pant <[email protected]>
wifi: mac80211: Don't finalize CSA in IBSS mode if state is disconnected

Isaac J. Manjarres <[email protected]>
driver core: Don't probe devices after bus_type.match() probe deferral

Krishna Kurapati <[email protected]>
usb: gadget: mass_storage: Fix cdrom data transfers on MAC-OS

Chunfeng Yun <[email protected]>
usb: xhci-mtk: fix bandwidth release issue

Chunfeng Yun <[email protected]>
usb: xhci-mtk: relax TT periodic bandwidth allocation

Alan Stern <[email protected]>
USB: core: Prevent nested device-reset calls

Josh Poimboeuf <[email protected]>
s390: fix nospec table alignments

Gerald Schaefer <[email protected]>
s390/hugetlb: fix prepare_hugepage_range() check for 2 GB hugepages

Witold Lipieta <[email protected]>
usb-storage: Add ignore-residue quirk for NXP PN7462AU

Thierry GUIBERT <[email protected]>
USB: cdc-acm: Add Icom PMR F3400 support (0c26:0020)

Pawel Laszczak <[email protected]>
usb: cdns3: fix incorrect handling TRB_SMM flag for ISOC transfer

Pawel Laszczak <[email protected]>
usb: cdns3: fix issue with rearming ISO OUT endpoint

Heiner Kallweit <[email protected]>
usb: dwc2: fix wrong order of phy_power_on and phy_init

Badhri Jagan Sridharan <[email protected]>
usb: typec: tcpm: Return ENOTSUPP for power supply prop writes

Utkarsh Patel <[email protected]>
usb: typec: intel_pmc_mux: Add new ACPI ID for Meteor Lake IOM device

Pablo Sun <[email protected]>
usb: typec: altmodes/displayport: correct pin assignment for UFP receptacles

Slark Xiao <[email protected]>
USB: serial: option: add support for Cinterion MV32-WA/WB RmNet mode

Yonglin Tan <[email protected]>
USB: serial: option: add Quectel EM060K modem

Yan Xinyu <[email protected]>
USB: serial: option: add support for OPPO R11 diag port

Johan Hovold <[email protected]>
USB: serial: cp210x: add Decagon UCA device id

Mathias Nyman <[email protected]>
xhci: Add grace period after xHC start to prevent premature runtime suspend.

Alan Stern <[email protected]>
media: mceusb: Use new usb_control_msg_*() routines

Heikki Krogerus <[email protected]>
usb: dwc3: pci: Add support for Intel Raptor Lake

Mika Westerberg <[email protected]>
thunderbolt: Use the actual buffer in tb_async_error()

SeongJae Park <[email protected]>
xen-blkfront: Cache feature_persistent value before advertisement

SeongJae Park <[email protected]>
xen-blkfront: Advertise feature-persistent as user requested

SeongJae Park <[email protected]>
xen-blkback: Advertise feature-persistent as user requested

Steven Price <[email protected]>
mm: pagewalk: Fix race between unmap and page walker

Dan Carpenter <[email protected]>
xen/grants: prevent integer overflow in gnttab_dma_alloc_pages()

Jim Mattson <[email protected]>
KVM: x86: Mask off unsupported and unknown bits of IA32_ARCH_CAPABILITIES

Haibo Chen <[email protected]>
gpio: pca953x: Add mutex_lock for regcache sync in PM

Armin Wolf <[email protected]>
hwmon: (gpio-fan) Fix array out of bounds access

Stefan Wahren <[email protected]>
clk: bcm: rpi: Add missing newline

Stefan Wahren <[email protected]>
clk: bcm: rpi: Prevent out-of-bounds access

Christophe JAILLET <[email protected]>
clk: bcm: rpi: Use correct order for the parameters of devm_kcalloc()

Stefan Wahren <[email protected]>
clk: bcm: rpi: Fix error handling of raspberrypi_fw_get_rate

Peter Robinson <[email protected]>
Input: rk805-pwrkey - fix module autoloading

Chen-Yu Tsai <[email protected]>
clk: core: Fix runtime PM sequence in clk_core_unprepare()

Stephen Boyd <[email protected]>
Revert "clk: core: Honor CLK_OPS_PARENT_ENABLE for clk gate ops"

Chen-Yu Tsai <[email protected]>
clk: core: Honor CLK_OPS_PARENT_ENABLE for clk gate ops

Colin Ian King <[email protected]>
drm/i915/reg: Fix spelling mistake "Unsupport" -> "Unsupported"

Jim Mattson <[email protected]>
KVM: VMX: Heed the 'msr' argument in msr_write_intercepted()

Enzo Matsumiya <[email protected]>
cifs: fix small mempool leak in SMB2_negotiate()

Carlos Llamas <[email protected]>
binder: fix alloc->vma_vm_mm null-ptr dereference

Carlos Llamas <[email protected]>
binder: fix UAF of ref->proc caused by race condition

Adrian Hunter <[email protected]>
mmc: core: Fix inconsistent sd3_bus_mode at UHS-I SD voltage switch failure

Adrian Hunter <[email protected]>
mmc: core: Fix UHS-I SD 1.8V workaround branch

Niek Nooijens <[email protected]>
USB: serial: ftdi_sio: add Omron CS1W-CIF31 device id

Johan Hovold <[email protected]>
misc: fastrpc: fix memory corruption on open

Johan Hovold <[email protected]>
misc: fastrpc: fix memory corruption on probe

Marcus Folkesson <[email protected]>
iio: adc: mcp3911: use correct formula for AD conversion

Matti Vaittinen <[email protected]>
iio: ad7292: Prevent regulator double disable

Tetsuo Handa <[email protected]>
Input: iforce - wake up after clearing IFORCE_XMIT_RUNNING flag

Sherry Sun <[email protected]>
tty: serial: lpuart: disable flow control while waiting for the transmit engine to complete

Arnd Bergmann <[email protected]>
musb: fix USB_MUSB_TUSB6010 dependency

Helge Deller <[email protected]>
vt: Clear selection before changing the font

Masahiro Yamada <[email protected]>
powerpc: align syscall table for ppc32

Grzegorz Szymaszek <[email protected]>
staging: r8188eu: add firmware dependency

Dan Carpenter <[email protected]>
staging: rtl8712: fix use after free bugs

Shenwei Wang <[email protected]>
serial: fsl_lpuart: RS485 RTS polariy is inverse

Srinivas Kandagatla <[email protected]>
soundwire: qcom: fix device status array range

Yacan Liu <[email protected]>
net/smc: Remove redundant refcount increase

Jakub Kicinski <[email protected]>
Revert "sch_cake: Return __NET_XMIT_STOLEN when consuming enqueued skb"

Eric Dumazet <[email protected]>
tcp: annotate data-race around challenge_timestamp

Toke Høiland-Jørgensen <[email protected]>
sch_cake: Return __NET_XMIT_STOLEN when consuming enqueued skb

Cong Wang <[email protected]>
kcm: fix strp_init() order and cleanup

David Thompson <[email protected]>
mlxbf_gige: compute MDIO period based on i1clk

Duoming Zhou <[email protected]>
ethernet: rocker: fix sleep in atomic context bug in neigh_timer_handler

Wang Hai <[email protected]>
net/sched: fix netdevice reference leaks in attach_default_qdiscs()

Zhengchao Shao <[email protected]>
net: sched: tbf: don't call qdisc_put() while holding tree lock

Sebastian Andrzej Siewior <[email protected]>
net: dsa: xrs700x: Use irqsave variant for u64 stats update

Andrey Zhadchenko <[email protected]>
openvswitch: fix memory leak at failed datapath creation

Florian Fainelli <[email protected]>
net: smsc911x: Stop and start PHY during suspend and resume

Casper Andersson <[email protected]>
net: sparx5: fix handling uneven length packets in manual extraction

Mathias Nyman <[email protected]>
Revert "xhci: turn off port power in shutdown"

Dan Carpenter <[email protected]>
wifi: cfg80211: debugfs: fix return type in ht40allow_map_read()

Peter Ujfalusi <[email protected]>
ALSA: hda: intel-nhlt: Correct the handling of fmt_config flexible array

Pierre-Louis Bossart <[email protected]>
ALSA: hda: intel-nhlt: remove use of __func__ in dev_dbg

Arun R Murthy <[email protected]>
drm/i915/display: avoid warnings when registering dual panel backlight

Jani Nikula <[email protected]>
drm/i915/backlight: extract backlight code to a separate file

Lin Ma <[email protected]>
ieee802154/adf7242: defer destroy_workqueue call

Pu Lehui <[email protected]>
bpf, cgroup: Fix kernel BUG in purge_effective_progs

YiFei Zhu <[email protected]>
bpf: Restrict bpf_sys_bpf to CAP_PERFMON

Liu Jian <[email protected]>
skmsg: Fix wrong last sg check in sk_msg_recvmsg()

Marcus Folkesson <[email protected]>
iio: adc: mcp3911: make use of the sign bit

Andy Shevchenko <[email protected]>
platform/x86: pmc_atom: Fix SLP_TYPx bitfield mask

Douglas Anderson <[email protected]>
drm/msm/dsi: Fix number of regulators for SDM660

Douglas Anderson <[email protected]>
drm/msm/dsi: Fix number of regulators for msm8996_dsi_cfg

Kuogee Hsieh <[email protected]>
drm/msm/dp: delete DP_RECOVERED_CLOCK_OUT_EN to fix tps4

sunliming <[email protected]>
drm/msm/dsi: fix the inconsistent indenting


-------------

Diffstat:

Makefile | 7 +-
arch/powerpc/kernel/systbl.S | 1 +
arch/riscv/mm/pageattr.c | 4 +-
arch/s390/include/asm/hugetlb.h | 6 +-
arch/s390/kernel/vmlinux.lds.S | 1 +
arch/x86/kvm/vmx/vmx.c | 3 +-
arch/x86/kvm/x86.c | 25 +-
drivers/android/binder.c | 12 +
drivers/android/binder_alloc.c | 4 +-
drivers/base/dd.c | 10 +
drivers/block/xen-blkback/common.h | 3 +
drivers/block/xen-blkback/xenbus.c | 6 +-
drivers/block/xen-blkfront.c | 20 +-
drivers/clk/bcm/clk-raspberrypi.c | 13 +-
drivers/clk/clk.c | 3 +-
drivers/gpio/gpio-pca953x.c | 8 +-
drivers/gpu/drm/i915/Makefile | 1 +
drivers/gpu/drm/i915/display/g4x_dp.c | 2 +-
drivers/gpu/drm/i915/display/icl_dsi.c | 1 +
drivers/gpu/drm/i915/display/intel_backlight.c | 1776 ++++++++++++++++++++
drivers/gpu/drm/i915/display/intel_backlight.h | 51 +
drivers/gpu/drm/i915/display/intel_connector.c | 4 +-
drivers/gpu/drm/i915/display/intel_ddi.c | 2 +-
drivers/gpu/drm/i915/display/intel_dp.c | 1 +
.../gpu/drm/i915/display/intel_dp_aux_backlight.c | 2 +-
drivers/gpu/drm/i915/display/intel_lvds.c | 1 +
drivers/gpu/drm/i915/display/intel_opregion.c | 3 +-
drivers/gpu/drm/i915/display/intel_panel.c | 1767 +------------------
drivers/gpu/drm/i915/display/intel_panel.h | 34 +-
drivers/gpu/drm/i915/display/intel_quirks.c | 3 +
drivers/gpu/drm/i915/display/vlv_dsi.c | 1 +
drivers/gpu/drm/i915/gvt/handlers.c | 2 +-
drivers/gpu/drm/i915/intel_pm.c | 8 +-
drivers/gpu/drm/msm/dp/dp_ctrl.c | 2 +-
drivers/gpu/drm/msm/dsi/dsi_cfg.c | 4 +-
drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 2 +-
drivers/hwmon/gpio-fan.c | 3 +
drivers/iio/adc/ad7292.c | 4 +-
drivers/iio/adc/mcp3911.c | 19 +-
drivers/input/joystick/iforce/iforce-serio.c | 6 +-
drivers/input/joystick/iforce/iforce-usb.c | 8 +-
drivers/input/joystick/iforce/iforce.h | 6 +
drivers/input/misc/rk805-pwrkey.c | 1 +
drivers/media/rc/mceusb.c | 35 +-
drivers/misc/fastrpc.c | 12 +-
drivers/mmc/core/sd.c | 46 +-
drivers/net/dsa/xrs700x/xrs700x.c | 5 +-
drivers/net/ethernet/cortina/gemini.c | 24 +-
drivers/net/ethernet/google/gve/gve_ethtool.c | 16 +-
drivers/net/ethernet/google/gve/gve_main.c | 12 +-
drivers/net/ethernet/huawei/hinic/hinic_rx.c | 4 +-
drivers/net/ethernet/huawei/hinic/hinic_tx.c | 4 +-
.../net/ethernet/mellanox/mlxbf_gige/mlxbf_gige.h | 4 +-
.../ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c | 122 +-
.../ethernet/mellanox/mlxbf_gige/mlxbf_gige_regs.h | 2 +
.../net/ethernet/microchip/sparx5/sparx5_packet.c | 2 +
.../net/ethernet/netronome/nfp/nfp_net_common.c | 8 +-
.../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 8 +-
drivers/net/ethernet/rocker/rocker_ofdpa.c | 2 +-
drivers/net/ethernet/smsc/smsc911x.c | 6 +
drivers/net/ieee802154/adf7242.c | 3 +-
drivers/net/netdevsim/netdev.c | 4 +-
drivers/platform/x86/pmc_atom.c | 2 +-
drivers/soundwire/qcom.c | 6 +-
drivers/staging/r8188eu/os_dep/os_intfs.c | 1 +
drivers/staging/rtl8712/rtl8712_cmd.c | 36 -
drivers/thunderbolt/ctl.c | 2 +-
drivers/tty/n_gsm.c | 3 +-
drivers/tty/serial/fsl_lpuart.c | 5 +-
drivers/tty/vt/vt.c | 12 +-
drivers/usb/cdns3/cdns3-gadget.c | 4 +-
drivers/usb/class/cdc-acm.c | 3 +
drivers/usb/core/hub.c | 10 +
drivers/usb/dwc2/platform.c | 8 +-
drivers/usb/dwc3/core.c | 19 +-
drivers/usb/dwc3/dwc3-pci.c | 4 +
drivers/usb/dwc3/dwc3-qcom.c | 14 +-
drivers/usb/dwc3/host.c | 11 +
drivers/usb/gadget/function/storage_common.c | 6 +-
drivers/usb/host/xhci-hub.c | 13 +-
drivers/usb/host/xhci-mtk-sch.c | 15 +-
drivers/usb/host/xhci.c | 19 +-
drivers/usb/host/xhci.h | 4 +-
drivers/usb/musb/Kconfig | 2 +-
drivers/usb/serial/ch341.c | 16 +-
drivers/usb/serial/cp210x.c | 1 +
drivers/usb/serial/ftdi_sio.c | 2 +
drivers/usb/serial/ftdi_sio_ids.h | 6 +
drivers/usb/serial/option.c | 15 +
drivers/usb/storage/unusual_devs.h | 7 +
drivers/usb/typec/altmodes/displayport.c | 4 +-
drivers/usb/typec/mux/intel_pmc_mux.c | 9 +-
drivers/usb/typec/tcpm/tcpm.c | 7 +
drivers/xen/grant-table.c | 3 +
fs/cifs/smb2pdu.c | 12 +-
include/linux/platform_data/x86/pmc_atom.h | 6 +-
include/linux/usb.h | 2 +
include/linux/usb/typec_dp.h | 5 +
kernel/bpf/cgroup.c | 4 +-
kernel/bpf/syscall.c | 2 +-
mm/pagewalk.c | 21 +-
mm/ptdump.c | 4 +-
net/core/skmsg.c | 4 +-
net/ipv4/fib_frontend.c | 4 +-
net/ipv4/tcp_input.c | 4 +-
net/kcm/kcmsock.c | 15 +-
net/mac80211/ibss.c | 4 +
net/mac80211/scan.c | 11 +-
net/mac80211/sta_info.c | 8 +-
net/mac802154/rx.c | 2 +-
net/mpls/af_mpls.c | 4 +-
net/openvswitch/datapath.c | 4 +-
net/sched/sch_generic.c | 31 +-
net/sched/sch_tbf.c | 4 +-
net/smc/af_smc.c | 1 -
net/wireless/debugfs.c | 3 +-
scripts/Makefile.modfinal | 2 +-
scripts/link-vmlinux.sh | 11 +-
scripts/pahole-flags.sh | 24 +
sound/core/seq/oss/seq_oss_midi.c | 2 +
sound/core/seq/seq_clientmgr.c | 12 +-
sound/hda/intel-nhlt.c | 25 +-
sound/pci/hda/patch_realtek.c | 63 +-
123 files changed, 2550 insertions(+), 2172 deletions(-)



2022-09-06 15:33:49

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 069/107] media: mceusb: Use new usb_control_msg_*() routines

From: Alan Stern <[email protected]>

commit 608e58a0f4617977178131f5f68a3fce1d3f5316 upstream.

Automatic kernel fuzzing led to a WARN about invalid pipe direction in
the mceusb driver:

------------[ cut here ]------------
usb 6-1: BOGUS control dir, pipe 80000380 doesn't match bRequestType 40
WARNING: CPU: 0 PID: 2465 at drivers/usb/core/urb.c:410
usb_submit_urb+0x1326/0x1820 drivers/usb/core/urb.c:410
Modules linked in:
CPU: 0 PID: 2465 Comm: kworker/0:2 Not tainted 5.19.0-rc4-00208-g69cb6c6556ad #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
1.13.0-1ubuntu1.1 04/01/2014
Workqueue: usb_hub_wq hub_event
RIP: 0010:usb_submit_urb+0x1326/0x1820 drivers/usb/core/urb.c:410
Code: 7c 24 40 e8 ac 23 91 fd 48 8b 7c 24 40 e8 b2 70 1b ff 45 89 e8
44 89 f1 4c 89 e2 48 89 c6 48 c7 c7 a0 30 a9 86 e8 48 07 11 02 <0f> 0b
e9 1c f0 ff ff e8 7e 23 91 fd 0f b6 1d 63 22 83 05 31 ff 41
RSP: 0018:ffffc900032becf0 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffff8881100f3058 RCX: 0000000000000000
RDX: ffffc90004961000 RSI: ffff888114c6d580 RDI: fffff52000657d90
RBP: ffff888105ad90f0 R08: ffffffff812c3638 R09: 0000000000000000
R10: 0000000000000005 R11: ffffed1023504ef1 R12: ffff888105ad9000
R13: 0000000000000040 R14: 0000000080000380 R15: ffff88810ba96500
FS: 0000000000000000(0000) GS:ffff88811a800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffe810bda58 CR3: 000000010b720000 CR4: 0000000000350ef0
Call Trace:
<TASK>
usb_start_wait_urb+0x101/0x4c0 drivers/usb/core/message.c:58
usb_internal_control_msg drivers/usb/core/message.c:102 [inline]
usb_control_msg+0x31c/0x4a0 drivers/usb/core/message.c:153
mceusb_gen1_init drivers/media/rc/mceusb.c:1431 [inline]
mceusb_dev_probe+0x258e/0x33f0 drivers/media/rc/mceusb.c:1807

The reason for the warning is clear enough; the driver sends an
unusual read request on endpoint 0 but does not set the USB_DIR_IN bit
in the bRequestType field.

More importantly, the whole situation can be avoided and the driver
simplified by converting it over to the relatively new
usb_control_msg_recv() and usb_control_msg_send() routines. That's
what this fix does.

Link: https://lore.kernel.org/all/CAB7eexLLApHJwZfMQ=X-PtRhw0BgO+5KcSMS05FNUYejJXqtSA@mail.gmail.com/
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: [email protected]
Reported-and-tested-by: Rondreis <[email protected]>
Signed-off-by: Alan Stern <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/media/rc/mceusb.c | 35 ++++++++++++++---------------------
1 file changed, 14 insertions(+), 21 deletions(-)

--- a/drivers/media/rc/mceusb.c
+++ b/drivers/media/rc/mceusb.c
@@ -1416,42 +1416,37 @@ static void mceusb_gen1_init(struct mceu
{
int ret;
struct device *dev = ir->dev;
- char *data;
-
- data = kzalloc(USB_CTRL_MSG_SZ, GFP_KERNEL);
- if (!data) {
- dev_err(dev, "%s: memory allocation failed!", __func__);
- return;
- }
+ char data[USB_CTRL_MSG_SZ];

/*
* This is a strange one. Windows issues a set address to the device
* on the receive control pipe and expect a certain value pair back
*/
- ret = usb_control_msg(ir->usbdev, usb_rcvctrlpipe(ir->usbdev, 0),
- USB_REQ_SET_ADDRESS, USB_TYPE_VENDOR, 0, 0,
- data, USB_CTRL_MSG_SZ, 3000);
+ ret = usb_control_msg_recv(ir->usbdev, 0, USB_REQ_SET_ADDRESS,
+ USB_DIR_IN | USB_TYPE_VENDOR,
+ 0, 0, data, USB_CTRL_MSG_SZ, 3000,
+ GFP_KERNEL);
dev_dbg(dev, "set address - ret = %d", ret);
dev_dbg(dev, "set address - data[0] = %d, data[1] = %d",
data[0], data[1]);

/* set feature: bit rate 38400 bps */
- ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0),
- USB_REQ_SET_FEATURE, USB_TYPE_VENDOR,
- 0xc04e, 0x0000, NULL, 0, 3000);
+ ret = usb_control_msg_send(ir->usbdev, 0,
+ USB_REQ_SET_FEATURE, USB_TYPE_VENDOR,
+ 0xc04e, 0x0000, NULL, 0, 3000, GFP_KERNEL);

dev_dbg(dev, "set feature - ret = %d", ret);

/* bRequest 4: set char length to 8 bits */
- ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0),
- 4, USB_TYPE_VENDOR,
- 0x0808, 0x0000, NULL, 0, 3000);
+ ret = usb_control_msg_send(ir->usbdev, 0,
+ 4, USB_TYPE_VENDOR,
+ 0x0808, 0x0000, NULL, 0, 3000, GFP_KERNEL);
dev_dbg(dev, "set char length - retB = %d", ret);

/* bRequest 2: set handshaking to use DTR/DSR */
- ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0),
- 2, USB_TYPE_VENDOR,
- 0x0000, 0x0100, NULL, 0, 3000);
+ ret = usb_control_msg_send(ir->usbdev, 0,
+ 2, USB_TYPE_VENDOR,
+ 0x0000, 0x0100, NULL, 0, 3000, GFP_KERNEL);
dev_dbg(dev, "set handshake - retC = %d", ret);

/* device resume */
@@ -1459,8 +1454,6 @@ static void mceusb_gen1_init(struct mceu

/* get hw/sw revision? */
mce_command_out(ir, GET_REVISION, sizeof(GET_REVISION));
-
- kfree(data);
}

static void mceusb_gen2_init(struct mceusb_dev *ir)


2022-09-06 15:34:16

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 088/107] usb: gadget: mass_storage: Fix cdrom data transfers on MAC-OS

From: Krishna Kurapati <[email protected]>

commit 9d4dc16ec71bd6368548e9743223e449b4377fc7 upstream.

During cdrom emulation, the response to read_toc command must contain
the cdrom address as the number of sectors (2048 byte sized blocks)
represented either as an absolute value (when MSF bit is '0') or in
terms of PMin/PSec/PFrame (when MSF bit is set to '1'). Incase of
cdrom, the fsg_lun_open call sets the sector size to 2048 bytes.

When MAC OS sends a read_toc request with MSF set to '1', the
store_cdrom_address assumes that the address being provided is the
LUN size represented in 512 byte sized blocks instead of 2048. It
tries to modify the address further to convert it to 2048 byte sized
blocks and store it in MSF format. This results in data transfer
failures as the cdrom address being provided in the read_toc response
is incorrect.

Fixes: 3f565a363cee ("usb: gadget: storage: adapt logic block size to bound block devices")
Cc: [email protected]
Acked-by: Alan Stern <[email protected]>
Signed-off-by: Krishna Kurapati <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/usb/gadget/function/storage_common.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

--- a/drivers/usb/gadget/function/storage_common.c
+++ b/drivers/usb/gadget/function/storage_common.c
@@ -294,8 +294,10 @@ EXPORT_SYMBOL_GPL(fsg_lun_fsync_sub);
void store_cdrom_address(u8 *dest, int msf, u32 addr)
{
if (msf) {
- /* Convert to Minutes-Seconds-Frames */
- addr >>= 2; /* Convert to 2048-byte frames */
+ /*
+ * Convert to Minutes-Seconds-Frames.
+ * Sector size is already set to 2048 bytes.
+ */
addr += 2*75; /* Lead-in occupies 2 seconds */
dest[3] = addr % 75; /* Frames */
addr /= 75;


2022-09-06 15:34:34

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 013/107] ALSA: hda: intel-nhlt: remove use of __func__ in dev_dbg

From: Pierre-Louis Bossart <[email protected]>

[ Upstream commit 6376ab02374822e1e8758a848ee736a182786a2e ]

The module and function information can be added with
'modprobe foo dyndbg=+pmf'

Suggested-by: Greg KH <[email protected]>
Signed-off-by: Pierre-Louis Bossart <[email protected]>
Reviewed-by: Ranjani Sridharan <[email protected]>
Reviewed-by: Péter Ujfalusi <[email protected]>
Reviewed-by: Bard Liao <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
sound/hda/intel-nhlt.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/sound/hda/intel-nhlt.c b/sound/hda/intel-nhlt.c
index e2237239d922a..5e04fedaec49e 100644
--- a/sound/hda/intel-nhlt.c
+++ b/sound/hda/intel-nhlt.c
@@ -55,8 +55,8 @@ int intel_nhlt_get_dmic_geo(struct device *dev, struct nhlt_acpi_table *nhlt)

/* find max number of channels based on format_configuration */
if (fmt_configs->fmt_count) {
- dev_dbg(dev, "%s: found %d format definitions\n",
- __func__, fmt_configs->fmt_count);
+ dev_dbg(dev, "found %d format definitions\n",
+ fmt_configs->fmt_count);

for (i = 0; i < fmt_configs->fmt_count; i++) {
struct wav_fmt_ext *fmt_ext;
@@ -66,9 +66,9 @@ int intel_nhlt_get_dmic_geo(struct device *dev, struct nhlt_acpi_table *nhlt)
if (fmt_ext->fmt.channels > max_ch)
max_ch = fmt_ext->fmt.channels;
}
- dev_dbg(dev, "%s: max channels found %d\n", __func__, max_ch);
+ dev_dbg(dev, "max channels found %d\n", max_ch);
} else {
- dev_dbg(dev, "%s: No format information found\n", __func__);
+ dev_dbg(dev, "No format information found\n");
}

if (cfg->device_config.config_type != NHLT_CONFIG_TYPE_MIC_ARRAY) {
@@ -95,17 +95,16 @@ int intel_nhlt_get_dmic_geo(struct device *dev, struct nhlt_acpi_table *nhlt)
}

if (dmic_geo > 0) {
- dev_dbg(dev, "%s: Array with %d dmics\n", __func__, dmic_geo);
+ dev_dbg(dev, "Array with %d dmics\n", dmic_geo);
}
if (max_ch > dmic_geo) {
- dev_dbg(dev, "%s: max channels %d exceed dmic number %d\n",
- __func__, max_ch, dmic_geo);
+ dev_dbg(dev, "max channels %d exceed dmic number %d\n",
+ max_ch, dmic_geo);
}
}
}

- dev_dbg(dev, "%s: dmic number %d max_ch %d\n",
- __func__, dmic_geo, max_ch);
+ dev_dbg(dev, "dmic number %d max_ch %d\n", dmic_geo, max_ch);

return dmic_geo;
}
--
2.35.1



2022-09-06 15:35:02

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 087/107] usb: xhci-mtk: fix bandwidth release issue

From: Chunfeng Yun <[email protected]>

commit 6020f480004a80cdad4ae5ee180a231c4f65595b upstream.

This happens when @udev->reset_resume is set to true, when usb resume,
the flow as below:
- hub_resume
- usb_disable_interface
- usb_disable_endpoint
- usb_hcd_disable_endpoint
- xhci_endpoint_disable // it set @ep->hcpriv to NULL

Then when reset usb device, it will drop allocated endpoints,
the flow as below:
- usb_reset_and_verify_device
- usb_hcd_alloc_bandwidth
- xhci_mtk_drop_ep

but @ep->hcpriv is already set to NULL, the bandwidth will be not
released anymore.

Due to the added endponts are stored in hash table, we can drop the check
of @ep->hcpriv.

Fixes: 4ce186665e7c ("usb: xhci-mtk: Do not use xhci's virt_dev in drop_endpoint")
Cc: stable <[email protected]>
Signed-off-by: Chunfeng Yun <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/usb/host/xhci-mtk-sch.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/usb/host/xhci-mtk-sch.c
+++ b/drivers/usb/host/xhci-mtk-sch.c
@@ -815,8 +815,8 @@ int xhci_mtk_drop_ep(struct usb_hcd *hcd
if (ret)
return ret;

- if (ep->hcpriv)
- drop_ep_quirk(hcd, udev, ep);
+ /* needn't check @ep->hcpriv, xhci_endpoint_disable set it NULL */
+ drop_ep_quirk(hcd, udev, ep);

return 0;
}


2022-09-06 15:36:04

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 005/107] platform/x86: pmc_atom: Fix SLP_TYPx bitfield mask

From: Andy Shevchenko <[email protected]>

[ Upstream commit 0a90ed8d0cfa29735a221eba14d9cb6c735d35b6 ]

On Intel hardware the SLP_TYPx bitfield occupies bits 10-12 as per ACPI
specification (see Table 4.13 "PM1 Control Registers Fixed Hardware
Feature Control Bits" for the details).

Fix the mask and other related definitions accordingly.

Fixes: 93e5eadd1f6e ("x86/platform: New Intel Atom SOC power management controller driver")
Signed-off-by: Andy Shevchenko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/platform/x86/pmc_atom.c | 2 +-
include/linux/platform_data/x86/pmc_atom.h | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/pmc_atom.c b/drivers/platform/x86/pmc_atom.c
index a9d2a4b98e570..4b0739f95f8b9 100644
--- a/drivers/platform/x86/pmc_atom.c
+++ b/drivers/platform/x86/pmc_atom.c
@@ -244,7 +244,7 @@ static void pmc_power_off(void)
pm1_cnt_port = acpi_base_addr + PM1_CNT;

pm1_cnt_value = inl(pm1_cnt_port);
- pm1_cnt_value &= SLEEP_TYPE_MASK;
+ pm1_cnt_value &= ~SLEEP_TYPE_MASK;
pm1_cnt_value |= SLEEP_TYPE_S5;
pm1_cnt_value |= SLEEP_ENABLE;

diff --git a/include/linux/platform_data/x86/pmc_atom.h b/include/linux/platform_data/x86/pmc_atom.h
index 022bcea9edec5..99a9b09dc839d 100644
--- a/include/linux/platform_data/x86/pmc_atom.h
+++ b/include/linux/platform_data/x86/pmc_atom.h
@@ -7,6 +7,8 @@
#ifndef PMC_ATOM_H
#define PMC_ATOM_H

+#include <linux/bits.h>
+
/* ValleyView Power Control Unit PCI Device ID */
#define PCI_DEVICE_ID_VLV_PMC 0x0F1C
/* CherryTrail Power Control Unit PCI Device ID */
@@ -139,9 +141,9 @@
#define ACPI_MMIO_REG_LEN 0x100

#define PM1_CNT 0x4
-#define SLEEP_TYPE_MASK 0xFFFFECFF
+#define SLEEP_TYPE_MASK GENMASK(12, 10)
#define SLEEP_TYPE_S5 0x1C00
-#define SLEEP_ENABLE 0x2000
+#define SLEEP_ENABLE BIT(13)

extern int pmc_atom_read(int offset, u32 *value);
extern int pmc_atom_write(int offset, u32 value);
--
2.35.1



2022-09-06 15:36:39

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 030/107] soundwire: qcom: fix device status array range

From: Srinivas Kandagatla <[email protected]>

[ Upstream commit 4ef3f2aff1267bfa6d5a90c42a30b927b8aa239b ]

This patch updates device status array range from 11 to 12 as we will
be reading status from device number 0 to device number 11 inclusive.

Without this patch we can potentially access status array out of range
during auto-enumeration.

Fixes: aa1262ca6695 ("soundwire: qcom: Check device status before reading devid")
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/soundwire/qcom.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index 2adc0a75c0515..1ce6f948e9a42 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -148,7 +148,7 @@ struct qcom_swrm_ctrl {
u8 wcmd_id;
struct qcom_swrm_port_config pconfig[QCOM_SDW_MAX_PORTS];
struct sdw_stream_runtime *sruntime[SWRM_MAX_DAIS];
- enum sdw_slave_status status[SDW_MAX_DEVICES];
+ enum sdw_slave_status status[SDW_MAX_DEVICES + 1];
int (*reg_read)(struct qcom_swrm_ctrl *ctrl, int reg, u32 *val);
int (*reg_write)(struct qcom_swrm_ctrl *ctrl, int reg, int val);
u32 slave_status;
@@ -391,7 +391,7 @@ static int qcom_swrm_get_alert_slave_dev_num(struct qcom_swrm_ctrl *ctrl)

ctrl->reg_read(ctrl, SWRM_MCP_SLV_STATUS, &val);

- for (dev_num = 0; dev_num < SDW_MAX_DEVICES; dev_num++) {
+ for (dev_num = 0; dev_num <= SDW_MAX_DEVICES; dev_num++) {
status = (val >> (dev_num * SWRM_MCP_SLV_STATUS_SZ));

if ((status & SWRM_MCP_SLV_STATUS_MASK) == SDW_SLAVE_ALERT) {
@@ -411,7 +411,7 @@ static void qcom_swrm_get_device_status(struct qcom_swrm_ctrl *ctrl)
ctrl->reg_read(ctrl, SWRM_MCP_SLV_STATUS, &val);
ctrl->slave_status = val;

- for (i = 0; i < SDW_MAX_DEVICES; i++) {
+ for (i = 0; i <= SDW_MAX_DEVICES; i++) {
u32 s;

s = (val >> (i * 2));
--
2.35.1



2022-09-06 15:37:37

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 012/107] drm/i915/display: avoid warnings when registering dual panel backlight

From: Arun R Murthy <[email protected]>

[ Upstream commit 868e8e5156a1f8d92ca83fdbac6fd52798650792 ]

Commit 20f85ef89d94 ("drm/i915/backlight: use unique backlight device
names") added support for multiple backlight devices on dual panel
systems, but did so with error handling on -EEXIST from
backlight_device_register(). Unfortunately, that triggered a warning in
dmesg all the way down from sysfs_add_file_mode_ns() and
sysfs_warn_dup().

Instead of optimistically always attempting to register with the default
name ("intel_backlight", which we have to retain for backward
compatibility), check if a backlight device with the name exists first,
and, if so, use the card and connector based name.

v2: reworked on top of the patch commit 20f85ef89d94
("drm/i915/backlight: use unique backlight device names")
v3: fixed the ref count leak(Jani N)

Fixes: 20f85ef89d94 ("drm/i915/backlight: use unique backlight device names")
Signed-off-by: Arun R Murthy <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 4234ea30051200fc6016de10e4d58369e60b38f1)
Signed-off-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
.../gpu/drm/i915/display/intel_backlight.c | 26 +++++++++----------
1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_backlight.c b/drivers/gpu/drm/i915/display/intel_backlight.c
index 4b0086ee48519..60f91ac7d1427 100644
--- a/drivers/gpu/drm/i915/display/intel_backlight.c
+++ b/drivers/gpu/drm/i915/display/intel_backlight.c
@@ -966,26 +966,24 @@ int intel_backlight_device_register(struct intel_connector *connector)
if (!name)
return -ENOMEM;

- bd = backlight_device_register(name, connector->base.kdev, connector,
- &intel_backlight_device_ops, &props);
-
- /*
- * Using the same name independent of the drm device or connector
- * prevents registration of multiple backlight devices in the
- * driver. However, we need to use the default name for backward
- * compatibility. Use unique names for subsequent backlight devices as a
- * fallback when the default name already exists.
- */
- if (IS_ERR(bd) && PTR_ERR(bd) == -EEXIST) {
+ bd = backlight_device_get_by_name(name);
+ if (bd) {
+ put_device(&bd->dev);
+ /*
+ * Using the same name independent of the drm device or connector
+ * prevents registration of multiple backlight devices in the
+ * driver. However, we need to use the default name for backward
+ * compatibility. Use unique names for subsequent backlight devices as a
+ * fallback when the default name already exists.
+ */
kfree(name);
name = kasprintf(GFP_KERNEL, "card%d-%s-backlight",
i915->drm.primary->index, connector->base.name);
if (!name)
return -ENOMEM;
-
- bd = backlight_device_register(name, connector->base.kdev, connector,
- &intel_backlight_device_ops, &props);
}
+ bd = backlight_device_register(name, connector->base.kdev, connector,
+ &intel_backlight_device_ops, &props);

if (IS_ERR(bd)) {
drm_err(&i915->drm,
--
2.35.1



2022-09-06 15:37:46

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 081/107] USB: cdc-acm: Add Icom PMR F3400 support (0c26:0020)

From: Thierry GUIBERT <[email protected]>

commit a10bc71729b236fe36de0d8e4d35c959fd8dec3a upstream.

Supports for ICOM F3400 and ICOM F4400 PMR radios in CDC-ACM driver
enabling the AT serial port.
The Vendor Id is 0x0C26
The Product ID is 0x0020

Output of lsusb :
Bus 001 Device 009: ID 0c26:0020 Prolific Technology Inc. ICOM Radio
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0c26 Prolific Technology Inc.
idProduct 0x0020
bcdDevice 0.00
iManufacturer 1 ICOM Inc.
iProduct 2 ICOM Radio
iSerial 3 *obfuscated*
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0030
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 1 AT-commands (v.25ter)
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 12
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0

Signed-off-by: Thierry GUIBERT <[email protected]>
Cc: stable <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/usb/class/cdc-acm.c | 3 +++
1 file changed, 3 insertions(+)

--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1814,6 +1814,9 @@ static const struct usb_device_id acm_id
{ USB_DEVICE(0x09d8, 0x0320), /* Elatec GmbH TWN3 */
.driver_info = NO_UNION_NORMAL, /* has misplaced union descriptor */
},
+ { USB_DEVICE(0x0c26, 0x0020), /* Icom ICF3400 Serie */
+ .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
+ },
{ USB_DEVICE(0x0ca6, 0xa050), /* Castles VEGA3000 */
.driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
},


2022-09-06 15:38:20

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 024/107] mlxbf_gige: compute MDIO period based on i1clk

From: David Thompson <[email protected]>

[ Upstream commit 3a1a274e933fca73fdc960cb1f60636cd285a265 ]

This patch adds logic to compute the MDIO period based on
the i1clk, and thereafter write the MDIO period into the YU
MDIO config register. The i1clk resource from the ACPI table
is used to provide addressing to YU bootrecord PLL registers.
The values in these registers are used to compute MDIO period.
If the i1clk resource is not present in the ACPI table, then
the current default hardcorded value of 430Mhz is used.
The i1clk clock value of 430MHz is only accurate for boards
with BF2 mid bin and main bin SoCs. The BF2 high bin SoCs
have i1clk = 500MHz, but can support a slower MDIO period.

Fixes: f92e1869d74e ("Add Mellanox BlueField Gigabit Ethernet driver")
Reviewed-by: Asmaa Mnebhi <[email protected]>
Signed-off-by: David Thompson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
.../ethernet/mellanox/mlxbf_gige/mlxbf_gige.h | 4 +-
.../mellanox/mlxbf_gige/mlxbf_gige_mdio.c | 122 +++++++++++++++---
.../mellanox/mlxbf_gige/mlxbf_gige_regs.h | 2 +
3 files changed, 110 insertions(+), 18 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige.h b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige.h
index e3509e69ed1c6..3e8725b7f0b70 100644
--- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige.h
+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige.h
@@ -80,6 +80,7 @@ struct mlxbf_gige {
struct net_device *netdev;
struct platform_device *pdev;
void __iomem *mdio_io;
+ void __iomem *clk_io;
struct mii_bus *mdiobus;
void __iomem *gpio_io;
struct irq_domain *irqdomain;
@@ -149,7 +150,8 @@ enum mlxbf_gige_res {
MLXBF_GIGE_RES_MDIO9,
MLXBF_GIGE_RES_GPIO0,
MLXBF_GIGE_RES_LLU,
- MLXBF_GIGE_RES_PLU
+ MLXBF_GIGE_RES_PLU,
+ MLXBF_GIGE_RES_CLK
};

/* Version of register data returned by mlxbf_gige_get_regs() */
diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c
index 7905179a95753..f979ba7e5effc 100644
--- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c
+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c
@@ -22,10 +22,23 @@
#include <linux/property.h>

#include "mlxbf_gige.h"
+#include "mlxbf_gige_regs.h"

#define MLXBF_GIGE_MDIO_GW_OFFSET 0x0
#define MLXBF_GIGE_MDIO_CFG_OFFSET 0x4

+#define MLXBF_GIGE_MDIO_FREQ_REFERENCE 156250000ULL
+#define MLXBF_GIGE_MDIO_COREPLL_CONST 16384ULL
+#define MLXBF_GIGE_MDC_CLK_NS 400
+#define MLXBF_GIGE_MDIO_PLL_I1CLK_REG1 0x4
+#define MLXBF_GIGE_MDIO_PLL_I1CLK_REG2 0x8
+#define MLXBF_GIGE_MDIO_CORE_F_SHIFT 0
+#define MLXBF_GIGE_MDIO_CORE_F_MASK GENMASK(25, 0)
+#define MLXBF_GIGE_MDIO_CORE_R_SHIFT 26
+#define MLXBF_GIGE_MDIO_CORE_R_MASK GENMASK(31, 26)
+#define MLXBF_GIGE_MDIO_CORE_OD_SHIFT 0
+#define MLXBF_GIGE_MDIO_CORE_OD_MASK GENMASK(3, 0)
+
/* Support clause 22 */
#define MLXBF_GIGE_MDIO_CL22_ST1 0x1
#define MLXBF_GIGE_MDIO_CL22_WRITE 0x1
@@ -50,27 +63,76 @@
#define MLXBF_GIGE_MDIO_CFG_MDIO_IN_SAMP_MASK GENMASK(23, 16)
#define MLXBF_GIGE_MDIO_CFG_MDIO_OUT_SAMP_MASK GENMASK(31, 24)

+#define MLXBF_GIGE_MDIO_CFG_VAL (FIELD_PREP(MLXBF_GIGE_MDIO_CFG_MDIO_MODE_MASK, 1) | \
+ FIELD_PREP(MLXBF_GIGE_MDIO_CFG_MDIO3_3_MASK, 1) | \
+ FIELD_PREP(MLXBF_GIGE_MDIO_CFG_MDIO_FULL_DRIVE_MASK, 1) | \
+ FIELD_PREP(MLXBF_GIGE_MDIO_CFG_MDIO_IN_SAMP_MASK, 6) | \
+ FIELD_PREP(MLXBF_GIGE_MDIO_CFG_MDIO_OUT_SAMP_MASK, 13))
+
+#define MLXBF_GIGE_BF2_COREPLL_ADDR 0x02800c30
+#define MLXBF_GIGE_BF2_COREPLL_SIZE 0x0000000c
+
+static struct resource corepll_params[] = {
+ [MLXBF_GIGE_VERSION_BF2] = {
+ .start = MLXBF_GIGE_BF2_COREPLL_ADDR,
+ .end = MLXBF_GIGE_BF2_COREPLL_ADDR + MLXBF_GIGE_BF2_COREPLL_SIZE - 1,
+ .name = "COREPLL_RES"
+ },
+};
+
+/* Returns core clock i1clk in Hz */
+static u64 calculate_i1clk(struct mlxbf_gige *priv)
+{
+ u8 core_od, core_r;
+ u64 freq_output;
+ u32 reg1, reg2;
+ u32 core_f;
+
+ reg1 = readl(priv->clk_io + MLXBF_GIGE_MDIO_PLL_I1CLK_REG1);
+ reg2 = readl(priv->clk_io + MLXBF_GIGE_MDIO_PLL_I1CLK_REG2);
+
+ core_f = (reg1 & MLXBF_GIGE_MDIO_CORE_F_MASK) >>
+ MLXBF_GIGE_MDIO_CORE_F_SHIFT;
+ core_r = (reg1 & MLXBF_GIGE_MDIO_CORE_R_MASK) >>
+ MLXBF_GIGE_MDIO_CORE_R_SHIFT;
+ core_od = (reg2 & MLXBF_GIGE_MDIO_CORE_OD_MASK) >>
+ MLXBF_GIGE_MDIO_CORE_OD_SHIFT;
+
+ /* Compute PLL output frequency as follow:
+ *
+ * CORE_F / 16384
+ * freq_output = freq_reference * ----------------------------
+ * (CORE_R + 1) * (CORE_OD + 1)
+ */
+ freq_output = div_u64((MLXBF_GIGE_MDIO_FREQ_REFERENCE * core_f),
+ MLXBF_GIGE_MDIO_COREPLL_CONST);
+ freq_output = div_u64(freq_output, (core_r + 1) * (core_od + 1));
+
+ return freq_output;
+}
+
/* Formula for encoding the MDIO period. The encoded value is
* passed to the MDIO config register.
*
- * mdc_clk = 2*(val + 1)*i1clk
+ * mdc_clk = 2*(val + 1)*(core clock in sec)
*
- * 400 ns = 2*(val + 1)*(((1/430)*1000) ns)
+ * i1clk is in Hz:
+ * 400 ns = 2*(val + 1)*(1/i1clk)
*
- * val = (((400 * 430 / 1000) / 2) - 1)
+ * val = (((400/10^9) / (1/i1clk) / 2) - 1)
+ * val = (400/2 * i1clk)/10^9 - 1
*/
-#define MLXBF_GIGE_I1CLK_MHZ 430
-#define MLXBF_GIGE_MDC_CLK_NS 400
+static u8 mdio_period_map(struct mlxbf_gige *priv)
+{
+ u8 mdio_period;
+ u64 i1clk;

-#define MLXBF_GIGE_MDIO_PERIOD (((MLXBF_GIGE_MDC_CLK_NS * MLXBF_GIGE_I1CLK_MHZ / 1000) / 2) - 1)
+ i1clk = calculate_i1clk(priv);

-#define MLXBF_GIGE_MDIO_CFG_VAL (FIELD_PREP(MLXBF_GIGE_MDIO_CFG_MDIO_MODE_MASK, 1) | \
- FIELD_PREP(MLXBF_GIGE_MDIO_CFG_MDIO3_3_MASK, 1) | \
- FIELD_PREP(MLXBF_GIGE_MDIO_CFG_MDIO_FULL_DRIVE_MASK, 1) | \
- FIELD_PREP(MLXBF_GIGE_MDIO_CFG_MDC_PERIOD_MASK, \
- MLXBF_GIGE_MDIO_PERIOD) | \
- FIELD_PREP(MLXBF_GIGE_MDIO_CFG_MDIO_IN_SAMP_MASK, 6) | \
- FIELD_PREP(MLXBF_GIGE_MDIO_CFG_MDIO_OUT_SAMP_MASK, 13))
+ mdio_period = div_u64((MLXBF_GIGE_MDC_CLK_NS >> 1) * i1clk, 1000000000) - 1;
+
+ return mdio_period;
+}

static u32 mlxbf_gige_mdio_create_cmd(u16 data, int phy_add,
int phy_reg, u32 opcode)
@@ -123,9 +185,9 @@ static int mlxbf_gige_mdio_write(struct mii_bus *bus, int phy_add,
int phy_reg, u16 val)
{
struct mlxbf_gige *priv = bus->priv;
+ u32 temp;
u32 cmd;
int ret;
- u32 temp;

if (phy_reg & MII_ADDR_C45)
return -EOPNOTSUPP;
@@ -142,18 +204,44 @@ static int mlxbf_gige_mdio_write(struct mii_bus *bus, int phy_add,
return ret;
}

+static void mlxbf_gige_mdio_cfg(struct mlxbf_gige *priv)
+{
+ u8 mdio_period;
+ u32 val;
+
+ mdio_period = mdio_period_map(priv);
+
+ val = MLXBF_GIGE_MDIO_CFG_VAL;
+ val |= FIELD_PREP(MLXBF_GIGE_MDIO_CFG_MDC_PERIOD_MASK, mdio_period);
+ writel(val, priv->mdio_io + MLXBF_GIGE_MDIO_CFG_OFFSET);
+}
+
int mlxbf_gige_mdio_probe(struct platform_device *pdev, struct mlxbf_gige *priv)
{
struct device *dev = &pdev->dev;
+ struct resource *res;
int ret;

priv->mdio_io = devm_platform_ioremap_resource(pdev, MLXBF_GIGE_RES_MDIO9);
if (IS_ERR(priv->mdio_io))
return PTR_ERR(priv->mdio_io);

- /* Configure mdio parameters */
- writel(MLXBF_GIGE_MDIO_CFG_VAL,
- priv->mdio_io + MLXBF_GIGE_MDIO_CFG_OFFSET);
+ /* clk resource shared with other drivers so cannot use
+ * devm_platform_ioremap_resource
+ */
+ res = platform_get_resource(pdev, IORESOURCE_MEM, MLXBF_GIGE_RES_CLK);
+ if (!res) {
+ /* For backward compatibility with older ACPI tables, also keep
+ * CLK resource internal to the driver.
+ */
+ res = &corepll_params[MLXBF_GIGE_VERSION_BF2];
+ }
+
+ priv->clk_io = devm_ioremap(dev, res->start, resource_size(res));
+ if (IS_ERR(priv->clk_io))
+ return PTR_ERR(priv->clk_io);
+
+ mlxbf_gige_mdio_cfg(priv);

priv->mdiobus = devm_mdiobus_alloc(dev);
if (!priv->mdiobus) {
diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_regs.h b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_regs.h
index 5fb33c9294bf9..7be3a793984d5 100644
--- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_regs.h
+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_regs.h
@@ -8,6 +8,8 @@
#ifndef __MLXBF_GIGE_REGS_H__
#define __MLXBF_GIGE_REGS_H__

+#define MLXBF_GIGE_VERSION 0x0000
+#define MLXBF_GIGE_VERSION_BF2 0x0
#define MLXBF_GIGE_STATUS 0x0010
#define MLXBF_GIGE_STATUS_READY BIT(0)
#define MLXBF_GIGE_INT_STATUS 0x0028
--
2.35.1



2022-09-06 15:40:14

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 051/107] clk: core: Honor CLK_OPS_PARENT_ENABLE for clk gate ops

From: Chen-Yu Tsai <[email protected]>

[ Upstream commit 35b0fac808b95eea1212f8860baf6ad25b88b087 ]

In the previous commits that added CLK_OPS_PARENT_ENABLE, support for
this flag was only added to rate change operations (rate setting and
reparent) and disabling unused subtree. It was not added to the
clock gate related operations. Any hardware driver that needs it for
these operations will either see bogus results, or worse, hang.

This has been seen on MT8192 and MT8195, where the imp_ii2_* clk
drivers set this, but dumping debugfs clk_summary would cause it
to hang.

Fixes: fc8726a2c021 ("clk: core: support clocks which requires parents enable (part 2)")
Fixes: a4b3518d146f ("clk: core: support clocks which requires parents enable (part 1)")
Signed-off-by: Chen-Yu Tsai <[email protected]>
Reviewed-by: Nícolas F. R. A. Prado <[email protected]>
Tested-by: Nícolas F. R. A. Prado <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Stephen Boyd <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/clk/clk.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index d6dc58bd07b33..973649db3decb 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -203,6 +203,9 @@ static bool clk_core_rate_is_protected(struct clk_core *core)
return core->protect_count;
}

+static int clk_core_prepare_enable(struct clk_core *core);
+static void clk_core_disable_unprepare(struct clk_core *core);
+
static bool clk_core_is_prepared(struct clk_core *core)
{
bool ret = false;
@@ -215,7 +218,11 @@ static bool clk_core_is_prepared(struct clk_core *core)
return core->prepare_count;

if (!clk_pm_runtime_get(core)) {
+ if (core->flags & CLK_OPS_PARENT_ENABLE)
+ clk_core_prepare_enable(core->parent);
ret = core->ops->is_prepared(core->hw);
+ if (core->flags & CLK_OPS_PARENT_ENABLE)
+ clk_core_disable_unprepare(core->parent);
clk_pm_runtime_put(core);
}

@@ -251,7 +258,13 @@ static bool clk_core_is_enabled(struct clk_core *core)
}
}

+ if (core->flags & CLK_OPS_PARENT_ENABLE)
+ clk_core_prepare_enable(core->parent);
+
ret = core->ops->is_enabled(core->hw);
+
+ if (core->flags & CLK_OPS_PARENT_ENABLE)
+ clk_core_disable_unprepare(core->parent);
done:
if (core->rpm_enabled)
pm_runtime_put(core->dev);
@@ -818,6 +831,9 @@ int clk_rate_exclusive_get(struct clk *clk)
}
EXPORT_SYMBOL_GPL(clk_rate_exclusive_get);

+static int clk_core_enable_lock(struct clk_core *core);
+static void clk_core_disable_lock(struct clk_core *core);
+
static void clk_core_unprepare(struct clk_core *core)
{
lockdep_assert_held(&prepare_lock);
@@ -841,6 +857,9 @@ static void clk_core_unprepare(struct clk_core *core)

WARN(core->enable_count > 0, "Unpreparing enabled %s\n", core->name);

+ if (core->flags & CLK_OPS_PARENT_ENABLE)
+ clk_core_enable_lock(core->parent);
+
trace_clk_unprepare(core);

if (core->ops->unprepare)
@@ -849,6 +868,9 @@ static void clk_core_unprepare(struct clk_core *core)
clk_pm_runtime_put(core);

trace_clk_unprepare_complete(core);
+
+ if (core->flags & CLK_OPS_PARENT_ENABLE)
+ clk_core_disable_lock(core->parent);
clk_core_unprepare(core->parent);
}

@@ -897,6 +919,9 @@ static int clk_core_prepare(struct clk_core *core)
if (ret)
goto runtime_put;

+ if (core->flags & CLK_OPS_PARENT_ENABLE)
+ clk_core_enable_lock(core->parent);
+
trace_clk_prepare(core);

if (core->ops->prepare)
@@ -904,6 +929,9 @@ static int clk_core_prepare(struct clk_core *core)

trace_clk_prepare_complete(core);

+ if (core->flags & CLK_OPS_PARENT_ENABLE)
+ clk_core_disable_lock(core->parent);
+
if (ret)
goto unprepare;
}
--
2.35.1



2022-09-06 15:40:15

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 039/107] iio: ad7292: Prevent regulator double disable

From: Matti Vaittinen <[email protected]>

commit 22b4277641c6823ec03d5b1cd82628e5e53e75b7 upstream.

The ad7292 tries to add an devm_action for disabling a regulator at
device detach using devm_add_action_or_reset(). The
devm_add_action_or_reset() does call the release function should adding
action fail. The driver inspects the value returned by
devm_add_action_or_reset() and manually calls regulator_disable() if
adding the action has failed. This leads to double disable and messes
the enable count for regulator.

Do not manually call disable if devm_add_action_or_reset() fails.

Fixes: 506d2e317a0a ("iio: adc: Add driver support for AD7292")
Signed-off-by: Matti Vaittinen <[email protected]>
Tested-by: Marcelo Schmitt <[email protected]>
Link: https://lore.kernel.org/r/Yv9O+9sxU7gAv3vM@fedora
Cc: <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/iio/adc/ad7292.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

--- a/drivers/iio/adc/ad7292.c
+++ b/drivers/iio/adc/ad7292.c
@@ -287,10 +287,8 @@ static int ad7292_probe(struct spi_devic

ret = devm_add_action_or_reset(&spi->dev,
ad7292_regulator_disable, st);
- if (ret) {
- regulator_disable(st->reg);
+ if (ret)
return ret;
- }

ret = regulator_get_voltage(st->reg);
if (ret < 0)


2022-09-06 15:41:04

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 023/107] ethernet: rocker: fix sleep in atomic context bug in neigh_timer_handler

From: Duoming Zhou <[email protected]>

[ Upstream commit c0955bf957be4bead01fae1d791476260da7325d ]

The function neigh_timer_handler() is a timer handler that runs in an
atomic context. When used by rocker, neigh_timer_handler() calls
"kzalloc(.., GFP_KERNEL)" that may sleep. As a result, the sleep in
atomic context bug will happen. One of the processes is shown below:

ofdpa_fib4_add()
...
neigh_add_timer()

(wait a timer)

neigh_timer_handler()
neigh_release()
neigh_destroy()
rocker_port_neigh_destroy()
rocker_world_port_neigh_destroy()
ofdpa_port_neigh_destroy()
ofdpa_port_ipv4_neigh()
kzalloc(sizeof(.., GFP_KERNEL) //may sleep

This patch changes the gfp_t parameter of kzalloc() from GFP_KERNEL to
GFP_ATOMIC in order to mitigate the bug.

Fixes: 00fc0c51e35b ("rocker: Change world_ops API and implementation to be switchdev independant")
Signed-off-by: Duoming Zhou <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/net/ethernet/rocker/rocker_ofdpa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/rocker/rocker_ofdpa.c b/drivers/net/ethernet/rocker/rocker_ofdpa.c
index bc70c6abd6a5b..58cf7cc54f408 100644
--- a/drivers/net/ethernet/rocker/rocker_ofdpa.c
+++ b/drivers/net/ethernet/rocker/rocker_ofdpa.c
@@ -1273,7 +1273,7 @@ static int ofdpa_port_ipv4_neigh(struct ofdpa_port *ofdpa_port,
bool removing;
int err = 0;

- entry = kzalloc(sizeof(*entry), GFP_KERNEL);
+ entry = kzalloc(sizeof(*entry), GFP_ATOMIC);
if (!entry)
return -ENOMEM;

--
2.35.1



2022-09-06 15:41:44

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 042/107] misc: fastrpc: fix memory corruption on open

From: Johan Hovold <[email protected]>

commit d245f43aab2b61195d8ebb64cef7b5a08c590ab4 upstream.

The probe session-duplication overflow check incremented the session
count also when there were no more available sessions so that memory
beyond the fixed-size slab-allocated session array could be corrupted in
fastrpc_session_alloc() on open().

Fixes: f6f9279f2bf0 ("misc: fastrpc: Add Qualcomm fastrpc basic driver model")
Cc: [email protected] # 5.1
Signed-off-by: Johan Hovold <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/misc/fastrpc.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -1555,7 +1555,7 @@ static int fastrpc_cb_probe(struct platf
spin_unlock_irqrestore(&cctx->lock, flags);
return -ENOSPC;
}
- sess = &cctx->session[cctx->sesscount];
+ sess = &cctx->session[cctx->sesscount++];
sess->used = false;
sess->valid = true;
sess->dev = dev;
@@ -1568,13 +1568,12 @@ static int fastrpc_cb_probe(struct platf
struct fastrpc_session_ctx *dup_sess;

for (i = 1; i < sessions; i++) {
- if (cctx->sesscount++ >= FASTRPC_MAX_SESSIONS)
+ if (cctx->sesscount >= FASTRPC_MAX_SESSIONS)
break;
- dup_sess = &cctx->session[cctx->sesscount];
+ dup_sess = &cctx->session[cctx->sesscount++];
memcpy(dup_sess, sess, sizeof(*dup_sess));
}
}
- cctx->sesscount++;
spin_unlock_irqrestore(&cctx->lock, flags);
rc = dma_set_mask(dev, DMA_BIT_MASK(32));
if (rc) {


2022-09-06 15:41:45

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 062/107] xen/grants: prevent integer overflow in gnttab_dma_alloc_pages()

From: Dan Carpenter <[email protected]>

[ Upstream commit e9ea0b30ada008f4e65933f449db6894832cb242 ]

The change from kcalloc() to kvmalloc() means that arg->nr_pages
might now be large enough that the "args->nr_pages << PAGE_SHIFT" can
result in an integer overflow.

Fixes: b3f7931f5c61 ("xen/gntdev: switch from kcalloc() to kvcalloc()")
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Juergen Gross <[email protected]>
Link: https://lore.kernel.org/r/YxDROJqu/RPvR0bi@kili
Signed-off-by: Juergen Gross <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/xen/grant-table.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c
index 5c83d41766c85..0a2d24d6ac6f7 100644
--- a/drivers/xen/grant-table.c
+++ b/drivers/xen/grant-table.c
@@ -981,6 +981,9 @@ int gnttab_dma_alloc_pages(struct gnttab_dma_alloc_args *args)
size_t size;
int i, ret;

+ if (args->nr_pages < 0 || args->nr_pages > (INT_MAX >> PAGE_SHIFT))
+ return -ENOMEM;
+
size = args->nr_pages << PAGE_SHIFT;
if (args->coherent)
args->vaddr = dma_alloc_coherent(args->dev, size,
--
2.35.1



2022-09-06 15:41:58

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 009/107] bpf, cgroup: Fix kernel BUG in purge_effective_progs

From: Pu Lehui <[email protected]>

[ Upstream commit 7d6620f107bae6ed687ff07668e8e8f855487aa9 ]

Syzkaller reported a triggered kernel BUG as follows:

------------[ cut here ]------------
kernel BUG at kernel/bpf/cgroup.c:925!
invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
CPU: 1 PID: 194 Comm: detach Not tainted 5.19.0-14184-g69dac8e431af #8
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
RIP: 0010:__cgroup_bpf_detach+0x1f2/0x2a0
Code: 00 e8 92 60 30 00 84 c0 75 d8 4c 89 e0 31 f6 85 f6 74 19 42 f6 84
28 48 05 00 00 02 75 0e 48 8b 80 c0 00 00 00 48 85 c0 75 e5 <0f> 0b 48
8b 0c5
RSP: 0018:ffffc9000055bdb0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffff888100ec0800 RCX: ffffc900000f1000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff888100ec4578
RBP: 0000000000000000 R08: ffff888100ec0800 R09: 0000000000000040
R10: 0000000000000000 R11: 0000000000000000 R12: ffff888100ec4000
R13: 000000000000000d R14: ffffc90000199000 R15: ffff888100effb00
FS: 00007f68213d2b80(0000) GS:ffff88813bc80000(0000)
knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055f74a0e5850 CR3: 0000000102836000 CR4: 00000000000006e0
Call Trace:
<TASK>
cgroup_bpf_prog_detach+0xcc/0x100
__sys_bpf+0x2273/0x2a00
__x64_sys_bpf+0x17/0x20
do_syscall_64+0x3b/0x90
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f68214dbcb9
Code: 08 44 89 e0 5b 41 5c c3 66 0f 1f 84 00 00 00 00 00 48 89 f8 48 89
f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01
f0 ff8
RSP: 002b:00007ffeb487db68 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 000000000000000b RCX: 00007f68214dbcb9
RDX: 0000000000000090 RSI: 00007ffeb487db70 RDI: 0000000000000009
RBP: 0000000000000003 R08: 0000000000000012 R09: 0000000b00000003
R10: 00007ffeb487db70 R11: 0000000000000246 R12: 00007ffeb487dc20
R13: 0000000000000004 R14: 0000000000000001 R15: 000055f74a1011b0
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---

Repetition steps:

For the following cgroup tree,

root
|
cg1
|
cg2

1. attach prog2 to cg2, and then attach prog1 to cg1, both bpf progs
attach type is NONE or OVERRIDE.
2. write 1 to /proc/thread-self/fail-nth for failslab.
3. detach prog1 for cg1, and then kernel BUG occur.

Failslab injection will cause kmalloc fail and fall back to
purge_effective_progs. The problem is that cg2 have attached another prog,
so when go through cg2 layer, iteration will add pos to 1, and subsequent
operations will be skipped by the following condition, and cg will meet
NULL in the end.

`if (pos && !(cg->bpf.flags[atype] & BPF_F_ALLOW_MULTI))`

The NULL cg means no link or prog match, this is as expected, and it's not
a bug. So here just skip the no match situation.

Fixes: 4c46091ee985 ("bpf: Fix KASAN use-after-free Read in compute_effective_progs")
Signed-off-by: Pu Lehui <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Signed-off-by: Sasha Levin <[email protected]>
---
kernel/bpf/cgroup.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c
index 565e4c59db660..eb3e787a3a977 100644
--- a/kernel/bpf/cgroup.c
+++ b/kernel/bpf/cgroup.c
@@ -709,8 +709,10 @@ static void purge_effective_progs(struct cgroup *cgrp, struct bpf_prog *prog,
pos++;
}
}
+
+ /* no link or prog match, skip the cgroup of this layer */
+ continue;
found:
- BUG_ON(!cg);
progs = rcu_dereference_protected(
desc->bpf.effective[atype],
lockdep_is_held(&cgroup_mutex));
--
2.35.1



2022-09-06 15:42:02

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 006/107] iio: adc: mcp3911: make use of the sign bit

From: Marcus Folkesson <[email protected]>

[ Upstream commit 8f89e33bf040bbef66386c426198622180233178 ]

The device supports negative values as well.

Fixes: 3a89b289df5d ("iio: adc: add support for mcp3911")
Signed-off-by: Marcus Folkesson <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jonathan Cameron <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/iio/adc/mcp3911.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/iio/adc/mcp3911.c b/drivers/iio/adc/mcp3911.c
index e573da5397bb3..81eeb00842112 100644
--- a/drivers/iio/adc/mcp3911.c
+++ b/drivers/iio/adc/mcp3911.c
@@ -111,6 +111,8 @@ static int mcp3911_read_raw(struct iio_dev *indio_dev,
if (ret)
goto out;

+ *val = sign_extend32(*val, 23);
+
ret = IIO_VAL_INT;
break;

--
2.35.1



2022-09-06 15:42:09

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 106/107] USB: serial: ch341: fix lost character on LCR updates

From: Johan Hovold <[email protected]>

commit 8e83622ae7ca481c76c8fd9579877f6abae64ca2 upstream.

Disable LCR updates for pre-0x30 devices which use a different (unknown)
protocol for line control and where the current register write causes
the next received character to be lost.

Note that updating LCR using the INIT command has no effect on these
devices either.

Reported-by: Jonathan Woithe <[email protected]>
Tested-by: Jonathan Woithe <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Fixes: 4e46c410e050 ("USB: serial: ch341: reinitialize chip on reconfiguration")
Fixes: 55fa15b5987d ("USB: serial: ch341: fix baud rate and line-control handling")
Cc: [email protected] # 4.10
Signed-off-by: Johan Hovold <[email protected]>
[ johan: adjust context to 5.15 ]
Signed-off-by: Johan Hovold <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/usb/serial/ch341.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

--- a/drivers/usb/serial/ch341.c
+++ b/drivers/usb/serial/ch341.c
@@ -97,7 +97,10 @@ struct ch341_private {
u8 mcr;
u8 msr;
u8 lcr;
+
unsigned long quirks;
+ u8 version;
+
unsigned long break_end;
};

@@ -271,6 +274,9 @@ static int ch341_set_baudrate_lcr(struct
* (stop bits, parity and word length). Version 0x30 and above use
* CH341_REG_LCR only and CH341_REG_LCR2 is always set to zero.
*/
+ if (priv->version < 0x30)
+ return 0;
+
r = ch341_control_out(dev, CH341_REQ_WRITE_REG,
CH341_REG_LCR2 << 8 | CH341_REG_LCR, lcr);
if (r)
@@ -323,7 +329,9 @@ static int ch341_configure(struct usb_de
r = ch341_control_in(dev, CH341_REQ_READ_VERSION, 0, 0, buffer, size);
if (r < 0)
goto out;
- dev_dbg(&dev->dev, "Chip version: 0x%02x\n", buffer[0]);
+
+ priv->version = buffer[0];
+ dev_dbg(&dev->dev, "Chip version: 0x%02x\n", priv->version);

r = ch341_control_out(dev, CH341_REQ_SERIAL_INIT, 0, 0);
if (r < 0)


2022-09-06 15:43:04

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 004/107] drm/msm/dsi: Fix number of regulators for SDM660

From: Douglas Anderson <[email protected]>

[ Upstream commit a1653a75987749ba6dba94fa2e62f0f36b387d1a ]

1 regulator is listed but the number 2 is specified. This presumably
means we try to get a regulator with no name. Fix it.

Fixes: 462f7017a691 ("drm/msm/dsi: Fix DSI and DSI PHY regulator config from SDM660")
Signed-off-by: Douglas Anderson <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Marijn Suijten <[email protected]>
Reviewed-by: Abhinav Kumar <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/496323/
Link: https://lore.kernel.org/r/20220804073608.v4.2.I94b3c3e412b7c208061349f05659e126483171b1@changeid
Signed-off-by: Abhinav Kumar <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/gpu/drm/msm/dsi/dsi_cfg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_cfg.c b/drivers/gpu/drm/msm/dsi/dsi_cfg.c
index 2981dd7c79cc8..ce3901439c69c 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_cfg.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_cfg.c
@@ -148,7 +148,7 @@ static const char * const dsi_sdm660_bus_clk_names[] = {
static const struct msm_dsi_config sdm660_dsi_cfg = {
.io_offset = DSI_6G_REG_SHIFT,
.reg_cfg = {
- .num = 2,
+ .num = 1,
.regs = {
{"vdda", 12560, 4 }, /* 1.2 V */
},
--
2.35.1



2022-09-06 15:44:27

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 073/107] USB: serial: option: add Quectel EM060K modem

From: Yonglin Tan <[email protected]>

commit f766f3abe6dbc9bf8b56a5d53c87e5a17942c154 upstream.

Add usb product id entry for the Quectel EM060K module.

"MBIM mode": DIAG + NMEA + AT + MODEM + MBIM + QDSS

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 8 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=2c7c ProdID=030b Rev= 5.04
S: Manufacturer=Quectel
S: Product=EM060K-GL
S: SerialNumber=89fb57db
C:* #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA
A: FirstIf#= 8 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=40 Driver=option
E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 8 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=32ms
I: If#= 9 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
I:* If#= 9 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#=12 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none)
E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

Signed-off-by: Yonglin Tan <[email protected]>
[ johan: mention QDSS port and sort entries ]
Cc: [email protected]
Signed-off-by: Johan Hovold <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/usb/serial/option.c | 4 ++++
1 file changed, 4 insertions(+)

--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -253,6 +253,7 @@ static void option_instat_callback(struc
#define QUECTEL_PRODUCT_BG96 0x0296
#define QUECTEL_PRODUCT_EP06 0x0306
#define QUECTEL_PRODUCT_EM05G 0x030a
+#define QUECTEL_PRODUCT_EM060K 0x030b
#define QUECTEL_PRODUCT_EM12 0x0512
#define QUECTEL_PRODUCT_RM500Q 0x0800
#define QUECTEL_PRODUCT_EC200S_CN 0x6002
@@ -1142,6 +1143,9 @@ static const struct usb_device_id option
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0, 0) },
{ USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G, 0xff),
.driver_info = RSVD(6) | ZLP },
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0x00, 0x40) },
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0xff, 0x30) },
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0xff, 0x40) },
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0xff, 0xff),
.driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 },
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0, 0) },


2022-09-06 15:44:33

by Greg KH

[permalink] [raw]
Subject: [PATCH 5.15 071/107] USB: serial: cp210x: add Decagon UCA device id

From: Johan Hovold <[email protected]>

commit ceb4038472a4803e7046ed488b03d11551991514 upstream.

Add the device id for Decagon Devices USB Cable Adapter.

Link: https://lore.kernel.org/r/trinity-819f9db2-d3e1-40e9-a669-9c245817c046-1661523546680@msvc-mesg-web108
Cc: [email protected]
Signed-off-by: Johan Hovold <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/usb/serial/cp210x.c | 1 +
1 file changed, 1 insertion(+)

--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -130,6 +130,7 @@ static const struct usb_device_id id_tab
{ USB_DEVICE(0x10C4, 0x83AA) }, /* Mark-10 Digital Force Gauge */
{ USB_DEVICE(0x10C4, 0x83D8) }, /* DekTec DTA Plus VHF/UHF Booster/Attenuator */
{ USB_DEVICE(0x10C4, 0x8411) }, /* Kyocera GPS Module */
+ { USB_DEVICE(0x10C4, 0x8414) }, /* Decagon USB Cable Adapter */
{ USB_DEVICE(0x10C4, 0x8418) }, /* IRZ Automation Teleport SG-10 GSM/GPRS Modem */
{ USB_DEVICE(0x10C4, 0x846E) }, /* BEI USB Sensor Interface (VCP) */
{ USB_DEVICE(0x10C4, 0x8470) }, /* Juniper Networks BX Series System Console */


2022-09-06 18:38:20

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH 5.15 000/107] 5.15.66-rc1 review



On 9/6/2022 6:29 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.15.66 release.
> There are 107 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 08 Sep 2022 13:27:58 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.15.66-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h

On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on
BMIPS_GENERIC:

Tested-by: Florian Fainelli <[email protected]>
--
Florian

2022-09-06 19:05:31

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH 5.15 000/107] 5.15.66-rc1 review



On 9/6/2022 11:33 AM, Florian Fainelli wrote:
>
>
> On 9/6/2022 6:29 AM, Greg Kroah-Hartman wrote:
>> This is the start of the stable review cycle for the 5.15.66 release.
>> There are 107 patches in this series, all will be posted as a response
>> to this one.  If anyone has any issues with these being applied, please
>> let me know.
>>
>> Responses should be made by Thu, 08 Sep 2022 13:27:58 +0000.
>> Anything received after that time might be too late.
>>
>> The whole patch series can be found in one patch at:
>>     https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.15.66-rc1.gz
>> or in the git tree and branch at:
>>     git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
>> and the diffstat can be found below.
>>
>> thanks,
>>
>> greg k-h
>
> On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on
> BMIPS_GENERIC:
>
> Tested-by: Florian Fainelli <[email protected]>

There is an issue with the lack of executable permission on
scripts/pahole-flags.sh that I will be responding to in the appropriate
patch.
--
Florian

2022-09-06 20:39:20

by Naresh Kamboju

[permalink] [raw]
Subject: Re: [PATCH 5.15 000/107] 5.15.66-rc1 review

On Tue, 6 Sept 2022 at 19:07, Greg Kroah-Hartman
<[email protected]> wrote:
>
> This is the start of the stable review cycle for the 5.15.66 release.
> There are 107 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 08 Sep 2022 13:27:58 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.15.66-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h


Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.

Tested-by: Linux Kernel Functional Testing <[email protected]>

## Build
* kernel: 5.15.66-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-5.15.y
* git commit: 78a6337a09dea696f5296f00bf8ae5e5283eef89
* git describe: v5.15.63-319-g78a6337a09de
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.15.y/build/v5.15.63-319-g78a6337a09de

## No test Regressions (compared to v5.15.63-211-gad2e22e028e7)

## No metric Regressions (compared to v5.15.63-211-gad2e22e028e7)

## No test Fixes (compared to v5.15.63-211-gad2e22e028e7)

## No metric Fixes (compared to v5.15.63-211-gad2e22e028e7)

## Test result summary
total: 74572, pass: 67375, fail: 420, skip: 6561, xfail: 216

## Build Summary
* arc: 10 total, 10 passed, 0 failed
* arm: 333 total, 333 passed, 0 failed
* arm64: 65 total, 63 passed, 2 failed
* i386: 55 total, 53 passed, 2 failed
* mips: 56 total, 56 passed, 0 failed
* parisc: 12 total, 12 passed, 0 failed
* powerpc: 63 total, 63 passed, 0 failed
* riscv: 22 total, 22 passed, 0 failed
* s390: 24 total, 24 passed, 0 failed
* sh: 24 total, 24 passed, 0 failed
* sparc: 12 total, 12 passed, 0 failed
* x86_64: 58 total, 56 passed, 2 failed

## Test suites summary
* fwts
* igt-gpu-tools
* kunit
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-test
* ltp-cap_bounds
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-filecaps
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-fsx
* ltp-hugetlb
* ltp-io
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-open-posix-tests
* ltp-pty
* ltp-sched
* ltp-securebits
* ltp-syscalls
* ltp-tracing
* network-basic-tests
* packetdrill
* rcutorture
* v4l2-compliance
* vdso

--
Linaro LKFT
https://lkft.linaro.org

2022-09-06 21:41:40

by Sudip Mukherjee

[permalink] [raw]
Subject: Re: [PATCH 5.15 000/107] 5.15.66-rc1 review

Hi Greg,

On Tue, Sep 6, 2022 at 2:37 PM Greg Kroah-Hartman
<[email protected]> wrote:
>
> This is the start of the stable review cycle for the 5.15.66 release.
> There are 107 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 08 Sep 2022 13:27:58 +0000.
> Anything received after that time might be too late.

My test pipelines are still running, but x86_64 allmodconfig failed
with gcc-12 with the error:

drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c: In function
'ipc_protocol_dl_td_process':
drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c:406:13: error: the
comparison will always evaluate as 'true' for the address of 'cb' will
never be NULL [-Werror=address]
406 | if (!IPC_CB(skb)) {
| ^
In file included from drivers/net/wwan/iosm/iosm_ipc_imem.h:9,
from drivers/net/wwan/iosm/iosm_ipc_protocol.h:9,
from drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c:6:
./include/linux/skbuff.h:794:33: note: 'cb' declared here
794 | char cb[48] __aligned(8);

It will need dbbc7d04c549 ("net: wwan: iosm: remove pointless null check").


--
Regards
Sudip

2022-09-06 22:00:03

by Shuah Khan

[permalink] [raw]
Subject: Re: [PATCH 5.15 000/107] 5.15.66-rc1 review

On 9/6/22 07:29, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.15.66 release.
> There are 107 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 08 Sep 2022 13:27:58 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.15.66-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>

Compiled and booted on my test system. No dmesg regressions.

Tested-by: Shuah Khan <[email protected]>

thanks,
-- Shuah

2022-09-07 05:01:15

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH 5.15 000/107] 5.15.66-rc1 review

On Tue, Sep 06, 2022 at 03:29:41PM +0200, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.15.66 release.
> There are 107 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 08 Sep 2022 13:27:58 +0000.
> Anything received after that time might be too late.
>

Build results:
total: 159 pass: 159 fail: 0
Qemu test results:
total: 486 pass: 486 fail: 0

Tested-by: Guenter Roeck <[email protected]>

Guenter

2022-09-07 06:08:48

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 5.15 000/107] 5.15.66-rc1 review

On Tue, Sep 06, 2022 at 09:46:37PM +0100, Sudip Mukherjee wrote:
> Hi Greg,
>
> On Tue, Sep 6, 2022 at 2:37 PM Greg Kroah-Hartman
> <[email protected]> wrote:
> >
> > This is the start of the stable review cycle for the 5.15.66 release.
> > There are 107 patches in this series, all will be posted as a response
> > to this one. If anyone has any issues with these being applied, please
> > let me know.
> >
> > Responses should be made by Thu, 08 Sep 2022 13:27:58 +0000.
> > Anything received after that time might be too late.
>
> My test pipelines are still running, but x86_64 allmodconfig failed
> with gcc-12 with the error:
>
> drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c: In function
> 'ipc_protocol_dl_td_process':
> drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c:406:13: error: the
> comparison will always evaluate as 'true' for the address of 'cb' will
> never be NULL [-Werror=address]
> 406 | if (!IPC_CB(skb)) {
> | ^
> In file included from drivers/net/wwan/iosm/iosm_ipc_imem.h:9,
> from drivers/net/wwan/iosm/iosm_ipc_protocol.h:9,
> from drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c:6:
> ./include/linux/skbuff.h:794:33: note: 'cb' declared here
> 794 | char cb[48] __aligned(8);
>
> It will need dbbc7d04c549 ("net: wwan: iosm: remove pointless null check").

Thanks, I have not been testing any branches with gcc12 just yet because
of these issues :(

2022-09-07 09:39:01

by Sudip Mukherjee

[permalink] [raw]
Subject: Re: [PATCH 5.15 000/107] 5.15.66-rc1 review


On Wed, Sep 07, 2022 at 07:49:29AM +0200, Greg Kroah-Hartman wrote:
> On Tue, Sep 06, 2022 at 09:46:37PM +0100, Sudip Mukherjee wrote:
> > Hi Greg,
> >
> > On Tue, Sep 6, 2022 at 2:37 PM Greg Kroah-Hartman
> > <[email protected]> wrote:
> > >
> > > This is the start of the stable review cycle for the 5.15.66 release.
> > > There are 107 patches in this series, all will be posted as a response
> > > to this one. If anyone has any issues with these being applied, please
> > > let me know.
> > >
> > > Responses should be made by Thu, 08 Sep 2022 13:27:58 +0000.
> > > Anything received after that time might be too late.
> >
> > My test pipelines are still running, but x86_64 allmodconfig failed
> > with gcc-12 with the error:
> >
> > drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c: In function
> > 'ipc_protocol_dl_td_process':
> > drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c:406:13: error: the
> > comparison will always evaluate as 'true' for the address of 'cb' will
> > never be NULL [-Werror=address]
> > 406 | if (!IPC_CB(skb)) {
> > | ^
> > In file included from drivers/net/wwan/iosm/iosm_ipc_imem.h:9,
> > from drivers/net/wwan/iosm/iosm_ipc_protocol.h:9,
> > from drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c:6:
> > ./include/linux/skbuff.h:794:33: note: 'cb' declared here
> > 794 | char cb[48] __aligned(8);
> >
> > It will need dbbc7d04c549 ("net: wwan: iosm: remove pointless null check").
>
> Thanks, I have not been testing any branches with gcc12 just yet because
> of these issues :(

All the other arch I build are now ok with gcc-12, except x86_64.
I will make a complete list for x86_64 today and send you.

--
Regards
Sudip

2022-09-07 10:50:17

by Bagas Sanjaya

[permalink] [raw]
Subject: Re: [PATCH 5.15 000/107] 5.15.66-rc1 review

On Tue, Sep 06, 2022 at 03:29:41PM +0200, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.15.66 release.
> There are 107 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>

Successfully cross-compiled for arm64 (bcm2711_defconfig, GCC 10.2.0) and
powerpc (ps3_defconfig, GCC 12.1.0).

However, Florian reported permission issue on pahole script [1]. The issue
is also appeared on my builds.

Thanks.

Tested-by: Bagas Sanjaya <[email protected]>

[1]: https://lore.kernel.org/lkml/[email protected]/

--
An old man doll... just what I always wanted! - Clara


Attachments:
(No filename) (745.00 B)
signature.asc (235.00 B)
Download all attachments

2022-09-07 10:55:01

by Sudip Mukherjee

[permalink] [raw]
Subject: Re: [PATCH 5.15 000/107] 5.15.66-rc1 review

Hi Greg,

On Tue, Sep 06, 2022 at 03:29:41PM +0200, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.15.66 release.
> There are 107 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 08 Sep 2022 13:27:58 +0000.
> Anything received after that time might be too late.

Build test (gcc version 11.3.1 20220819):
mips: 62 configs -> no failure
arm: 99 configs -> no failure
arm64: 3 configs -> no failure
x86_64: 4 configs -> no failure
alpha allmodconfig -> no failure
csky allmodconfig -> no failure
powerpc allmodconfig -> no failure
riscv allmodconfig -> no failure
s390 allmodconfig -> no failure
xtensa allmodconfig -> no failure

Note:
Except x86_64, all the other arch I built were ok with gcc-12.

Boot test:
x86_64: Booted on my test laptop. No regression.
x86_64: Booted on qemu. No regression. [1]
arm64: Booted on rpi4b (4GB model). No regression. [2]
mips: Booted on ci20 board. No regression. [3]

[1]. https://openqa.qa.codethink.co.uk/tests/1780
[2]. https://openqa.qa.codethink.co.uk/tests/1785
[3]. https://openqa.qa.codethink.co.uk/tests/1787

Tested-by: Sudip Mukherjee <[email protected]>

--
Regards
Sudip

2022-09-07 12:25:14

by Sudip Mukherjee

[permalink] [raw]
Subject: Re: [PATCH 5.15 000/107] 5.15.66-rc1 review

On Wed, Sep 7, 2022 at 10:40 AM Sudip Mukherjee (Codethink)
<[email protected]> wrote:
>
> Hi Greg,
>
> On Tue, Sep 06, 2022 at 03:29:41PM +0200, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 5.15.66 release.
> > There are 107 patches in this series, all will be posted as a response
> > to this one. If anyone has any issues with these being applied, please
> > let me know.
> >
> > Responses should be made by Thu, 08 Sep 2022 13:27:58 +0000.
> > Anything received after that time might be too late.
>
> Build test (gcc version 11.3.1 20220819):

Missed reporting that the build is full of "/bin/sh: 1:
./scripts/pahole-flags.sh: Permission denied".
On checking it turns out, the execute permission is not set in the
v5.15.y branch, but its set in v5.19.y branch.

On v5.19.y:
$ ls -l scripts/pahole-flags.sh
-rwxr-xr-x 1 sudip sudip 585 Sep 6 18:03 scripts/pahole-flags.sh

on v5.15.y:
$ ls -l scripts/pahole-flags.sh
-rw-r--r-- 1 sudip sudip 627 Sep 7 12:27 scripts/pahole-flags.sh


--
Regards
Sudip

2022-09-07 12:32:33

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 5.15 000/107] 5.15.66-rc1 review

On Wed, Sep 07, 2022 at 12:30:34PM +0100, Sudip Mukherjee wrote:
> On Wed, Sep 7, 2022 at 10:40 AM Sudip Mukherjee (Codethink)
> <[email protected]> wrote:
> >
> > Hi Greg,
> >
> > On Tue, Sep 06, 2022 at 03:29:41PM +0200, Greg Kroah-Hartman wrote:
> > > This is the start of the stable review cycle for the 5.15.66 release.
> > > There are 107 patches in this series, all will be posted as a response
> > > to this one. If anyone has any issues with these being applied, please
> > > let me know.
> > >
> > > Responses should be made by Thu, 08 Sep 2022 13:27:58 +0000.
> > > Anything received after that time might be too late.
> >
> > Build test (gcc version 11.3.1 20220819):
>
> Missed reporting that the build is full of "/bin/sh: 1:
> ./scripts/pahole-flags.sh: Permission denied".
> On checking it turns out, the execute permission is not set in the
> v5.15.y branch, but its set in v5.19.y branch.
>
> On v5.19.y:
> $ ls -l scripts/pahole-flags.sh
> -rwxr-xr-x 1 sudip sudip 585 Sep 6 18:03 scripts/pahole-flags.sh
>
> on v5.15.y:
> $ ls -l scripts/pahole-flags.sh
> -rw-r--r-- 1 sudip sudip 627 Sep 7 12:27 scripts/pahole-flags.sh

Known issue, see the thread here:
https://lore.kernel.org/r/[email protected]

thanks,

greg k-h

2022-09-07 13:14:23

by Ron Economos

[permalink] [raw]
Subject: Re: [PATCH 5.15 000/107] 5.15.66-rc1 review

On 9/6/22 6:29 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.15.66 release.
> There are 107 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 08 Sep 2022 13:27:58 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.15.66-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h

Built and booted successfully on RISC-V RV64 (HiFive Unmatched).

Tested-by: Ron Economos <[email protected]>