Commit Graph

801094 Commits

Author SHA1 Message Date
Florian Westphal 5579010831 netfilter: nftables: exthdr: fix 4-byte stack OOB write
ANBZ: #9412

commit fd94d9dade upstream.

If priv->len is a multiple of 4, then dst[len / 4] can write past
the destination array which leads to stack corruption.

This construct is necessary to clean the remainder of the register
in case ->len is NOT a multiple of the register size, so make it
conditional just like nft_payload.c does.

The bug was added in 4.1 cycle and then copied/inherited when
tcp/sctp and ip option support was added.

Bug reported by Zero Day Initiative project (ZDI-CAN-21950,
ZDI-CAN-21951, ZDI-CAN-21961).

Fixes: 49499c3e6e ("netfilter: nf_tables: switch registers to 32 bit addressing")
Fixes: 935b7f6430 ("netfilter: nft_exthdr: add TCP option matching")
Fixes: 133dc203d7 ("netfilter: nft_exthdr: Support SCTP chunks")
Fixes: dbb5281a1f ("netfilter: nf_tables: add support for matching IPv4 options")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

[Fixes conflicts]
Fixes: CVE-2023-52628
Signed-off-by: Xiao Long <xiaolong@openanolis.org>
Signed-off-by: D. Wythe <alibuda@linux.alibaba.com>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3416
2024-06-27 10:49:18 +00:00
Liao Xuan 4914aa2b44 anolis: ALSA: hda: Add support for Hygon family 18h model 10h HD-Audio
ANBZ: #9404

Add the new PCI ID 0x1d94 0x14c9 for Hygon family 18h model 10h
HDA controller.

Signed-off-by: Liao Xuan <liaoxuan@hygon.cn>
Reviewed-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Reviewed-by: Artie Ding <artie.ding@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3406
2024-06-26 02:47:04 -04:00
Liao Xuan 8923359f27 anolis: hwmon/k10temp: Add support for Hygon family 18h model 10h
ANBZ: #9404

Add 18H_M10H DF F3 device ID to get the temperature for Hygon
family 18h model 10h processor.

Signed-off-by: Liao Xuan <liaoxuan@hygon.cn>
Reviewed-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Reviewed-by: Artie Ding <artie.ding@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3406
2024-06-26 02:46:56 -04:00
Liao Xuan e2c16bfbf9 anolis: EDAC/amd64: Add support for Hygon family 18h model 10h
ANBZ: #9404

Add Hygon family 18h model 10h processor support for amd64_edac.

Signed-off-by: Liao Xuan <liaoxuan@hygon.cn>
Reviewed-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Reviewed-by: Artie Ding <artie.ding@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3406
2024-06-26 02:45:43 -04:00
Liao Xuan 1a7a4bb4d0 anolis: x86/amd_nb: Add support for Hygon family 18h model 10h
ANBZ: #9404

Add root and DF F1/F3/F4 device IDs for Hygon family 18h model
10h processors.

Signed-off-by: Liao Xuan <liaoxuan@hygon.cn>
Reviewed-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Reviewed-by: Artie Ding <artie.ding@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3406
2024-06-26 02:42:00 -04:00
Liao Xuan a004a0eb46 anolis: x86/cpu: Get LLC ID for Hygon family 18h model 10h
ANBZ: #9404

Get LLC ID from ApicId[3].

Signed-off-by: Liao Xuan <liaoxuan@hygon.cn>
Reviewed-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Reviewed-by: Artie Ding <artie.ding@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3406
2024-06-26 02:41:52 -04:00
Liao Xuan 60964146b7 anolis: perf/x86/uncore: Add L3 PMU support for Hygon family 18h model 7h
ANBZ: #9404

From model 6h, Hygon processors can use the same L3 PMU slicemask
and threadmask.

Signed-off-by: Liao Xuan <liaoxuan@hygon.cn>
Reviewed-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Reviewed-by: Artie Ding <artie.ding@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3405
2024-06-26 04:24:37 +00:00
Liao Xuan ab4dcfbbbe anolis: EDAC/amd64: Add support for Hygon family 18h model 7h
ANBZ: #9404

Add Hygon family 18h model 7h processor support for amd64_edac.

