tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: d3ae2925a8986f17b9b1a4b026403edaf8286665
commit: 6636f4434a9c5c9c645694db206188ee5a6626dd [13350/23911] ext4: report error to userspace by netlink
config: x86_64-buildonly-randconfig-003-20241030 (https://download.01.org/0day-ci/archive/20241101/202411011008.jiA2icMS-lkp@…)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241101/202411011008.jiA2icMS-lkp@…)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411011008.jiA2icMS-lkp@intel.com/
All errors (new ones prefixed by >>):
ld: warning: arch/x86/lib/csum-copy_64.o: missing .note.GNU-stack section implies executable stack
ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
ld: warning: arch/x86/lib/csum-copy_64.o: missing .note.GNU-stack section implies executable stack
ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
ld: warning: .tmp_vmlinux1 has a LOAD segment with RWX permissions
ld: kernel/sched/cputime.o: in function `sched_idle_time_adjust':
cputime.c:(.text+0xa05): undefined reference to `get_idle_time'
ld: fs/ext4/super.o: in function `ext4_netlink_send_info':
>> super.c:(.text+0x149f3): undefined reference to `__alloc_skb'
>> ld: super.c:(.text+0x14ac9): undefined reference to `__nlmsg_put'
>> ld: super.c:(.text+0x14af3): undefined reference to `kfree_skb'
>> ld: super.c:(.text+0x14b59): undefined reference to `netlink_broadcast'
ld: fs/ext4/super.o: in function `ext4_init_fs':
>> super.c:(.init.text+0x95bf): undefined reference to `init_net'
>> ld: super.c:(.init.text+0x95c4): undefined reference to `__netlink_kernel_create'
ld: fs/ext4/super.o: in function `ext4_exit_fs':
>> super.c:(.exit.text+0x93): undefined reference to `netlink_kernel_release'
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
From: Kaixin Wang <kxwang23(a)m.fudan.edu.cn>
mainline inclusion
from mainline-v6.12-rc1
commit 61850725779709369c7e907ae8c7c75dc7cec4f3
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAYRD2
CVE: CVE-2024-49874
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?…
--------------------------------
In the svc_i3c_master_probe function, &master->hj_work is bound with
svc_i3c_master_hj_work, &master->ibi_work is bound with
svc_i3c_master_ibi_work. And svc_i3c_master_ibi_work can start the
hj_work, svc_i3c_master_irq_handler can start the ibi_work.
If we remove the module which will call svc_i3c_master_remove to
make cleanup, it will free master->base through i3c_master_unregister
while the work mentioned above will be used. The sequence of operations
that may lead to a UAF bug is as follows:
CPU0 CPU1
| svc_i3c_master_hj_work
svc_i3c_master_remove |
i3c_master_unregister(&master->base)|
device_unregister(&master->dev) |
device_release |
//free master->base |
| i3c_master_do_daa(&master->base)
| //use master->base
Fix it by ensuring that the work is canceled before proceeding with the
cleanup in svc_i3c_master_remove.
Fixes: 0f74f8b6675c ("i3c: Make i3c_master_unregister() return void")
Cc: stable(a)vger.kernel.org
Signed-off-by: Kaixin Wang <kxwang23(a)m.fudan.edu.cn>
Reviewed-by: Miquel Raynal <miquel.raynal(a)bootlin.com>
Reviewed-by: Frank Li <Frank.Li(a)nxp.com>
Link: https://lore.kernel.org/stable/20240914154030.180-1-kxwang23%40m.fudan.edu.…
Link: https://lore.kernel.org/r/20240914163932.253-1-kxwang23@m.fudan.edu.cn
Signed-off-by: Alexandre Belloni <alexandre.belloni(a)bootlin.com>
Signed-off-by: He Yujie <coka.heyujie(a)huawei.com>
---
drivers/i3c/master/svc-i3c-master.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index acc937275c18..f344f8733f83 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -1697,6 +1697,7 @@ static void svc_i3c_master_remove(struct platform_device *pdev)
{
struct svc_i3c_master *master = platform_get_drvdata(pdev);
+ cancel_work_sync(&master->hj_work);
i3c_master_unregister(&master->base);
pm_runtime_dont_use_autosuspend(&pdev->dev);
--
2.34.1
hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IAX0HW
--------------------------------
The BTF information of the data structure in the kernel module
is generated based on the corresponding kernel's base BTF when
compiling the kernel module. When the kernel module is loaded
into other kernels, unpredictable BTF verification errors will
occur due to different base BTF, which will lead to the kernel
module loading failed. Disable CONFIG_DEBUG_INFO_BTF_MODULES
will skip the kernel module BTF verification.
Fixes: 4d88af8133c4 ("config: add initial openeuler_defconfig for x86")
Fixes: 3c70ec8dbed1 ("config: add initial openeuler_defconfig for arm64")
Signed-off-by: Pu Lehui <pulehui(a)huawei.com>
---
arch/arm64/configs/openeuler_defconfig | 2 +-
arch/x86/configs/openeuler_defconfig | 2 +-
include/linux/module.h | 3 +++
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/configs/openeuler_defconfig b/arch/arm64/configs/openeuler_defconfig
index 96ca8b990e22..3304cf0bd9e1 100644
--- a/arch/arm64/configs/openeuler_defconfig
+++ b/arch/arm64/configs/openeuler_defconfig
@@ -7923,7 +7923,7 @@ CONFIG_DEBUG_INFO_COMPRESSED_NONE=y
CONFIG_DEBUG_INFO_BTF=y
CONFIG_PAHOLE_HAS_SPLIT_BTF=y
CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
-CONFIG_DEBUG_INFO_BTF_MODULES=y
+# CONFIG_DEBUG_INFO_BTF_MODULES is not set
# CONFIG_MODULE_ALLOW_BTF_MISMATCH is not set
# CONFIG_GDB_SCRIPTS is not set
CONFIG_FRAME_WARN=2048
diff --git a/arch/x86/configs/openeuler_defconfig b/arch/x86/configs/openeuler_defconfig
index d95d966f7fb2..6bf96adf974a 100644
--- a/arch/x86/configs/openeuler_defconfig
+++ b/arch/x86/configs/openeuler_defconfig
@@ -9076,7 +9076,7 @@ CONFIG_DEBUG_INFO_COMPRESSED_NONE=y
CONFIG_DEBUG_INFO_BTF=y
CONFIG_PAHOLE_HAS_SPLIT_BTF=y
CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
-CONFIG_DEBUG_INFO_BTF_MODULES=y
+# CONFIG_DEBUG_INFO_BTF_MODULES is not set
# CONFIG_MODULE_ALLOW_BTF_MISMATCH is not set
# CONFIG_GDB_SCRIPTS is not set
CONFIG_FRAME_WARN=2048
diff --git a/include/linux/module.h b/include/linux/module.h
index 4db2878d9e42..990f9d66d2f1 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -516,6 +516,9 @@ struct module {
#ifdef CONFIG_DEBUG_INFO_BTF_MODULES
unsigned int btf_data_size;
void *btf_data;
+#else
+ KABI_DEPRECATE(unsigned int, btf_data_size)
+ KABI_DEPRECATE(void *, btf_data)
#endif
#ifdef CONFIG_JUMP_LABEL
struct jump_entry *jump_entries;
--
2.34.1
From: Zheng Wang <zyytlz.wz(a)163.com>
stable inclusion
from stable-v5.10.227
commit 60b6968341a6dd5353554f3e72db554693a128a5
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAYRCM
CVE: CVE-2024-49981
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
--------------------------------
commit c5a85ed88e043474161bbfe54002c89c1cb50ee2 upstream.
in venus_probe, core->work is bound with venus_sys_error_handler, which is
used to handle error. The code use core->sys_err_done to make sync work.
The core->work is started in venus_event_notify.
If we call venus_remove, there might be an unfished work. The possible
sequence is as follows:
CPU0 CPU1
|venus_sys_error_handler
venus_remove |
hfi_destroy |
venus_hfi_destroy |
kfree(hdev); |
|hfi_reinit
|venus_hfi_queues_reinit
|//use hdev
Fix it by canceling the work in venus_remove.
Cc: stable(a)vger.kernel.org
Fixes: af2c3834c8ca ("[media] media: venus: adding core part and helper functions")
Signed-off-by: Zheng Wang <zyytlz.wz(a)163.com>
Signed-off-by: Dikshita Agarwal <quic_dikshita(a)quicinc.com>
Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov(a)gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Signed-off-by: Lin Ruifeng <linruifeng4(a)huawei.com>
---
drivers/media/platform/qcom/venus/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 5f7ac2807e5f..c757cab6b335 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -366,6 +366,7 @@ static int venus_remove(struct platform_device *pdev)
struct device *dev = core->dev;
int ret;
+ cancel_delayed_work_sync(&core->work);
ret = pm_runtime_get_sync(dev);
WARN_ON(ret < 0);
--
2.17.1
From: Zheng Wang <zyytlz.wz(a)163.com>
stable inclusion
from stable-v6.6.55
commit b0686aedc5f1343442d044bd64eeac7e7a391f4e
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAYRCM
CVE: CVE-2024-49981
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
--------------------------------
commit c5a85ed88e043474161bbfe54002c89c1cb50ee2 upstream.
in venus_probe, core->work is bound with venus_sys_error_handler, which is
used to handle error. The code use core->sys_err_done to make sync work.
The core->work is started in venus_event_notify.
If we call venus_remove, there might be an unfished work. The possible
sequence is as follows:
CPU0 CPU1
|venus_sys_error_handler
venus_remove |
hfi_destroy |
venus_hfi_destroy |
kfree(hdev); |
|hfi_reinit
|venus_hfi_queues_reinit
|//use hdev
Fix it by canceling the work in venus_remove.
Cc: stable(a)vger.kernel.org
Fixes: af2c3834c8ca ("[media] media: venus: adding core part and helper functions")
Signed-off-by: Zheng Wang <zyytlz.wz(a)163.com>
Signed-off-by: Dikshita Agarwal <quic_dikshita(a)quicinc.com>
Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov(a)gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Signed-off-by: Lin Ruifeng <linruifeng4(a)huawei.com>
---
drivers/media/platform/qcom/venus/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 054b8e74ba4f..0fc9414f8f18 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -424,6 +424,7 @@ static void venus_remove(struct platform_device *pdev)
struct device *dev = core->dev;
int ret;
+ cancel_delayed_work_sync(&core->work);
ret = pm_runtime_get_sync(dev);
WARN_ON(ret < 0);
--
2.17.1