In read_handle(), of_get_address() may return NULL if getting address and
size of the node failed. When of_read_number() uses prop to handle
conversions between different byte orders, it could lead to a null pointer
dereference. Add NULL check to fix potential issue.
Found by static analysis.
Cc: stable(a)vger.kernel.org
Fixes: 14baf4d9c739 ("cxl: Add guest-specific code")
Signed-off-by: Ma Ke <make24(a)iscas.ac.cn>
---
Changes in v4:
- modified vulnerability description according to suggestions, making the
process of static analysis of vulnerabilities clearer. No active research
on developer behavior.
Changes in v3:
- fixed up the changelog text as suggestions.
Changes in v2:
- added an explanation of how the potential vulnerability was discovered,
but not meet the description specification requirements.
---
drivers/misc/cxl/of.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/cxl/of.c b/drivers/misc/cxl/of.c
index bcc005dff1c0..d8dbb3723951 100644
--- a/drivers/misc/cxl/of.c
+++ b/drivers/misc/cxl/of.c
@@ -58,7 +58,7 @@ static int read_handle(struct device_node *np, u64 *handle)
/* Get address and size of the node */
prop = of_get_address(np, 0, &size, NULL);
- if (size)
+ if (!prop || size)
return -EINVAL;
/* Helper to read a big number; size is in cells (not bytes) */
--
2.25.1
It has turned out that having _set_required_opps() to recursively call
dev_pm_opp_set_opp() to set the required OPPs, doesn't really work as well
as we expected.
More precisely, at each recursive call to dev_pm_opp_set_opp() we are
changing the OPP for a genpd's OPP table for a device that has been
attached to it. The problem with this, is that we may have several devices
being attached to the same genpd, thus sharing the same OPP-table that is
being used for their required OPPs. So, typically we may have several
active requests simultaneously for different OPPs for a genpd's OPP table.
This may lead to that the per device vote for a performance-state
(opp-level) for a genpd doesn't get requested accordingly.
Moreover, dev_pm_opp_set_opp() doesn't get called for a required OPP when a
device has been attached to a single PM domain. Even if a consumer driver
would attempt to assign the required-devs, via _opp_attach_genpd() or
_opp_set_required_devs() it would not be possible, as there is no separate
virtual device at hand to use in this case.
The above said, let's fix the problem by replacing the call to
dev_pm_opp_set_opp() in _set_required_opps() by a call to _set_opp_level().
At the moment there's no drawback doing this, as there is no need to manage
anything but the performance-state of the genpd. If it later turns out that
another resource needs to be managed for a required-OPP, it can still be
extended without having to call dev_pm_opp_set_opp().
Fixes: e37440e7e2c2 ("OPP: Call dev_pm_opp_set_opp() for required OPPs")
Cc: stable(a)vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson(a)linaro.org>
---
Changes in v2:
- Clarified the commitmsg.
- Addressed some comments from Viresh.
- Drop calls to _add_opp_dev() for required_devs.
---
drivers/opp/core.c | 56 ++++++++++++++++++----------------------------
1 file changed, 22 insertions(+), 34 deletions(-)
diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index 5f4598246a87..494f8860220d 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -1061,6 +1061,27 @@ static int _set_opp_bw(const struct opp_table *opp_table,
return 0;
}
+static int _set_opp_level(struct device *dev, struct dev_pm_opp *opp)
+{
+ unsigned int level = 0;
+ int ret = 0;
+
+ if (opp) {
+ if (opp->level == OPP_LEVEL_UNSET)
+ return 0;
+
+ level = opp->level;
+ }
+
+ /* Request a new performance state through the device's PM domain. */
+ ret = dev_pm_domain_set_performance_state(dev, level);
+ if (ret)
+ dev_err(dev, "Failed to set performance state %u (%d)\n", level,
+ ret);
+
+ return ret;
+}
+
/* This is only called for PM domain for now */
static int _set_required_opps(struct device *dev, struct opp_table *opp_table,
struct dev_pm_opp *opp, bool up)
@@ -1091,7 +1112,7 @@ static int _set_required_opps(struct device *dev, struct opp_table *opp_table,
if (devs[index]) {
required_opp = opp ? opp->required_opps[index] : NULL;
- ret = dev_pm_opp_set_opp(devs[index], required_opp);
+ ret = _set_opp_level(devs[index], required_opp);
if (ret)
return ret;
}
@@ -1102,27 +1123,6 @@ static int _set_required_opps(struct device *dev, struct opp_table *opp_table,
return 0;
}
-static int _set_opp_level(struct device *dev, struct dev_pm_opp *opp)
-{
- unsigned int level = 0;
- int ret = 0;
-
- if (opp) {
- if (opp->level == OPP_LEVEL_UNSET)
- return 0;
-
- level = opp->level;
- }
-
- /* Request a new performance state through the device's PM domain. */
- ret = dev_pm_domain_set_performance_state(dev, level);
- if (ret)
- dev_err(dev, "Failed to set performance state %u (%d)\n", level,
- ret);
-
- return ret;
-}
-
static void _find_current_opp(struct device *dev, struct opp_table *opp_table)
{
struct dev_pm_opp *opp = ERR_PTR(-ENODEV);
@@ -2457,18 +2457,6 @@ static int _opp_attach_genpd(struct opp_table *opp_table, struct device *dev,
}
}
- /*
- * Add the virtual genpd device as a user of the OPP table, so
- * we can call dev_pm_opp_set_opp() on it directly.
- *
- * This will be automatically removed when the OPP table is
- * removed, don't need to handle that here.
- */
- if (!_add_opp_dev(virt_dev, opp_table->required_opp_tables[index])) {
- ret = -ENOMEM;
- goto err;
- }
-
opp_table->required_devs[index] = virt_dev;
index++;
name++;
--
2.34.1
This is the start of the stable review cycle for the 6.1.100 release.
There are 95 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 Fri, 19 Jul 2024 06:37:32 +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/v6.x/stable-review/patch-6.1.100-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.1.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 6.1.100-rc2
Dan Carpenter <dan.carpenter(a)linaro.org>
i2c: rcar: fix error code in probe()
Nathan Chancellor <nathan(a)kernel.org>
kbuild: Make ld-version.sh more robust against version string changes
Alexandre Chartre <alexandre.chartre(a)oracle.com>
x86/bhi: Avoid warning in #DB handler due to BHI mitigation
Brian Gerst <brgerst(a)gmail.com>
x86/entry/64: Remove obsolete comment on tracing vs. SYSRET
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: rcar: clear NO_RXDMA flag after resetting
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: testunit: avoid re-issued work after read message
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: rcar: ensure Gen3+ reset does not disturb local targets
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: rcar: introduce Gen4 devices
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: rcar: reset controller is mandatory for Gen3+
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: mark HostNotify target address as used
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: rcar: bring hardware to known state when probing
John Stultz <jstultz(a)google.com>
sched: Move psi_account_irqtime() out of update_rq_clock_task() hotpath
Ryusuke Konishi <konishi.ryusuke(a)gmail.com>
nilfs2: fix kernel bug on rename operation of broken directory
Eduard Zingerman <eddyz87(a)gmail.com>
bpf: Allow reads from uninit stack
Jim Mattson <jmattson(a)google.com>
x86/retpoline: Move a NOENDBR annotation to the SRSO dummy return thunk
Ekansh Gupta <quic_ekangupt(a)quicinc.com>
misc: fastrpc: Copy the complete capability structure to user
Ekansh Gupta <quic_ekangupt(a)quicinc.com>
misc: fastrpc: Avoid updating PD type for capability request
Ekansh Gupta <quic_ekangupt(a)quicinc.com>
misc: fastrpc: Fix DSP capabilities request
Jason A. Donenfeld <Jason(a)zx2c4.com>
wireguard: send: annotate intentional data race in checking empty queue
Jason A. Donenfeld <Jason(a)zx2c4.com>
wireguard: queueing: annotate intentional data race in cpu round robin
Helge Deller <deller(a)kernel.org>
wireguard: allowedips: avoid unaligned 64-bit memory accesses
Jason A. Donenfeld <Jason(a)zx2c4.com>
wireguard: selftests: use acpi=off instead of -no-acpi for recent QEMU
Kuan-Wei Chiu <visitorckw(a)gmail.com>
ACPI: processor_idle: Fix invalid comparison with insertion sort for latency
Ilya Dryomov <idryomov(a)gmail.com>
libceph: fix race between delayed_work() and ceph_monc_stop()
Audra Mitchell <audra(a)redhat.com>
Fix userfaultfd_api to return EINVAL as expected
Edson Juliano Drosdeck <edson.drosdeck(a)gmail.com>
ALSA: hda/realtek: Limit mic boost on VAIO PRO PX
Nazar Bilinskyi <nbilinskyi(a)gmail.com>
ALSA: hda/realtek: Enable Mute LED on HP 250 G7
Michał Kopeć <michal.kopec(a)3mdeb.com>
ALSA: hda/realtek: add quirk for Clevo V5[46]0TU
Armin Wolf <W_Armin(a)gmx.de>
platform/x86: toshiba_acpi: Fix array out-of-bounds access
Thomas Weißschuh <linux(a)weissschuh.net>
nvmem: core: only change name to fram for current attribute
Joy Chakraborty <joychakr(a)google.com>
nvmem: meson-efuse: Fix return value of nvmem callbacks
Joy Chakraborty <joychakr(a)google.com>
nvmem: rmem: Fix return value of rmem_read()
Hobin Woo <hobin.woo(a)samsung.com>
ksmbd: discard write access to the directory open
Mathias Nyman <mathias.nyman(a)linux.intel.com>
xhci: always resume roothubs if xHC was reset during resume
He Zhe <zhe.he(a)windriver.com>
hpet: Support 32-bit userspace
Alan Stern <stern(a)rowland.harvard.edu>
USB: core: Fix duplicate endpoint bug by clearing reserved bits in the descriptor
Lee Jones <lee(a)kernel.org>
usb: gadget: configfs: Prevent OOB read/write in usb_string_copy()
WangYuli <wangyuli(a)uniontech.com>
USB: Add USB_QUIRK_NO_SET_INTF quirk for START BP-850k
Dmitry Smirnov <d.smirnov(a)inbox.lv>
USB: serial: mos7840: fix crash on resume
Vanillan Wang <vanillanwang(a)163.com>
USB: serial: option: add Rolling RW350-GL variants
Mank Wang <mank.wang(a)netprisma.us>
USB: serial: option: add Netprisma LCUK54 series modules
Slark Xiao <slark_xiao(a)163.com>
USB: serial: option: add support for Foxconn T99W651
Bjørn Mork <bjorn(a)mork.no>
USB: serial: option: add Fibocom FM350-GL
Daniele Palmas <dnlplm(a)gmail.com>
USB: serial: option: add Telit FN912 rmnet compositions
Daniele Palmas <dnlplm(a)gmail.com>
USB: serial: option: add Telit generic core-dump composition
Ronald Wahl <ronald.wahl(a)raritan.com>
net: ks8851: Fix potential TX stall after interface reopen
Ronald Wahl <ronald.wahl(a)raritan.com>
net: ks8851: Fix deadlock with the SPI chip variant
Eric Dumazet <edumazet(a)google.com>
tcp: avoid too many retransmit packets
Eric Dumazet <edumazet(a)google.com>
tcp: use signed arithmetic in tcp_rtx_probe0_timed_out()
Josh Don <joshdon(a)google.com>
Revert "sched/fair: Make sure to try to detach at least one movable task"
Steve French <stfrench(a)microsoft.com>
cifs: fix setting SecurityFlags to true
Satheesh Paul <psatheesh(a)marvell.com>
octeontx2-af: fix issue with IPv4 match for RSS
Kiran Kumar K <kirankumark(a)marvell.com>
octeontx2-af: fix issue with IPv6 ext match for RSS
Kiran Kumar K <kirankumark(a)marvell.com>
octeontx2-af: extend RSS supported offload types
Michal Mazur <mmazur2(a)marvell.com>
octeontx2-af: fix detection of IP layer
Srujana Challa <schalla(a)marvell.com>
octeontx2-af: fix a issue with cpt_lf_alloc mailbox
Srujana Challa <schalla(a)marvell.com>
octeontx2-af: update cpt lf alloc mailbox
Nithin Dabilpuram <ndabilpuram(a)marvell.com>
octeontx2-af: replace cpt slot with lf id on reg write
Chen Ni <nichen(a)iscas.ac.cn>
ARM: davinci: Convert comma to semicolon
Richard Fitzgerald <rf(a)opensource.cirrus.com>
firmware: cs_dsp: Use strnlen() on name fields in V1 wmfw files
Richard Fitzgerald <rf(a)opensource.cirrus.com>
firmware: cs_dsp: Prevent buffer overrun when processing V2 alg headers
Richard Fitzgerald <rf(a)opensource.cirrus.com>
firmware: cs_dsp: Validate payload length before processing block
Richard Fitzgerald <rf(a)opensource.cirrus.com>
firmware: cs_dsp: Return error if block header overflows file
Richard Fitzgerald <rf(a)opensource.cirrus.com>
firmware: cs_dsp: Fix overflow checking of wmfw header
Sven Schnelle <svens(a)linux.ibm.com>
s390: Mark psw in __load_psw_mask() as __unitialized
Daniel Borkmann <daniel(a)iogearbox.net>
net, sunrpc: Remap EPERM in case of connection failure in xs_tcp_setup_socket
Chengen Du <chengen.du(a)canonical.com>
net/sched: Fix UAF when resolving a clash
Kuniyuki Iwashima <kuniyu(a)amazon.com>
udp: Set SOCK_RCU_FREE earlier in udp_lib_get_port().
Oleksij Rempel <linux(a)rempel-privat.de>
ethtool: netlink: do not return SQI value if link is down
Dmitry Antipov <dmantipov(a)yandex.ru>
ppp: reject claimed-as-LCP but actually malformed packets
Jian Hui Lee <jianhui.lee(a)canonical.com>
net: ethernet: mtk-star-emac: set mac_managed_pm when probing
Mohammad Shehar Yaar Tausif <sheharyaar48(a)gmail.com>
bpf: fix order of args in call to bpf_map_kvcalloc
Martin KaFai Lau <martin.lau(a)kernel.org>
bpf: Remove __bpf_local_storage_map_alloc
Yafang Shao <laoar.shao(a)gmail.com>
bpf: use bpf_map_kvcalloc in bpf_local_storage
Martin KaFai Lau <martin.lau(a)kernel.org>
bpf: Reduce smap->elem_size
Yonghong Song <yhs(a)fb.com>
bpf: Refactor some inode/task/sk storage functions for reuse
Aleksander Jan Bajkowski <olek2(a)wp.pl>
net: ethernet: lantiq_etop: fix double free in detach
Michal Kubiak <michal.kubiak(a)intel.com>
i40e: Fix XDP program unloading while removing the driver
Hugh Dickins <hughd(a)google.com>
net: fix rc7's __skb_datagram_iter()
Aleksandr Mishin <amishin(a)t-argos.ru>
octeontx2-af: Fix incorrect value output on error path in rvu_check_rsrc_availability()
Geliang Tang <tanggeliang(a)kylinos.cn>
skmsg: Skip zero length skb in sk_msg_recvmsg
Oleksij Rempel <linux(a)rempel-privat.de>
net: phy: microchip: lan87xx: reinit PHY after cable test
Neal Cardwell <ncardwell(a)google.com>
tcp: fix incorrect undo caused by DSACK of TLP retransmit
Brian Foster <bfoster(a)redhat.com>
vfs: don't mod negative dentry count when on shrinker list
linke li <lilinke99(a)qq.com>
fs/dcache: Re-use value stored to dentry->d_flags instead of re-reading
Jeff Layton <jlayton(a)kernel.org>
filelock: fix potential use-after-free in posix_lock_inode
Jingbo Xu <jefflexu(a)linux.alibaba.com>
cachefiles: add missing lock protection when polling
Baokun Li <libaokun1(a)huawei.com>
cachefiles: cyclic allocation of msg_id to avoid reuse
Hou Tao <houtao1(a)huawei.com>
cachefiles: wait for ondemand_object_worker to finish when dropping object
Baokun Li <libaokun1(a)huawei.com>
cachefiles: cancel all requests for the object that is being dropped
Baokun Li <libaokun1(a)huawei.com>
cachefiles: stop sending new request when dropping object
Jia Zhu <zhujia.zj(a)bytedance.com>
cachefiles: narrow the scope of triggering EPOLLIN events in ondemand mode
Baokun Li <libaokun1(a)huawei.com>
cachefiles: propagate errors from vfs_getxattr() to avoid infinite loop
Waiman Long <longman(a)redhat.com>
mm: prevent derefencing NULL ptr in pfn_section_valid()
Heiko Carstens <hca(a)linux.ibm.com>
Compiler Attributes: Add __uninitialized macro
-------------
Diffstat:
Documentation/admin-guide/cifs/usage.rst | 34 +--
Makefile | 4 +-
arch/arm/mach-davinci/pm.c | 2 +-
arch/s390/include/asm/processor.h | 2 +-
arch/x86/entry/entry_64.S | 19 +-
arch/x86/entry/entry_64_compat.S | 14 +-
arch/x86/lib/retpoline.S | 2 +-
drivers/acpi/processor_idle.c | 37 ++--
drivers/char/hpet.c | 34 ++-
drivers/firmware/cirrus/cs_dsp.c | 231 +++++++++++++++------
drivers/i2c/busses/i2c-rcar.c | 67 +++---
drivers/i2c/i2c-core-base.c | 1 +
drivers/i2c/i2c-slave-testunit.c | 7 +
drivers/misc/fastrpc.c | 14 +-
drivers/net/ethernet/intel/i40e/i40e_main.c | 9 +-
drivers/net/ethernet/lantiq_etop.c | 4 +-
drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 10 +-
drivers/net/ethernet/marvell/octeontx2/af/npc.h | 8 +-
drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 2 +-
.../net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 33 ++-
.../net/ethernet/marvell/octeontx2/af/rvu_nix.c | 67 +++++-
drivers/net/ethernet/mediatek/mtk_star_emac.c | 7 +
drivers/net/ethernet/micrel/ks8851_common.c | 10 +-
drivers/net/ethernet/micrel/ks8851_spi.c | 4 +-
drivers/net/phy/microchip_t1.c | 2 +-
drivers/net/ppp/ppp_generic.c | 15 ++
drivers/net/wireguard/allowedips.c | 4 +-
drivers/net/wireguard/queueing.h | 4 +-
drivers/net/wireguard/send.c | 2 +-
drivers/nvmem/core.c | 5 +-
drivers/nvmem/meson-efuse.c | 14 +-
drivers/nvmem/rmem.c | 5 +-
drivers/platform/x86/toshiba_acpi.c | 1 +
drivers/usb/core/config.c | 18 +-
drivers/usb/core/quirks.c | 3 +
drivers/usb/gadget/configfs.c | 3 +
drivers/usb/host/xhci.c | 16 +-
drivers/usb/serial/mos7840.c | 45 ++++
drivers/usb/serial/option.c | 38 ++++
fs/cachefiles/daemon.c | 14 +-
fs/cachefiles/internal.h | 15 ++
fs/cachefiles/ondemand.c | 52 ++++-
fs/cachefiles/xattr.c | 5 +-
fs/dcache.c | 12 +-
fs/locks.c | 2 +-
fs/nilfs2/dir.c | 32 ++-
fs/smb/client/cifsglob.h | 4 +-
fs/smb/server/smb2pdu.c | 13 +-
fs/userfaultfd.c | 7 +-
include/linux/bpf.h | 8 +
include/linux/bpf_local_storage.h | 17 +-
include/linux/compiler_attributes.h | 12 ++
include/linux/mmzone.h | 3 +-
kernel/bpf/bpf_inode_storage.c | 38 +---
kernel/bpf/bpf_local_storage.c | 199 +++++++++++-------
kernel/bpf/bpf_task_storage.c | 38 +---
kernel/bpf/syscall.c | 15 ++
kernel/bpf/verifier.c | 11 +-
kernel/sched/core.c | 7 +-
kernel/sched/fair.c | 12 +-
kernel/sched/psi.c | 21 +-
kernel/sched/sched.h | 1 +
kernel/sched/stats.h | 11 +-
net/ceph/mon_client.c | 14 +-
net/core/bpf_sk_storage.c | 35 +---
net/core/datagram.c | 3 +-
net/core/skmsg.c | 3 +-
net/ethtool/linkstate.c | 41 ++--
net/ipv4/tcp_input.c | 11 +-
net/ipv4/tcp_timer.c | 31 ++-
net/ipv4/udp.c | 4 +-
net/sched/act_ct.c | 8 +
net/sunrpc/xprtsock.c | 7 +
scripts/ld-version.sh | 8 +-
sound/pci/hda/patch_realtek.c | 4 +
.../selftests/bpf/progs/test_global_func10.c | 9 +-
tools/testing/selftests/bpf/verifier/calls.c | 13 +-
.../selftests/bpf/verifier/helper_access_var_len.c | 104 ++++++----
tools/testing/selftests/bpf/verifier/int_ptr.c | 9 +-
.../selftests/bpf/verifier/search_pruning.c | 13 +-
tools/testing/selftests/bpf/verifier/sock.c | 27 ---
tools/testing/selftests/bpf/verifier/spill_fill.c | 7 +-
tools/testing/selftests/bpf/verifier/var_off.c | 52 -----
tools/testing/selftests/wireguard/qemu/Makefile | 8 +-
84 files changed, 1133 insertions(+), 624 deletions(-)
This is the start of the stable review cycle for the 6.6.41 release.
There are 122 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 Fri, 19 Jul 2024 06:37:32 +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/v6.x/stable-review/patch-6.6.41-rc2…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.6.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 6.6.41-rc2
Dan Carpenter <dan.carpenter(a)linaro.org>
i2c: rcar: fix error code in probe()
Nathan Chancellor <nathan(a)kernel.org>
kbuild: Make ld-version.sh more robust against version string changes
Alexandre Chartre <alexandre.chartre(a)oracle.com>
x86/bhi: Avoid warning in #DB handler due to BHI mitigation
Brian Gerst <brgerst(a)gmail.com>
x86/entry/64: Remove obsolete comment on tracing vs. SYSRET
Nikolay Borisov <nik.borisov(a)suse.com>
x86/entry: Rename ignore_sysret()
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: rcar: clear NO_RXDMA flag after resetting
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: testunit: avoid re-issued work after read message
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: rcar: ensure Gen3+ reset does not disturb local targets
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: rcar: introduce Gen4 devices
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: rcar: reset controller is mandatory for Gen3+
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: mark HostNotify target address as used
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: rcar: bring hardware to known state when probing
Qu Wenruo <wqu(a)suse.com>
btrfs: tree-checker: add type and sequence check for inline backrefs
John Stultz <jstultz(a)google.com>
sched: Move psi_account_irqtime() out of update_rq_clock_task() hotpath
Baokun Li <libaokun1(a)huawei.com>
ext4: avoid ptr null pointer dereference
Ryusuke Konishi <konishi.ryusuke(a)gmail.com>
nilfs2: fix kernel bug on rename operation of broken directory
John Hubbard <jhubbard(a)nvidia.com>
selftests/net: fix gro.c compilation failure due to non-existent opt_ipproto_off
SeongJae Park <sj(a)kernel.org>
mm/damon/core: merge regions aggressively when max_nr_regions is unmet
Gavin Shan <gshan(a)redhat.com>
mm/shmem: disable PMD-sized page cache if needed
Ekansh Gupta <quic_ekangupt(a)quicinc.com>
misc: fastrpc: Restrict untrusted app to attach to privileged PD
Ekansh Gupta <quic_ekangupt(a)quicinc.com>
misc: fastrpc: Fix ownership reassignment of remote heap
Ekansh Gupta <quic_ekangupt(a)quicinc.com>
misc: fastrpc: Fix memory leak in audio daemon attach operation
Ekansh Gupta <quic_ekangupt(a)quicinc.com>
misc: fastrpc: Copy the complete capability structure to user
Ekansh Gupta <quic_ekangupt(a)quicinc.com>
misc: fastrpc: Avoid updating PD type for capability request
Ekansh Gupta <quic_ekangupt(a)quicinc.com>
misc: fastrpc: Fix DSP capabilities request
Jason A. Donenfeld <Jason(a)zx2c4.com>
wireguard: send: annotate intentional data race in checking empty queue
Jason A. Donenfeld <Jason(a)zx2c4.com>
wireguard: queueing: annotate intentional data race in cpu round robin
Helge Deller <deller(a)kernel.org>
wireguard: allowedips: avoid unaligned 64-bit memory accesses
Jason A. Donenfeld <Jason(a)zx2c4.com>
wireguard: selftests: use acpi=off instead of -no-acpi for recent QEMU
Mario Limonciello <mario.limonciello(a)amd.com>
cpufreq: Allow drivers to advertise boost enabled
Mario Limonciello <mario.limonciello(a)amd.com>
cpufreq: ACPI: Mark boost policy as enabled when setting boost
Kuan-Wei Chiu <visitorckw(a)gmail.com>
ACPI: processor_idle: Fix invalid comparison with insertion sort for latency
Ilya Dryomov <idryomov(a)gmail.com>
libceph: fix race between delayed_work() and ceph_monc_stop()
Taniya Das <quic_tdas(a)quicinc.com>
pmdomain: qcom: rpmhpd: Skip retention level for Power Domains
Audra Mitchell <audra(a)redhat.com>
Fix userfaultfd_api to return EINVAL as expected
Edson Juliano Drosdeck <edson.drosdeck(a)gmail.com>
ALSA: hda/realtek: Limit mic boost on VAIO PRO PX
Nazar Bilinskyi <nbilinskyi(a)gmail.com>
ALSA: hda/realtek: Enable Mute LED on HP 250 G7
Michał Kopeć <michal.kopec(a)3mdeb.com>
ALSA: hda/realtek: add quirk for Clevo V5[46]0TU
Jacky Huang <ychuang3(a)nuvoton.com>
tty: serial: ma35d1: Add a NULL check for of_node
Armin Wolf <W_Armin(a)gmx.de>
platform/x86: toshiba_acpi: Fix array out-of-bounds access
Thomas Weißschuh <linux(a)weissschuh.net>
nvmem: core: only change name to fram for current attribute
Joy Chakraborty <joychakr(a)google.com>
nvmem: meson-efuse: Fix return value of nvmem callbacks
Joy Chakraborty <joychakr(a)google.com>
nvmem: rmem: Fix return value of rmem_read()
Johan Hovold <johan+linaro(a)kernel.org>
arm64: dts: qcom: sc8280xp-x13s: fix touchscreen power on
Cong Zhang <quic_congzhan(a)quicinc.com>
arm64: dts: qcom: sa8775p: Correct IRQ number of EL2 non-secure physical timer
João Paulo Gonçalves <joao.goncalves(a)toradex.com>
iio: trigger: Fix condition for own trigger
Hobin Woo <hobin.woo(a)samsung.com>
ksmbd: discard write access to the directory open
Gavin Shan <gshan(a)redhat.com>
mm/filemap: make MAX_PAGECACHE_ORDER acceptable to xarray
Gavin Shan <gshan(a)redhat.com>
mm/filemap: skip to create PMD-sized page cache if needed
Uladzislau Rezki (Sony) <urezki(a)gmail.com>
mm: vmalloc: check if a hash-index is in cpu_possible_mask
Heiko Carstens <hca(a)linux.ibm.com>
s390/mm: Add NULL pointer check to crst_table_free() base_crst_free()
Mathias Nyman <mathias.nyman(a)linux.intel.com>
xhci: always resume roothubs if xHC was reset during resume
He Zhe <zhe.he(a)windriver.com>
hpet: Support 32-bit userspace
Joy Chakraborty <joychakr(a)google.com>
misc: microchip: pci1xxxx: Fix return value of nvmem callbacks
Alan Stern <stern(a)rowland.harvard.edu>
USB: core: Fix duplicate endpoint bug by clearing reserved bits in the descriptor
Lee Jones <lee(a)kernel.org>
usb: gadget: configfs: Prevent OOB read/write in usb_string_copy()
Heikki Krogerus <heikki.krogerus(a)linux.intel.com>
usb: dwc3: pci: add support for the Intel Panther Lake
WangYuli <wangyuli(a)uniontech.com>
USB: Add USB_QUIRK_NO_SET_INTF quirk for START BP-850k
Dmitry Smirnov <d.smirnov(a)inbox.lv>
USB: serial: mos7840: fix crash on resume
Vanillan Wang <vanillanwang(a)163.com>
USB: serial: option: add Rolling RW350-GL variants
Mank Wang <mank.wang(a)netprisma.us>
USB: serial: option: add Netprisma LCUK54 series modules
Slark Xiao <slark_xiao(a)163.com>
USB: serial: option: add support for Foxconn T99W651
Bjørn Mork <bjorn(a)mork.no>
USB: serial: option: add Fibocom FM350-GL
Daniele Palmas <dnlplm(a)gmail.com>
USB: serial: option: add Telit FN912 rmnet compositions
Daniele Palmas <dnlplm(a)gmail.com>
USB: serial: option: add Telit generic core-dump composition
Ronald Wahl <ronald.wahl(a)raritan.com>
net: ks8851: Fix potential TX stall after interface reopen
Ronald Wahl <ronald.wahl(a)raritan.com>
net: ks8851: Fix deadlock with the SPI chip variant
Eric Dumazet <edumazet(a)google.com>
tcp: avoid too many retransmit packets
Eric Dumazet <edumazet(a)google.com>
tcp: use signed arithmetic in tcp_rtx_probe0_timed_out()
Josh Don <joshdon(a)google.com>
Revert "sched/fair: Make sure to try to detach at least one movable task"
Steve French <stfrench(a)microsoft.com>
cifs: fix setting SecurityFlags to true
Satheesh Paul <psatheesh(a)marvell.com>
octeontx2-af: fix issue with IPv4 match for RSS
Kiran Kumar K <kirankumark(a)marvell.com>
octeontx2-af: fix issue with IPv6 ext match for RSS
Michal Mazur <mmazur2(a)marvell.com>
octeontx2-af: fix detection of IP layer
Srujana Challa <schalla(a)marvell.com>
octeontx2-af: fix a issue with cpt_lf_alloc mailbox
Nithin Dabilpuram <ndabilpuram(a)marvell.com>
octeontx2-af: replace cpt slot with lf id on reg write
Aleksandr Loktionov <aleksandr.loktionov(a)intel.com>
i40e: fix: remove needless retries of NVM update
Chen Ni <nichen(a)iscas.ac.cn>
ARM: davinci: Convert comma to semicolon
Richard Fitzgerald <rf(a)opensource.cirrus.com>
firmware: cs_dsp: Use strnlen() on name fields in V1 wmfw files
Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
ASoC: SOF: Intel: hda: fix null deref on system suspend entry
Richard Fitzgerald <rf(a)opensource.cirrus.com>
firmware: cs_dsp: Prevent buffer overrun when processing V2 alg headers
Richard Fitzgerald <rf(a)opensource.cirrus.com>
firmware: cs_dsp: Validate payload length before processing block
Richard Fitzgerald <rf(a)opensource.cirrus.com>
firmware: cs_dsp: Return error if block header overflows file
Richard Fitzgerald <rf(a)opensource.cirrus.com>
firmware: cs_dsp: Fix overflow checking of wmfw header
Bjorn Andersson <quic_bjorande(a)quicinc.com>
arm64: dts: qcom: sc8180x: Fix LLCC reg property again
Sven Schnelle <svens(a)linux.ibm.com>
s390: Mark psw in __load_psw_mask() as __unitialized
Daniel Borkmann <daniel(a)iogearbox.net>
net, sunrpc: Remap EPERM in case of connection failure in xs_tcp_setup_socket
Chengen Du <chengen.du(a)canonical.com>
net/sched: Fix UAF when resolving a clash
Kuniyuki Iwashima <kuniyu(a)amazon.com>
udp: Set SOCK_RCU_FREE earlier in udp_lib_get_port().
Oleksij Rempel <o.rempel(a)pengutronix.de>
ethtool: netlink: do not return SQI value if link is down
Dmitry Antipov <dmantipov(a)yandex.ru>
ppp: reject claimed-as-LCP but actually malformed packets
Jian Hui Lee <jianhui.lee(a)canonical.com>
net: ethernet: mtk-star-emac: set mac_managed_pm when probing
Kumar Kartikeya Dwivedi <memxor(a)gmail.com>
bpf: Fail bpf_timer_cancel when callback is being cancelled
Benjamin Tissoires <bentiss(a)kernel.org>
bpf: replace bpf_timer_init with a generic helper
Benjamin Tissoires <bentiss(a)kernel.org>
bpf: make timer data struct more generic
Mohammad Shehar Yaar Tausif <sheharyaar48(a)gmail.com>
bpf: fix order of args in call to bpf_map_kvcalloc
Aleksander Jan Bajkowski <olek2(a)wp.pl>
net: ethernet: lantiq_etop: fix double free in detach
Michal Kubiak <michal.kubiak(a)intel.com>
i40e: Fix XDP program unloading while removing the driver
Hugh Dickins <hughd(a)google.com>
net: fix rc7's __skb_datagram_iter()
Aleksandr Mishin <amishin(a)t-argos.ru>
octeontx2-af: Fix incorrect value output on error path in rvu_check_rsrc_availability()
Geliang Tang <tanggeliang(a)kylinos.cn>
skmsg: Skip zero length skb in sk_msg_recvmsg
Oleksij Rempel <o.rempel(a)pengutronix.de>
net: phy: microchip: lan87xx: reinit PHY after cable test
Daniel Borkmann <daniel(a)iogearbox.net>
bpf: Fix too early release of tcx_entry
Neal Cardwell <ncardwell(a)google.com>
tcp: fix incorrect undo caused by DSACK of TLP retransmit
Dan Carpenter <dan.carpenter(a)linaro.org>
net: bcmasp: Fix error code in probe()
Brian Foster <bfoster(a)redhat.com>
vfs: don't mod negative dentry count when on shrinker list
linke li <lilinke99(a)qq.com>
fs/dcache: Re-use value stored to dentry->d_flags instead of re-reading
Jeff Layton <jlayton(a)kernel.org>
filelock: fix potential use-after-free in posix_lock_inode
Christian Eggers <ceggers(a)arri.de>
dsa: lan9303: Fix mapping between DSA port number and PHY address
Russell King (Oracle) <rmk+kernel(a)armlinux.org.uk>
net: dsa: introduce dsa_phylink_to_port()
Jingbo Xu <jefflexu(a)linux.alibaba.com>
cachefiles: add missing lock protection when polling
Baokun Li <libaokun1(a)huawei.com>
cachefiles: cyclic allocation of msg_id to avoid reuse
Hou Tao <houtao1(a)huawei.com>
cachefiles: wait for ondemand_object_worker to finish when dropping object
Baokun Li <libaokun1(a)huawei.com>
cachefiles: cancel all requests for the object that is being dropped
Baokun Li <libaokun1(a)huawei.com>
cachefiles: stop sending new request when dropping object
Jia Zhu <zhujia.zj(a)bytedance.com>
cachefiles: narrow the scope of triggering EPOLLIN events in ondemand mode
Baokun Li <libaokun1(a)huawei.com>
cachefiles: propagate errors from vfs_getxattr() to avoid infinite loop
Yi Liu <yi.l.liu(a)intel.com>
vfio/pci: Init the count variable in collecting hot-reset devices
Peter Wang <peter.wang(a)mediatek.com>
scsi: ufs: core: Fix ufshcd_abort_one racing issue
Peter Wang <peter.wang(a)mediatek.com>
scsi: ufs: core: Fix ufshcd_clear_cmd racing issue
Waiman Long <longman(a)redhat.com>
mm: prevent derefencing NULL ptr in pfn_section_valid()
Heiko Carstens <hca(a)linux.ibm.com>
Compiler Attributes: Add __uninitialized macro
-------------
Diffstat:
Documentation/admin-guide/cifs/usage.rst | 34 +--
Makefile | 4 +-
arch/arm/mach-davinci/pm.c | 2 +-
arch/arm64/boot/dts/qcom/sa8775p.dtsi | 2 +-
arch/arm64/boot/dts/qcom/sc8180x.dtsi | 11 +-
.../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 15 +-
arch/s390/include/asm/processor.h | 2 +-
arch/s390/mm/pgalloc.c | 4 +
arch/x86/entry/entry_64.S | 23 +-
arch/x86/entry/entry_64_compat.S | 14 +-
arch/x86/include/asm/processor.h | 2 +-
arch/x86/kernel/cpu/common.c | 2 +-
drivers/acpi/processor_idle.c | 37 ++--
drivers/char/hpet.c | 34 ++-
drivers/cpufreq/acpi-cpufreq.c | 4 +-
drivers/cpufreq/cpufreq.c | 3 +-
drivers/firmware/cirrus/cs_dsp.c | 231 +++++++++++++++------
drivers/i2c/busses/i2c-rcar.c | 67 +++---
drivers/i2c/i2c-core-base.c | 1 +
drivers/i2c/i2c-slave-testunit.c | 7 +
drivers/iio/industrialio-trigger.c | 2 +-
drivers/misc/fastrpc.c | 41 +++-
drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c | 4 -
drivers/net/dsa/lan9303-core.c | 23 +-
drivers/net/ethernet/broadcom/asp2/bcmasp.c | 1 +
drivers/net/ethernet/intel/i40e/i40e_adminq.h | 4 -
drivers/net/ethernet/intel/i40e/i40e_main.c | 9 +-
drivers/net/ethernet/lantiq_etop.c | 4 +-
drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 2 +-
drivers/net/ethernet/marvell/octeontx2/af/npc.h | 8 +-
drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 2 +-
.../net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 23 +-
.../net/ethernet/marvell/octeontx2/af/rvu_nix.c | 12 +-
drivers/net/ethernet/mediatek/mtk_star_emac.c | 7 +
drivers/net/ethernet/micrel/ks8851_common.c | 10 +-
drivers/net/ethernet/micrel/ks8851_spi.c | 4 +-
drivers/net/phy/microchip_t1.c | 2 +-
drivers/net/ppp/ppp_generic.c | 15 ++
drivers/net/wireguard/allowedips.c | 4 +-
drivers/net/wireguard/queueing.h | 4 +-
drivers/net/wireguard/send.c | 2 +-
drivers/nvmem/core.c | 5 +-
drivers/nvmem/meson-efuse.c | 14 +-
drivers/nvmem/rmem.c | 5 +-
drivers/platform/x86/toshiba_acpi.c | 1 +
drivers/pmdomain/qcom/rpmhpd.c | 7 +
drivers/tty/serial/ma35d1_serial.c | 13 +-
drivers/ufs/core/ufs-mcq.c | 11 +-
drivers/ufs/core/ufshcd.c | 2 +
drivers/usb/core/config.c | 18 +-
drivers/usb/core/quirks.c | 3 +
drivers/usb/dwc3/dwc3-pci.c | 8 +
drivers/usb/gadget/configfs.c | 3 +
drivers/usb/host/xhci.c | 16 +-
drivers/usb/serial/mos7840.c | 45 ++++
drivers/usb/serial/option.c | 38 ++++
drivers/vfio/pci/vfio_pci_core.c | 2 +-
fs/btrfs/tree-checker.c | 39 ++++
fs/cachefiles/daemon.c | 14 +-
fs/cachefiles/internal.h | 15 ++
fs/cachefiles/ondemand.c | 52 ++++-
fs/cachefiles/xattr.c | 5 +-
fs/dcache.c | 12 +-
fs/ext4/sysfs.c | 2 +
fs/locks.c | 2 +-
fs/nilfs2/dir.c | 32 ++-
fs/smb/client/cifsglob.h | 4 +-
fs/smb/server/smb2pdu.c | 13 +-
fs/userfaultfd.c | 7 +-
include/linux/compiler_attributes.h | 12 ++
include/linux/mmzone.h | 3 +-
include/linux/pagemap.h | 11 +-
include/net/dsa.h | 6 +
include/net/tcx.h | 13 +-
include/uapi/misc/fastrpc.h | 3 +
kernel/bpf/bpf_local_storage.c | 4 +-
kernel/bpf/helpers.c | 186 ++++++++++++-----
kernel/sched/core.c | 7 +-
kernel/sched/fair.c | 12 +-
kernel/sched/psi.c | 21 +-
kernel/sched/sched.h | 1 +
kernel/sched/stats.h | 11 +-
mm/damon/core.c | 21 +-
mm/filemap.c | 2 +-
mm/shmem.c | 15 +-
mm/vmalloc.c | 10 +-
net/ceph/mon_client.c | 14 +-
net/core/datagram.c | 3 +-
net/core/skmsg.c | 3 +-
net/dsa/port.c | 12 +-
net/ethtool/linkstate.c | 41 ++--
net/ipv4/tcp_input.c | 11 +-
net/ipv4/tcp_timer.c | 31 ++-
net/ipv4/udp.c | 4 +-
net/sched/act_ct.c | 8 +
net/sched/sch_ingress.c | 12 +-
net/sunrpc/xprtsock.c | 7 +
scripts/ld-version.sh | 8 +-
sound/pci/hda/patch_realtek.c | 4 +
sound/soc/sof/intel/hda-dai.c | 12 +-
tools/testing/selftests/net/gro.c | 3 -
tools/testing/selftests/wireguard/qemu/Makefile | 8 +-
102 files changed, 1147 insertions(+), 442 deletions(-)
35e351780fa9 ("fork: defer linking file vma until vma is fully initialized")
switched the ordering of vm_ops->open() and copy_page_range() on fork. This is a
bug for VFIO, because it causes two problems:
1. Because open() is called before copy_page_range(), the range can conceivably
have unmapped 'holes' in it. This causes the code underneath untrack_pfn() to
WARN.
2. More seriously, open() is trying to guarantee that the entire range is
zapped, so any future accesses in the child will result in the VFIO fault
handler being called. Because we copy_page_range() *after* open() (and
therefore after zapping), this guarantee is violated.
We can't revert 35e351780fa9, because it fixes a real bug for hugetlbfs. The fix
is also not as simple as just reodering open() and copy_page_range(), as Miaohe
points out in [1]. So, although these patches are kind of large for stable, just
backport this refactoring which completely sidesteps the issue.
Note that patch 2 is the key one here which fixes the issue. Patch 1 is a
prerequisite required for patch 2 to build / work. This would almost be enough,
but we might see significantly regressed performance. Patch 3 fixes that up,
putting performance back on par with what it was before.
Note [1] also has a more full discussion justifying taking these backports.
I proposed the same backport for 6.9 [2], and now for 6.6. 6.6 is the oldest
kernel which needs the change: 35e351780fa9 was reverted for unrelated reasons
in 6.1, and was never backported to 5.15 or earlier.
[1]: https://lore.kernel.org/all/20240702042948.2629267-1-leah.rumancik@gmail.co…
[2]: https://lore.kernel.org/r/20240717213339.1921530-1-axelrasmussen@google.com
Alex Williamson (3):
vfio: Create vfio_fs_type with inode per device
vfio/pci: Use unmap_mapping_range()
vfio/pci: Insert full vma on mmap'd MMIO fault
drivers/vfio/device_cdev.c | 7 +
drivers/vfio/group.c | 7 +
drivers/vfio/pci/vfio_pci_core.c | 271 ++++++++-----------------------
drivers/vfio/vfio_main.c | 44 +++++
include/linux/vfio.h | 1 +
include/linux/vfio_pci_core.h | 2 -
6 files changed, 125 insertions(+), 207 deletions(-)
--
2.45.2.993.g49e7a77208-goog