Signed-off-by: Liao Xuan <liaoxuan@hygon.cn>
Reviewed-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Reviewed-by: Artie Ding <artie.ding@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3405
2024-06-26 04:24:37 +00:00
Liao Xuan 722a2bf2ba anolis: x86/amd_nb: Add support for Hygon family 18h model 7h
ANBZ: #9404

Add Hygon family 18h model 7h processor support for amd_nb.

Signed-off-by: Liao Xuan <liaoxuan@hygon.cn>
Reviewed-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Reviewed-by: Artie Ding <artie.ding@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3405
2024-06-26 04:24:37 +00:00
YiLin.Li 2f12e62107 anolis: Revert "tpm: add support for partial reads"
ANBZ: #9397

This reverts commit 47413af3f4.

This patch affects the normal use of tpm2_pcrlist. Thus revert it.

Signed-off-by: YiLin.Li <YiLin.Li@linux.alibaba.com>
Reviewed-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Reviewed-by: Guixin Liu <kanie@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3403
2024-06-21 19:44:59 +08:00
Gao Xiang 23b3b1f886 erofs: avoid allocating DEFLATE streams before mounting
ANBZ: #9242

commit 80eb4f6205 upstream

Currently, each DEFLATE stream takes one 32 KiB permanent internal
window buffer even if there is no running instance which uses DEFLATE
algorithm.

It's unexpected and wasteful on embedded devices with limited resources
and servers with hundreds of CPU cores if DEFLATE is enabled but unused.

Fixes: ffa09b3bd0 ("erofs: DEFLATE compression support")
Cc: <stable@vger.kernel.org> # 6.6+
Reviewed-by: Sandeep Dhavale <dhavale@google.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240520090106.2898681-1-hsiangkao@linux.alibaba.com
Signed-off-by: Hongzhen Luo <hongzhen@linux.alibaba.com>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3281
2024-06-05 03:09:49 +00:00
Hongzhen Luo c01e8ac00d erofs: derive fsid from on-disk UUID for .statfs() if possible
ANBZ: #9242

commit 1872df8dcd upstream

Use the superblock's UUID to generate the fsid when it's non-null.

Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: Jingbo Xu <jefflexu@linux.alibaba.com>
Signed-off-by: Hongzhen Luo <hongzhen@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240409113022.74720-1-hongzhen@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3281
2024-06-05 03:09:49 +00:00
Amir Goldstein f0ae098e58 fs: introduce a wrapper uuid_to_fsid()
ANBZ: #9242

commit 9591c3a34f upstream

Some filesystem's use a digest of their uuid for f_fsid.
Create a simple wrapper for this open coded folding.

Filesystems that have a non null uuid but use the block device
number for f_fsid may also consider using this helper.

[JK: Added missing asm/byteorder.h include]
Link: https://lore.kernel.org/r/20210322173944.449469-2-amir73il@gmail.com
Acked-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Hongzhen Luo <hongzhen@linux.alibaba.com>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3281
2024-06-05 03:09:49 +00:00
Al Viro e44ca1325b [PATCH] reduce boilerplate in fsid handling
ANBZ: #9242

commit 6d1349c769 upstream

Get rid of boilerplate in most of ->statfs()
instances...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Hongzhen Luo <hongzhen@linux.alibaba.com>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3281
2024-06-05 03:09:49 +00:00
Duanqiang Wen 342ba9005d anolis: net: txgbe: fix semaphore can't acquire
ANBZ: #9271

above 0x2000f firmware version, fireware will access
i2c, driver and firmware maybe race the i2c bus, so
add semaphore to protect i2c bus.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3309
2024-06-03 17:29:41 +08:00
Yuanhe Shu 1559785612 anolis: Revert "bpf: add bpf helper bpf_skb_ecn_set_ce"
ANBZ: #9263

This reverts commit 7f3defbff2.

Some tools that detect kernel support for bpf_skb_ecn_set_ce
assume that tc queue_mapping writes are also supported,
but the kernel does not support this. Thus revert it.

Signed-off-by: Yuanhe Shu <xiangzao@linux.alibaba.com>
Reviewed-by: Tianchen Ding <dtcccc@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3301
2024-06-03 02:21:14 +00:00
Duanqiang Wen fdb5e67c7d anolis: net: txgbe: support to set multi rss when sriov is enabled
ANBZ: #8072

multi rss mode when sriov is enabled, so ethtool -X to set
ethx indir table or rss hash key need to support multi rss mode.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen c5eae6144f anolis: net: txgbe:support for set vf mac with zero_ether_addr
ANBZ: #8072

ip link set dev ethx vf 0 mac 00:00:00:00:00:00 will return -EINVAL
allow the mac address of vf to be set to all zero.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen dfc4b97b61 anolis: net: txgbe: support for vf trust setting
ANBZ: #8072

support for ip link command to set vf trust on or
off.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen 0f9665679a anolis: net: txgbe: fix to create fdir rule index 0
ANBZ: #8072

When the 2046th rule is created, this rule index is 0. If no ether
type filter has been created, this info of rule 0 will be confused.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen 672981178d anolis: net: txgbe: close rx-vlan-offload rx-vlan-stag-filter together
ANBZ: #8072

when close rx-vlan-filter feature, rx-vlan-stag-filter feature not close,
when close rx-vlan-offload feature, it not work as expected.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen 626bf1926f anolis: net: txgbe: fix combined queue num error
ANBZ: #8072

ethtool -l ethx show error combined queue num.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen 63c75247db anolis: net: txgbe: fix mailbox error when echo vf
ANBZ: #8072

when vf driver make modules_install,
if echo vf of different ports successively,
there will be problems with the mailbox lock.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen 31a26be1ba anolis: net: txgbe: fix ethtool set rss indir table
ANBZ: #8072

ethtool -X ethx equal/weight, can't update
ethx rss indir table.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen 058e67ee39 anolis: net: txgbe: show max_combined wrong when enable sriov
ANBZ: #8072

when enable sriov, ethtool -l ethx to get port
pre-set max_combined always be 1, but in reality
max_combined depends on num_vfs.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen 4f08963061 anolis: net: txgbevf: support for vf rss
ANBZ: #8072

support to virtual function rss features.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen 2dda2f6f04 anolis: net: txgbevf: fix vf queues maximum
ANBZ: #8072

fix vf only supports a maximum of 2 queues,
get maximum of queues for pf msg[TXGBE_VF_RX_QUEUES]
and msg[TXGBE_VF_TX_QUEUES]. set maximum of queues to
4.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen bbaa246502 anolis: net: txgbe: support to add ether type filter by ethtool
ANBZ: #8072

support to add ether type filter by ethtool and fix vf rss function.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen 05464c990e anolis: net: txgbe: add led blink support for oem id 0x1ff9
ANBZ: #8072

ethtool -p ethx, add support for oem id 0x1ff9.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen 65b7bbfdcd anolis: net: txgbe: fix ethtool -t loopback test failed
ANBZ: #8072

in version 5042000f firmware, ethtool -t ethx will failed.
because diag_test will clear driver load bit and lan reset,
and then firmware will configuration pcs, it will cause loopback
test failed.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen 48e24cb036 anolis: net: txgbe: support copper modules and DAC
ANBZ: #8072

add support for detecting copper module link status
and DAC cable.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen e8e8e274be anolis: net: txgbe: fix cannot link to 10G
ANBZ: #8072

fix ethool -s ethx autoneg on cannot link to 10G,
step:
1.ethtool -s eth0 speed 1000 duplex full autoneg on
2.unplug eth0 fiber
3.ethtool -s eth0 autoneg on
4.plug fiber
link speed is 1G.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen 1f2ec94aa0 anolis: net: txgbe: return error code for unsupported parameters
ANBZ: #8072

When do ethtool -C, if not change any coalesce parameters supported
will return -EINVAL.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen ccb245692a anolis: net: txgbe: support for 802.1ad
ANBZ: #8072

add support for 802.1ad vlan, offload setting
follows 802.1q vlan setting.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen 6867fd682f anolis: net: txgbe: add support to show fw version on vf
ANBZ: #8072

add support for show fw version on vf driver.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen f435e65a3b anolis: net: txgbe:set i2c_speed to standard mode
ANBZ: #8072

real i2c speed larger than standard mode, set i2c
speed to standard mode.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen 1c68adced0 anolis: net: txgbe: sriov mode can't enable lro
ANBZ: #8072

after enabling sriov mode, ethtool -k to set ntuple on
will return requested on, and setting is not effective.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen 2410a678b3 anolis: txgbevf: fix make allyesconfig build failed
ANBZ: #8072

make allyesconfig, build failed because multiple
definition, change txgbevf module function names.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen 26fab43533 anolis: net: txgbe: support for pf change ntuple setting
ANBZ: #8072

ethtool -k ethx show ntuple setting is fixed,
add support fot changing ntuple setting.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen 544be4200a anolis: net: txgbe: fix set vf ntuple rule cannot work
ANBZ: #8072

pf ethtool operation for ntuple setting, is not
supported for vf, add support for ntuple rules to
flow packets to vf queue.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen 93c4c80423 anolis: net: wangxun: change driver version
ANBZ: #8072

append driver version with anolis,
it is helpful to distinguish inbox driver
and out of tree driver.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen b3718d5c2e anolis: net: txgbe: fix qinq or double vlan tso is not work
ANBZ: #8072

add ndo_fetures_check for double vlan or qinq to fix
tso bug.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen 2486231a5a anolis: net: txgbe: fix different vlanid can send to virtual function
ANBZ: #8072

pf ack vf vlan setting, didn't check vid in active_vlan.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Duanqiang Wen c806ad788a anolis: config: default to build txgbevf for module
ANBZ: #8072

default to build txgbevf for module, only in
x86 and arm64 arch.

Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
DuanqiangWen ddb0a323cf anolis: net: txgbevf: add support for power management
ANBZ: #8072

add support for power management interface,
for suspending and resuming nic.

Signed-off-by: DuanqiangWen <duanqiangwen@net-swift.com>
Reviewed-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
DuanqiangWen 34cc16beef anolis: net: anolis: add support for ethtool
ANBZ: #8072

add support for ethtool, use ethtool
can get some virtual function information.

Signed-off-by: DuanqiangWen <duanqiangwen@net-swift.com>
Reviewed-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
DuanqiangWen 19411b102a anolis: net: txgbevf: add support for tx/rx traffic
ANBZ: #8072

add xmit and receive codes for virtual function.

Signed-off-by: DuanqiangWen <duanqiangwen@net-swift.com>
Reviewed-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
DuanqiangWen 5a6f19204f anolis: net: txgbevf: add hardware initialization
ANBZ: #8072

initialize hardware, including vf mac layer,
mailbox interface.

Signed-off-by: DuanqiangWen <duanqiangwen@net-swift.com>
Reviewed-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
DuanqiangWen 59cb85c93e anolis: net: txgbevf: Add build support for txgbevf
ANBZ: #8072

Add doc build infrastructure for txgbevf driver.
Initialize PCI memory space for WangXun 10 Gigabit
virtual function Ethernet devices.

Signed-off-by: DuanqiangWen <duanqiangwen@net-swift.com>
Reviewed-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3121
2024-05-27 07:30:09 +00:00
Ricardo B. Marliere 8d56d12294 media: pvrusb2: fix use after free on context disconnection
ANBZ: #8555

commit ded85b0c0e upstream.

Upon module load, a kthread is created targeting the
pvr2_context_thread_func function, which may call pvr2_context_destroy
and thus call kfree() on the context object. However, that might happen
before the usb hub_event handler is able to notify the driver. This
patch adds a sanity check before the invalid read reported by syzbot,
within the context disconnection call stack.

Reported-and-tested-by: syzbot+621409285c4156a009b3@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/000000000000a02a4205fff8eb92@google.com/

Fixes: e5be15c638 ("V4L/DVB (7711): pvrusb2: Fix race on module unload")
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>

Fixes: CVE-2023-52445
Signed-off-by: Xiao Long <xiaolong@openanolis.org>
Signed-off-by: Qinyun Tan <qinyuntan@linux.alibaba.com>
Reviewed-by: Xunlei Pang <xlpang@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3021
2024-05-22 12:03:38 +00:00