mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Kernel

Threads by month
  • ----- 2025 -----
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
kernel@openeuler.org

  • 51 participants
  • 18725 discussions
[PATCH OLK-5.10] ima: Avoid blocking in RCU read-side critical section
by GUO Zihua 19 Apr '24

19 Apr '24
Offering: HULK hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9HXKB -------------------------------- A panic happens in ima_match_policy: BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 PGD 42f873067 P4D 0 Oops: 0000 [#1] SMP NOPTI CPU: 5 PID: 1286325 Comm: kubeletmonit.sh Kdump: loaded Tainted: P Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015 RIP: 0010:ima_match_policy+0x84/0x450 Code: 49 89 fc 41 89 cf 31 ed 89 44 24 14 eb 1c 44 39 7b 18 74 26 41 83 ff 05 74 20 48 8b 1b 48 3b 1d f2 b9 f4 00 0f 84 9c 01 00 00 <44> 85 73 10 74 ea 44 8b 6b 14 41 f6 c5 01 75 d4 41 f6 c5 02 74 0f RSP: 0018:ff71570009e07a80 EFLAGS: 00010207 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000200 RDX: ffffffffad8dc7c0 RSI: 0000000024924925 RDI: ff3e27850dea2000 RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffffabfce739 R10: ff3e27810cc42400 R11: 0000000000000000 R12: ff3e2781825ef970 R13: 00000000ff3e2785 R14: 000000000000000c R15: 0000000000000001 FS: 00007f5195b51740(0000) GS:ff3e278b12d40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000010 CR3: 0000000626d24002 CR4: 0000000000361ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ima_get_action+0x22/0x30 process_measurement+0xb0/0x830 ima_file_check+0x64/0x90 path_openat+0x571/0x1720 do_filp_open+0x9b/0x110 do_sys_open+0x1bd/0x250 do_syscall_64+0x5d/0x1d0 entry_SYSCALL_64_after_hwframe+0x65/0xca (stack trace marked with ? is deleted) Commit da75a4d99c7d ("ima: Handle -ESTALE returned by ima_filter_rule_match()") introduced call to ima_lsm_copy_rule within a RCU read-side critical section which contains kmalloc with GFP_KERNEL. This implies a possible sleep and violates limitations of RCU read-side critical sections on non-PREEMPT systems. Sleeping within RCU read-side critical section might cause synchronize_rcu() returning early and break RCU protection, allowing a UAF to happen. The root cause of this issue could be described as follows: | Thread A | Thread B | | |ima_match_policy | | | rcu_read_lock | |ima_lsm_update_rule | | | synchronize_rcu | | | | kmalloc(GFP_KERNEL)| | | sleep | ==> synchronize_rcu returns early | kfree(entry) | | | | entry = entry->next| ==> UAF happens and entry now becomes NULL (or could be anything). | | entry->action | ==> Accessing entry might cause panic. To fix this issue, we are converting all kmalloc that is called within RCU read-side critical section to use GFP_ATOMIC. Fixes: da75a4d99c7d ("ima: Handle -ESTALE returned by ima_filter_rule_match()") Signed-off-by: GUO Zihua <guozihua(a)huawei.com> --- security/integrity/ima/ima_policy.c | 2 +- security/selinux/ss/services.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c index a0b0008efc91..a9dbfc7143b3 100644 --- a/security/integrity/ima/ima_policy.c +++ b/security/integrity/ima/ima_policy.c @@ -407,7 +407,7 @@ static struct ima_rule_entry *ima_lsm_copy_rule(struct ima_rule_entry *entry) * Immutable elements are copied over as pointers and data; only * lsm rules can change */ - nentry = kmemdup(entry, sizeof(*nentry), GFP_KERNEL); + nentry = kmemdup(entry, sizeof(*nentry), GFP_ATOMIC); if (!nentry) return NULL; diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index 23f441b09c70..09412253e08f 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -3584,7 +3584,7 @@ int selinux_audit_rule_init(u32 field, u32 op, char *rulestr, void **vrule) return -EINVAL; } - tmprule = kzalloc(sizeof(struct selinux_audit_rule), GFP_KERNEL); + tmprule = kzalloc(sizeof(struct selinux_audit_rule), GFP_ATOMIC); if (!tmprule) return -ENOMEM; -- 2.34.1
2 1
0 0
[PATCH openEuler-1.0-LTS v2] ima: Avoid blocking in RCU read-side critical section
by GUO Zihua 19 Apr '24

19 Apr '24
Offering: HULK hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9HXKB -------------------------------- A panic happens in ima_match_policy: BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 PGD 42f873067 P4D 0 Oops: 0000 [#1] SMP NOPTI CPU: 5 PID: 1286325 Comm: kubeletmonit.sh Kdump: loaded Tainted: P Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015 RIP: 0010:ima_match_policy+0x84/0x450 Code: 49 89 fc 41 89 cf 31 ed 89 44 24 14 eb 1c 44 39 7b 18 74 26 41 83 ff 05 74 20 48 8b 1b 48 3b 1d f2 b9 f4 00 0f 84 9c 01 00 00 <44> 85 73 10 74 ea 44 8b 6b 14 41 f6 c5 01 75 d4 41 f6 c5 02 74 0f RSP: 0018:ff71570009e07a80 EFLAGS: 00010207 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000200 RDX: ffffffffad8dc7c0 RSI: 0000000024924925 RDI: ff3e27850dea2000 RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffffabfce739 R10: ff3e27810cc42400 R11: 0000000000000000 R12: ff3e2781825ef970 R13: 00000000ff3e2785 R14: 000000000000000c R15: 0000000000000001 FS: 00007f5195b51740(0000) GS:ff3e278b12d40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000010 CR3: 0000000626d24002 CR4: 0000000000361ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ima_get_action+0x22/0x30 process_measurement+0xb0/0x830 ima_file_check+0x64/0x90 path_openat+0x571/0x1720 do_filp_open+0x9b/0x110 do_sys_open+0x1bd/0x250 do_syscall_64+0x5d/0x1d0 entry_SYSCALL_64_after_hwframe+0x65/0xca (stack trace marked with ? is deleted) Commit 52ba0e0b05fd ("ima: Handle -ESTALE returned by ima_filter_rule_match()") introduced call to ima_lsm_copy_rule within a RCU read-side critical section which contains kmalloc with GFP_KERNEL. This implies a possible sleep and violates limitations of RCU read-side critical sections on non-PREEMPT systems. Sleeping within RCU read-side critical section might cause synchronize_rcu() returning early and break RCU protection, allowing a UAF to happen. The root cause of this issue could be described as follows: | Thread A | Thread B | | |ima_match_policy | | | rcu_read_lock | |ima_lsm_update_rule | | | synchronize_rcu | | | | kmalloc(GFP_KERNEL)| | | sleep | ==> synchronize_rcu returns early | kfree(entry) | | | | entry = entry->next| ==> UAF happens and entry now becomes NULL (or could be anything). | | entry->action | ==> Accessing entry might cause panic. To fix this issue, we are converting all kmalloc that is called within RCU read-side critical section to use GFP_ATOMIC. Fixes: 52ba0e0b05fd ("ima: Handle -ESTALE returned by ima_filter_rule_match()") Signed-off-by: GUO Zihua <guozihua(a)huawei.com> --- v2: Added inclusion and changed fixed commit. --- security/integrity/ima/ima_policy.c | 4 ++-- security/selinux/ss/services.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c index d71273898d40..08eae4df759e 100644 --- a/security/integrity/ima/ima_policy.c +++ b/security/integrity/ima/ima_policy.c @@ -266,7 +266,7 @@ static struct ima_rule_entry *ima_lsm_copy_rule(struct ima_rule_entry *entry) struct ima_rule_entry *nentry; int i; - nentry = kmalloc(sizeof(*nentry), GFP_KERNEL); + nentry = kmalloc(sizeof(*nentry), GFP_ATOMIC); if (!nentry) return NULL; @@ -283,7 +283,7 @@ static struct ima_rule_entry *ima_lsm_copy_rule(struct ima_rule_entry *entry) nentry->lsm[i].type = entry->lsm[i].type; nentry->lsm[i].args_p = kstrdup(entry->lsm[i].args_p, - GFP_KERNEL); + GFP_ATOMIC); if (!nentry->lsm[i].args_p) goto out_err; diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index a9f2bc8443bd..a1ea7d90ce4f 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -3328,7 +3328,7 @@ int selinux_audit_rule_init(u32 field, u32 op, char *rulestr, void **vrule) return -EINVAL; } - tmprule = kzalloc(sizeof(struct selinux_audit_rule), GFP_KERNEL); + tmprule = kzalloc(sizeof(struct selinux_audit_rule), GFP_ATOMIC); if (!tmprule) return -ENOMEM; -- 2.34.1
2 1
0 0
[PATCH openEuler-1.0-LTS] ima: Avoid blocking in RCU read-side critical section
by GUO Zihua 19 Apr '24

19 Apr '24
A panic happens in ima_match_policy: BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 PGD 42f873067 P4D 0 Oops: 0000 [#1] SMP NOPTI CPU: 5 PID: 1286325 Comm: kubeletmonit.sh Kdump: loaded Tainted: P Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015 RIP: 0010:ima_match_policy+0x84/0x450 Code: 49 89 fc 41 89 cf 31 ed 89 44 24 14 eb 1c 44 39 7b 18 74 26 41 83 ff 05 74 20 48 8b 1b 48 3b 1d f2 b9 f4 00 0f 84 9c 01 00 00 <44> 85 73 10 74 ea 44 8b 6b 14 41 f6 c5 01 75 d4 41 f6 c5 02 74 0f RSP: 0018:ff71570009e07a80 EFLAGS: 00010207 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000200 RDX: ffffffffad8dc7c0 RSI: 0000000024924925 RDI: ff3e27850dea2000 RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffffabfce739 R10: ff3e27810cc42400 R11: 0000000000000000 R12: ff3e2781825ef970 R13: 00000000ff3e2785 R14: 000000000000000c R15: 0000000000000001 FS: 00007f5195b51740(0000) GS:ff3e278b12d40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000010 CR3: 0000000626d24002 CR4: 0000000000361ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ima_get_action+0x22/0x30 process_measurement+0xb0/0x830 ima_file_check+0x64/0x90 path_openat+0x571/0x1720 do_filp_open+0x9b/0x110 do_sys_open+0x1bd/0x250 do_syscall_64+0x5d/0x1d0 entry_SYSCALL_64_after_hwframe+0x65/0xca (stack trace marked with ? is deleted) Commit 8b6ccf254610 ("ima: Handle -ESTALE returned by ima_filter_rule_match()") introduced call to ima_lsm_copy_rule within a RCU read-side critical section which contains kmalloc with GFP_KERNEL. This implies a possible sleep and violates limitations of RCU read-side critical sections on non-PREEMPT systems. Sleeping within RCU read-side critical section might cause synchronize_rcu() returning early and break RCU protection, allowing a UAF to happen. The root cause of this issue could be described as follows: | Thread A | Thread B | | |ima_match_policy | | | rcu_read_lock | |ima_lsm_update_rule | | | synchronize_rcu | | | | kmalloc(GFP_KERNEL)| | | sleep | ==> synchronize_rcu returns early | kfree(entry) | | | | entry = entry->next| ==> UAF happens and entry now becomes NULL (or could be anything). | | entry->action | ==> Accessing entry might cause panic. To fix this issue, we are converting all kmalloc that is called within RCU read-side critical section to use GFP_ATOMIC. Fixes: 8b6ccf254610 ("ima: Handle -ESTALE returned by ima_filter_rule_match()") Signed-off-by: GUO Zihua <guozihua(a)huawei.com> --- security/integrity/ima/ima_policy.c | 4 ++-- security/selinux/ss/services.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c index d71273898d40..08eae4df759e 100644 --- a/security/integrity/ima/ima_policy.c +++ b/security/integrity/ima/ima_policy.c @@ -266,7 +266,7 @@ static struct ima_rule_entry *ima_lsm_copy_rule(struct ima_rule_entry *entry) struct ima_rule_entry *nentry; int i; - nentry = kmalloc(sizeof(*nentry), GFP_KERNEL); + nentry = kmalloc(sizeof(*nentry), GFP_ATOMIC); if (!nentry) return NULL; @@ -283,7 +283,7 @@ static struct ima_rule_entry *ima_lsm_copy_rule(struct ima_rule_entry *entry) nentry->lsm[i].type = entry->lsm[i].type; nentry->lsm[i].args_p = kstrdup(entry->lsm[i].args_p, - GFP_KERNEL); + GFP_ATOMIC); if (!nentry->lsm[i].args_p) goto out_err; diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index a9f2bc8443bd..a1ea7d90ce4f 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -3328,7 +3328,7 @@ int selinux_audit_rule_init(u32 field, u32 op, char *rulestr, void **vrule) return -EINVAL; } - tmprule = kzalloc(sizeof(struct selinux_audit_rule), GFP_KERNEL); + tmprule = kzalloc(sizeof(struct selinux_audit_rule), GFP_ATOMIC); if (!tmprule) return -ENOMEM; -- 2.34.1
2 1
0 0
[openeuler:OLK-5.10] BUILD REGRESSION b74d64b81bf5004a1815ba86ab889500f492dc3e
by kernel test robot 19 Apr '24

19 Apr '24
tree/branch: https://gitee.com/openeuler/kernel.git OLK-5.10 branch HEAD: b74d64b81bf5004a1815ba86ab889500f492dc3e !6262 scsi: hisi_sas: Remove hisi_hba->timer for v3 hw Error/Warning ids grouped by kconfigs: gcc_recent_errors |-- arm64-allnoconfig | |-- arch-arm64-kernel-ipi_nmi.c:error:implicit-declaration-of-function-printk_safe_enter | |-- arch-arm64-kernel-ipi_nmi.c:error:implicit-declaration-of-function-printk_safe_exit | |-- kernel-sched-core.c:error:implicit-declaration-of-function-init_auto_affinity | |-- kernel-sched-core.c:error:implicit-declaration-of-function-tg_update_affinity_domains | |-- kernel-sched-core.c:error:root_task_group-undeclared-(first-use-in-this-function) | |-- kernel-workqueue.c:error:implicit-declaration-of-function-printk_safe_enter | `-- kernel-workqueue.c:error:implicit-declaration-of-function-printk_safe_exit |-- x86_64-buildonly-randconfig-005-20240418 | |-- kernel-sched-core.c:error:implicit-declaration-of-function-init_auto_affinity | |-- kernel-sched-core.c:error:implicit-declaration-of-function-tg_update_affinity_domains | `-- kernel-sched-core.c:error:root_task_group-undeclared-(first-use-in-this-function) |-- x86_64-randconfig-006-20240418 | |-- kernel-sched-core.c:error:implicit-declaration-of-function-init_auto_affinity | |-- kernel-sched-core.c:error:implicit-declaration-of-function-tg_update_affinity_domains | `-- kernel-sched-core.c:error:root_task_group-undeclared-(first-use-in-this-function) |-- x86_64-randconfig-016-20240418 | |-- kernel-sched-core.c:error:implicit-declaration-of-function-init_auto_affinity | |-- kernel-sched-core.c:error:implicit-declaration-of-function-tg_update_affinity_domains | `-- kernel-sched-core.c:error:root_task_group-undeclared-(first-use-in-this-function) |-- x86_64-randconfig-075-20240418 | |-- kernel-sched-core.c:error:implicit-declaration-of-function-init_auto_affinity | |-- kernel-sched-core.c:error:implicit-declaration-of-function-tg_update_affinity_domains | `-- kernel-sched-core.c:error:root_task_group-undeclared-(first-use-in-this-function) `-- x86_64-randconfig-076-20240418 |-- kernel-sched-core.c:error:implicit-declaration-of-function-init_auto_affinity |-- kernel-sched-core.c:error:implicit-declaration-of-function-tg_update_affinity_domains `-- kernel-sched-core.c:error:root_task_group-undeclared-(first-use-in-this-function) clang_recent_errors |-- arm64-allyesconfig | |-- Documentation-devicetree-bindings-arm-cpu.yaml:properties:capacity-dmips-mhz:ref-should-not-be-valid-under-const:ref | |-- Documentation-devicetree-bindings-arm-cpu.yaml:title:ARM-CPUs-bindings-should-not-be-valid-under-pattern:(-Bb-inding-Ss-chema) | |-- Documentation-devicetree-bindings-arm-cpus.yaml:examples:cpus-arm-pbha-performance-only-bits-arm-pbha-no-aliases-bits-ncpu-device_type-cpu-compatible-arm-cortex-a57-...-n-is-not-of-type-array | |-- Documentation-devicetree-bindings-arm-cpus.yaml:maintainers-is-a-required-property | |-- description:Display-controller-reference-clock-source-is-not-of-type-object-boolean | |-- description:Display-controller-reference-clock-source-is-too-short | |-- description:Offset-and-length-of-the-memory-mapped-registers-is-too-short | |-- items-is-not-one-of-type-description-dependencies-dependentRequired-dependentSchemas-properties-patternProperties-additionalProperties-unevaluatedProperties-deprecated-required-not-allOf-anyOf-oneOf-r | `-- minItems-is-not-one-of-type-description-dependencies-dependentRequired-dependentSchemas-properties-patternProperties-additionalProperties-unevaluatedProperties-deprecated-required-not-allOf-anyOf-oneO |-- x86_64-allnoconfig | `-- drivers-net-ethernet-mucse-rnpm-rnpm_common.h:linux-version.h-not-needed. `-- x86_64-allyesconfig |-- drivers-net-ethernet-bzwx-nce-comm-txrx.c:fatal-error:ne6x_trace.h-file-not-found |-- drivers-net-ethernet-bzwx-nce-ne6x-ne6x.h:fatal-error:reg.h-file-not-found `-- drivers-net-ethernet-bzwx-nce-ne6x_vf-ne6xvf.h:fatal-error:reg.h-file-not-found elapsed time: 722m configs tested: 35 configs skipped: 131 tested configs: arm64 allmodconfig clang arm64 allnoconfig gcc arm64 defconfig gcc arm64 randconfig-001-20240418 clang arm64 randconfig-002-20240418 gcc arm64 randconfig-003-20240418 gcc arm64 randconfig-004-20240418 gcc x86_64 allnoconfig clang x86_64 allyesconfig clang x86_64 buildonly-randconfig-001-20240418 clang x86_64 buildonly-randconfig-002-20240418 clang x86_64 buildonly-randconfig-003-20240418 clang x86_64 buildonly-randconfig-004-20240418 clang x86_64 buildonly-randconfig-005-20240418 gcc x86_64 buildonly-randconfig-006-20240418 clang x86_64 defconfig gcc x86_64 randconfig-001-20240418 gcc x86_64 randconfig-002-20240418 clang x86_64 randconfig-003-20240418 gcc x86_64 randconfig-004-20240418 clang x86_64 randconfig-005-20240418 gcc x86_64 randconfig-006-20240418 gcc x86_64 randconfig-011-20240418 clang x86_64 randconfig-012-20240418 gcc x86_64 randconfig-013-20240418 clang x86_64 randconfig-014-20240418 gcc x86_64 randconfig-015-20240418 gcc x86_64 randconfig-016-20240418 gcc x86_64 randconfig-071-20240418 gcc x86_64 randconfig-072-20240418 clang x86_64 randconfig-073-20240418 clang x86_64 randconfig-074-20240418 gcc x86_64 randconfig-075-20240418 gcc x86_64 randconfig-076-20240418 gcc x86_64 rhel-8.3-rust clang -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS] BUILD SUCCESS WITH WARNING cc163ca2127ce6ebda08bc76d555cdabfb19ef65
by kernel test robot 19 Apr '24

19 Apr '24
tree/branch: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS branch HEAD: cc163ca2127ce6ebda08bc76d555cdabfb19ef65 !6084 netlink: Fix kernel-infoleak-after-free in __skb_datagram_iter Warning reports: https://lore.kernel.org/oe-kbuild-all/202404190005.E7Ruoi45-lkp@intel.com Warning: (recently discovered and may have been fixed) fs/proc/array.c:565:9: warning: 'min_flt' may be used uninitialized [-Wmaybe-uninitialized] fs/proc/array.c:567:9: warning: 'maj_flt' may be used uninitialized [-Wmaybe-uninitialized] fs/proc/array.c:614:9: warning: 'gtime' may be used uninitialized [-Wmaybe-uninitialized] Warning ids grouped by kconfigs: gcc_recent_errors |-- arm64-randconfig-003-20240418 | `-- include-linux-uaccess.h:warning:hlp-may-be-used-uninitialized |-- x86_64-buildonly-randconfig-005-20240418 | |-- fs-proc-array.c:warning:gtime-may-be-used-uninitialized | |-- fs-proc-array.c:warning:maj_flt-may-be-used-uninitialized | `-- fs-proc-array.c:warning:min_flt-may-be-used-uninitialized |-- x86_64-defconfig | |-- include-linux-list.h:warning:array-subscript-pfo_ret__-is-outside-array-bounds-of-struct-plist_node | |-- include-linux-plist.h:warning:array-subscript-pfo_ret__-is-outside-array-bounds-of-struct-plist_node | `-- mm-swapfile.c:warning:array-subscript-pfo_ret__-is-outside-array-bounds-of-struct-plist_node |-- x86_64-randconfig-006-20240418 | |-- include-linux-compiler.h:warning:array-subscript-index-is-outside-array-bounds-of-u32-aka-unsigned-int | `-- include-linux-compiler.h:warning:array-subscript-unknown-is-outside-array-bounds-of-const-u32-aka-const-unsigned-int |-- x86_64-randconfig-012-20240418 | |-- include-linux-compiler.h:warning:array-subscript-index-is-outside-array-bounds-of-u32-aka-unsigned-int | `-- include-linux-compiler.h:warning:array-subscript-unknown-is-outside-array-bounds-of-const-u32-aka-const-unsigned-int |-- x86_64-randconfig-016-20240418 | |-- include-linux-compiler.h:warning:array-subscript-index-is-outside-array-bounds-of-u32-aka-unsigned-int | |-- include-linux-compiler.h:warning:array-subscript-unknown-is-outside-array-bounds-of-const-u32-aka-const-unsigned-int | |-- include-linux-list.h:warning:array-subscript-pfo_ret__-is-outside-array-bounds-of-struct-plist_node | |-- include-linux-plist.h:warning:array-subscript-pfo_ret__-is-outside-array-bounds-of-struct-plist_node | `-- mm-swapfile.c:warning:array-subscript-pfo_ret__-is-outside-array-bounds-of-struct-plist_node `-- x86_64-randconfig-075-20240418 |-- include-linux-compiler.h:warning:array-subscript-index-is-outside-array-bounds-of-u32-aka-unsigned-int `-- include-linux-compiler.h:warning:array-subscript-unknown-is-outside-array-bounds-of-const-u32-aka-const-unsigned-int elapsed time: 734m configs tested: 35 configs skipped: 131 tested configs: arm64 allmodconfig gcc arm64 allnoconfig gcc arm64 defconfig gcc arm64 randconfig-001-20240418 gcc arm64 randconfig-002-20240418 gcc arm64 randconfig-003-20240418 gcc arm64 randconfig-004-20240418 gcc x86_64 allnoconfig clang x86_64 allyesconfig clang x86_64 buildonly-randconfig-001-20240418 clang x86_64 buildonly-randconfig-002-20240418 clang x86_64 buildonly-randconfig-003-20240418 clang x86_64 buildonly-randconfig-004-20240418 clang x86_64 buildonly-randconfig-005-20240418 gcc x86_64 buildonly-randconfig-006-20240418 clang x86_64 defconfig gcc x86_64 randconfig-001-20240418 gcc x86_64 randconfig-002-20240418 clang x86_64 randconfig-003-20240418 gcc x86_64 randconfig-004-20240418 clang x86_64 randconfig-005-20240418 gcc x86_64 randconfig-006-20240418 gcc x86_64 randconfig-011-20240418 clang x86_64 randconfig-012-20240418 gcc x86_64 randconfig-013-20240418 clang x86_64 randconfig-014-20240418 gcc x86_64 randconfig-015-20240418 gcc x86_64 randconfig-016-20240418 gcc x86_64 randconfig-071-20240418 gcc x86_64 randconfig-072-20240418 clang x86_64 randconfig-073-20240418 clang x86_64 randconfig-074-20240418 gcc x86_64 randconfig-075-20240418 gcc x86_64 randconfig-076-20240418 gcc x86_64 rhel-8.3-rust clang -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6] BUILD REGRESSION 0c8d7c8805654c00e2ddbf715482283f7f0b7639
by kernel test robot 19 Apr '24

19 Apr '24
tree/branch: https://gitee.com/openeuler/kernel.git OLK-6.6 branch HEAD: 0c8d7c8805654c00e2ddbf715482283f7f0b7639 !6201 v2 mm: some optimization about hugetlb and thp Error/Warning ids grouped by kconfigs: gcc_recent_errors |-- arm64-allnoconfig | `-- arch-arm64-kernel-cpufeature.c:error:enable_pseudo_nmi-undeclared-(first-use-in-this-function) |-- arm64-randconfig-003-20240418 | `-- shadow.c:(.text):undefined-reference-to-__memcpy_mc |-- loongarch-allmodconfig | |-- drivers-net-ethernet-bzwx-nce-comm-txrx.c:fatal-error:ne6x_trace.h:No-such-file-or-directory | |-- drivers-net-ethernet-bzwx-nce-ne6x-ne6x.h:fatal-error:reg.h:No-such-file-or-directory | |-- drivers-net-ethernet-bzwx-nce-ne6x_vf-ne6xvf.h:fatal-error:reg.h:No-such-file-or-directory | |-- drivers-net-ethernet-mucse-rnp-rnp_main.c:warning:Function-parameter-or-member-netdev-not-described-in-rnp_netpoll | |-- drivers-net-ethernet-mucse-rnp-rnp_main.c:warning:expecting-prototype-for-Polling-interrupt-().-Prototype-was-for-rnp_netpoll()-instead | |-- drivers-net-ethernet-mucse-rnp-rnp_mbx_fw.c:warning:This-comment-starts-with-but-isn-t-a-kernel-doc-comment.-Refer-Documentation-doc-guide-kernel-doc.rst | |-- drivers-net-ethernet-mucse-rnpm-rnpm_common.c:warning:expecting-prototype-for-rnpm_enable_rx_buff().-Prototype-was-for-rnpm_enable_rx_buff_generic()-instead | |-- drivers-net-ethernet-mucse-rnpm-rnpm_common.c:warning:expecting-prototype-for-rnpm_update_mc_addr_list_generic().-Prototype-was-for-rnpm_update_mutiport_mc_addr_list_generic()-instead | |-- drivers-net-ethernet-mucse-rnpm-rnpm_debugfs.c:warning:expecting-prototype-for-rnpm_dbg_reg_ops_write().-Prototype-was-for-rnpm_dbg_phy_ops_write()-instead | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:no-previous-prototype-for-rnpm_get_phy_statistics | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:no-previous-prototype-for-rnpm_setup_layer2_remapping | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:no-previous-prototype-for-rnpm_setup_tuple5_remapping | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:no-previous-prototype-for-rnpm_setup_tuple5_remapping_tcam | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:directive-output-may-be-truncated-writing-byte-into-a-region-of-size-between-and | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:expecting-prototype-for-ixgbe_write_eitr().-Prototype-was-for-rnpm_write_eitr()-instead | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:expecting-prototype-for-rnp_irq_affinity_notify().-Prototype-was-for-rnpm_irq_affinity_notify()-instead | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:expecting-prototype-for-rnp_irq_affinity_release().-Prototype-was-for-rnpm_irq_affinity_release()-instead | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:expecting-prototype-for-rnp_is_non_eop().-Prototype-was-for-rnpm_is_non_eop()-instead | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:expecting-prototype-for-rnpm_set_ivar().-Prototype-was-for-rnpm_set_ring_vector()-instead | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-clean_all_port_resetting | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-control_mac_rx | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-rnpm_assign_netdev_ops | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-rnpm_can_rpu_start | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-rnpm_check_mc_addr | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-rnpm_clear_udp_tunnel_port | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-rnpm_fix_queue_number | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-rnpm_pf_service_event_schedule | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-rnpm_pf_service_task | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-rnpm_pf_service_timer | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-rnpm_rx_ring_reinit | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-rnpm_service_timer | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-rnpm_vlan_stags_flag | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-rnpm_write_eitr | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-rnpm_xmit_nop_frame_ring | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-rnpm_xmit_nop_frame_ring_temp | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-update_pf_vlan | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-wait_all_port_resetting | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:Cannot-understand-speed: | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:build_writereg_req-accessing-bytes-in-a-region-of-size | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:no-previous-prototype-for-mbx_cookie_zalloc | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:no-previous-prototype-for-rnpm_fw_get_capablity | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:no-previous-prototype-for-rnpm_fw_reg_read | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:no-previous-prototype-for-rnpm_fw_send_cmd_wait | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:no-previous-prototype-for-rnpm_get_port_stats2 | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:no-previous-prototype-for-rnpm_link_stat_mark_disable | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:no-previous-prototype-for-rnpm_mbx_fw_post_req | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:no-previous-prototype-for-rnpm_mbx_lldp_all_ports_enable | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:no-previous-prototype-for-rnpm_mbx_pluginout_evt_en | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:no-previous-prototype-for-rnpm_mbx_write_posted_locked | |-- drivers-net-ethernet-mucse-rnpm-rnpm_n10.c:warning:expecting-prototype-for-rnpm_atr_add_signature_filter_n10().-Prototype-was-for-rnpm_fdir_add_signature_filter_n10()-instead | |-- drivers-net-ethernet-mucse-rnpm-rnpm_n10.c:warning:no-previous-prototype-for-rnpm_reset_pipeline_n10 | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ptp.c:warning:no-previous-prototype-for-rnpm_ptp_setup_ptp | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ptp.c:warning:suggest-braces-around-empty-body-in-an-if-statement | |-- drivers-net-ethernet-mucse-rnpm-rnpm_sriov.c:warning:no-previous-prototype-for-rnpm_get_vf_ringnum | |-- drivers-net-ethernet-mucse-rnpm-rnpm_sriov.c:warning:no-previous-prototype-for-rnpm_setup_ring_maxrate | |-- drivers-net-ethernet-mucse-rnpm-rnpm_sriov.c:warning:variable-y-set-but-not-used | |-- drivers-net-ethernet-mucse-rnpm-rnpm_sysfs.c:warning:no-previous-prototype-for-rnpm_mbx_get_pn_sn | |-- drivers-net-ethernet-mucse-rnpm-rnpm_tc_u32_parse.h:warning:rnpm_ipv4_parser-defined-but-not-used | |-- drivers-net-ethernet-mucse-rnpvf-rnpvf_main.c:warning:d-directive-output-may-be-truncated-writing-between-and-bytes-into-a-region-of-size-between-and | `-- drivers-net-ethernet-mucse-rnpvf-rnpvf_main.c:warning:no-previous-prototype-for-rnpvf_alloc_rx_buffers `-- x86_64-randconfig-075-20240418 |-- drivers-net-ethernet-huawei-hinic-hinic_api_cmd.c:warning:expecting-prototype-for-prepare_cell().-Prototype-was-for-wait_for_resp_polling()-instead |-- drivers-net-ethernet-huawei-hinic-hinic_eqs.c:warning:expecting-prototype-for-hinic_aeq_register_sw_cb().-Prototype-was-for-hinic_aeq_register_swe_cb()-instead |-- drivers-net-ethernet-huawei-hinic-hinic_eqs.c:warning:expecting-prototype-for-hinic_aeq_unregister_sw_cb().-Prototype-was-for-hinic_aeq_unregister_swe_cb()-instead |-- drivers-net-ethernet-huawei-hinic-hinic_eqs.c:warning:expecting-prototype-for-hinic_ceq_register_sw_cb().-Prototype-was-for-hinic_ceq_register_cb()-instead |-- drivers-net-ethernet-huawei-hinic-hinic_hwif.c:warning:This-comment-starts-with-but-isn-t-a-kernel-doc-comment.-Refer-Documentation-doc-guide-kernel-doc.rst |-- drivers-net-ethernet-huawei-hinic-hinic_mbox.c:warning:expecting-prototype-for-hinic_unregister_ppf_mbox_cb().-Prototype-was-for-hinic_unregister_pf_mbox_cb()-instead |-- drivers-net-ethernet-huawei-hinic-hinic_mbox.c:warning:expecting-prototype-for-hinic_unregister_ppf_mbox_cb().-Prototype-was-for-hinic_unregister_ppf_to_pf_mbox_cb()-instead `-- drivers-net-ethernet-huawei-hinic-hinic_mgmt.c:warning:This-comment-starts-with-but-isn-t-a-kernel-doc-comment.-Refer-Documentation-doc-guide-kernel-doc.rst clang_recent_errors |-- arm64-allmodconfig | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwdev_init.c:warning:no-previous-prototype-for-function-sss_deinit_hwdev | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwdev_init.c:warning:no-previous-prototype-for-function-sss_hwdev_detach | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwdev_init.c:warning:no-previous-prototype-for-function-sss_hwdev_shutdown | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwdev_init.c:warning:no-previous-prototype-for-function-sss_hwdev_stop | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwdev_init.c:warning:no-previous-prototype-for-function-sss_init_hwdev | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwdev_init.c:warning:variable-fault_level-set-but-not-used | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwdev_init.c:warning:variable-pcie_src-set-but-not-used | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwdev_io_flush.c:warning:no-previous-prototype-for-function-sss_hwdev_flush_io | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwdev_mgmt_info.c:warning:no-previous-prototype-for-function-sss_deinit_mgmt_info | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwdev_mgmt_info.c:warning:no-previous-prototype-for-function-sss_init_mgmt_info | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_adm.c:warning:no-previous-prototype-for-function-sss_adm_msg_read | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_adm.c:warning:no-previous-prototype-for-function-sss_adm_msg_read_ack | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_adm.c:warning:no-previous-prototype-for-function-sss_adm_msg_write | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_adm.c:warning:no-previous-prototype-for-function-sss_adm_msg_write_nack | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_adm.c:warning:no-previous-prototype-for-function-sss_sync_send_adm_msg | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_adm_init.c:warning:no-previous-prototype-for-function-sss_complete_adm_event | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_adm_init.c:warning:no-previous-prototype-for-function-sss_destroy_adm_msg | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_adm_init.c:warning:no-previous-prototype-for-function-sss_hwif_deinit_adm | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_adm_init.c:warning:no-previous-prototype-for-function-sss_hwif_init_adm | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_ceq.c:warning:no-previous-prototype-for-function-sss_ceq_intr_handle | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_ceq.c:warning:no-previous-prototype-for-function-sss_init_ceqe_desc | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_ctrlq_init.c:warning:no-previous-prototype-for-function-sss_ctrlq_flush_sync_cmd | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_ctrlq_init.c:warning:no-previous-prototype-for-function-sss_deinit_ctrlq | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_ctrlq_init.c:warning:no-previous-prototype-for-function-sss_deinit_ctrlq_channel | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_ctrlq_init.c:warning:no-previous-prototype-for-function-sss_init_ctrlq_channel | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_ctrlq_init.c:warning:no-previous-prototype-for-function-sss_reinit_ctrlq_ctx | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_ctrlq_init.c:warning:no-previous-prototype-for-function-sss_wait_ctrlq_stop | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_export.c:warning:no-previous-prototype-for-function-sss_alloc_db_addr | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_export.c:warning:no-previous-prototype-for-function-sss_chip_set_msix_auto_mask | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_export.c:warning:no-previous-prototype-for-function-sss_chip_set_msix_state | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_export.c:warning:no-previous-prototype-for-function-sss_free_db_addr | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_export.c:warning:no-previous-prototype-for-function-sss_get_func_id | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_export.c:warning:no-previous-prototype-for-function-sss_get_func_type | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_export.c:warning:no-previous-prototype-for-function-sss_get_glb_pf_vf_offset | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_export.c:warning:no-previous-prototype-for-function-sss_get_global_func_id | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_export.c:warning:no-previous-prototype-for-function-sss_get_pcie_itf_id | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_export.c:warning:no-previous-prototype-for-function-sss_get_pf_id_of_vf | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_export.c:warning:no-previous-prototype-for-function-sss_get_ppf_id | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_irq.c:warning:no-previous-prototype-for-function-sss_deinit_irq_info | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_irq.c:warning:no-previous-prototype-for-function-sss_init_irq_info | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_mbx_init.c:warning:no-previous-prototype-for-function-sss_hwif_deinit_mbx | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_mbx_init.c:warning:no-previous-prototype-for-function-sss_hwif_init_mbx | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_mbx_init.c:warning:no-previous-prototype-for-function-sss_init_func_mbx_msg | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_mbx_init.c:warning:no-previous-prototype-for-function-sss_recv_mbx_aeq_handler | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_mgmt_init.c:warning:no-previous-prototype-for-function-sss_flush_mgmt_workq | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_mgmt_init.c:warning:no-previous-prototype-for-function-sss_force_complete_all | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_hwif_mgmt_init.c:warning:no-previous-prototype-for-function-sss_mgmt_msg_aeqe_handler | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_pci_error.c:warning:no-previous-prototype-for-function-sss_detect_pci_error | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_pci_global.c:warning:no-previous-prototype-for-function-sss_attach_is_enable | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_pci_global.c:warning:no-previous-prototype-for-function-sss_get_uld_info | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_pci_global.c:warning:no-previous-prototype-for-function-sss_get_uld_names | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_pci_global.c:warning:no-previous-prototype-for-function-sss_init_uld_lock | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_pci_global.c:warning:no-previous-prototype-for-function-sss_lock_uld | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_pci_global.c:warning:no-previous-prototype-for-function-sss_unlock_uld | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_pci_probe.c:warning:no-previous-prototype-for-function-sss_attach_uld_driver | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_pci_probe.c:warning:no-previous-prototype-for-function-sss_pci_probe | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_pci_remove.c:warning:no-previous-prototype-for-function-sss_deinit_adapter | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_pci_remove.c:warning:no-previous-prototype-for-function-sss_deinit_function | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_pci_remove.c:warning:no-previous-prototype-for-function-sss_deinit_pci_dev | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_pci_remove.c:warning:no-previous-prototype-for-function-sss_detach_all_uld_driver | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_pci_remove.c:warning:no-previous-prototype-for-function-sss_detach_uld_driver | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_pci_remove.c:warning:no-previous-prototype-for-function-sss_dettach_uld_dev | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_pci_remove.c:warning:no-previous-prototype-for-function-sss_pci_remove | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_pci_remove.c:warning:no-previous-prototype-for-function-sss_unmap_pci_bar | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-sss_pci_shutdown.c:warning:no-previous-prototype-for-function-sss_pci_shutdown | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-tool-sss_tool_chip.c:warning:no-previous-prototype-for-function-sss_tool_adm_csr_rd32 | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-tool-sss_tool_chip.c:warning:no-previous-prototype-for-function-sss_tool_adm_csr_wr32 | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-tool-sss_tool_chip.c:warning:no-previous-prototype-for-function-sss_tool_send_clp_msg | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-tool-sss_tool_main.c:warning:no-previous-prototype-for-function-sss_tool_alloc_in_buf | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-tool-sss_tool_main.c:warning:no-previous-prototype-for-function-sss_tool_alloc_out_buf | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-tool-sss_tool_main.c:warning:no-previous-prototype-for-function-sss_tool_copy_to_user | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-tool-sss_tool_main.c:warning:no-previous-prototype-for-function-sss_tool_free_in_buf | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-tool-sss_tool_main.c:warning:no-previous-prototype-for-function-sss_tool_free_out_buf | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-tool-sss_tool_sdk.c:warning:no-previous-prototype-for-function-sss_tool_get_func_id | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-tool-sss_tool_sdk.c:warning:no-previous-prototype-for-function-sss_tool_get_func_type | |-- drivers-net-ethernet-3snic-sssnic-nic-..-hw-tool-sss_tool_sdk.c:warning:no-previous-prototype-for-function-sss_tool_get_hw_driver_stats | |-- drivers-net-ethernet-huawei-hinic-hinic_api_cmd.c:warning:expecting-prototype-for-prepare_cell().-Prototype-was-for-wait_for_resp_polling()-instead | |-- drivers-net-ethernet-huawei-hinic-hinic_cfg.c:warning:arithmetic-between-different-enumeration-types-(-enum-hinic_node_id-and-enum-hinic_fault_err_level-) | |-- drivers-net-ethernet-huawei-hinic-hinic_eqs.c:warning:expecting-prototype-for-hinic_aeq_register_sw_cb().-Prototype-was-for-hinic_aeq_register_swe_cb()-instead | |-- drivers-net-ethernet-huawei-hinic-hinic_eqs.c:warning:expecting-prototype-for-hinic_aeq_unregister_sw_cb().-Prototype-was-for-hinic_aeq_unregister_swe_cb()-instead | |-- drivers-net-ethernet-huawei-hinic-hinic_eqs.c:warning:expecting-prototype-for-hinic_ceq_register_sw_cb().-Prototype-was-for-hinic_ceq_register_cb()-instead | |-- drivers-net-ethernet-huawei-hinic-hinic_hwdev.c:warning:arithmetic-between-different-enumeration-types-(-enum-hinic_node_id-and-enum-hinic_fault_err_level-) | |-- drivers-net-ethernet-huawei-hinic-hinic_hwif.c:warning:This-comment-starts-with-but-isn-t-a-kernel-doc-comment.-Refer-Documentation-doc-guide-kernel-doc.rst | |-- drivers-net-ethernet-huawei-hinic-hinic_mbox.c:warning:expecting-prototype-for-hinic_unregister_ppf_mbox_cb().-Prototype-was-for-hinic_unregister_pf_mbox_cb()-instead | |-- drivers-net-ethernet-huawei-hinic-hinic_mbox.c:warning:expecting-prototype-for-hinic_unregister_ppf_mbox_cb().-Prototype-was-for-hinic_unregister_ppf_to_pf_mbox_cb()-instead | |-- drivers-net-ethernet-huawei-hinic-hinic_mgmt.c:warning:This-comment-starts-with-but-isn-t-a-kernel-doc-comment.-Refer-Documentation-doc-guide-kernel-doc.rst | |-- drivers-net-ethernet-huawei-hinic-hinic_nic_dbg.c:warning:arithmetic-between-different-enumeration-types-(-enum-hinic_node_id-and-enum-hinic_fault_err_level-) | |-- drivers-net-ethernet-huawei-hinic3-hw-hinic3_api_cmd.c:warning:expecting-prototype-for-alloc_cmd_buf().-Prototype-was-for-alloc_resp_buf()-instead | |-- drivers-net-ethernet-huawei-hinic3-hw-hinic3_api_cmd.c:warning:expecting-prototype-for-prepare_cell().-Prototype-was-for-wait_for_resp_polling()-instead | |-- drivers-net-ethernet-huawei-hinic3-hw-hinic3_devlink.c:warning:variable-pdev-set-but-not-used | |-- drivers-net-ethernet-huawei-hinic3-hw-hinic3_mbox.c:warning:expecting-prototype-for-hinic3_unregister_ppf_mbox_cb().-Prototype-was-for-hinic3_unregister_pf_mbox_cb()-instead | |-- drivers-net-ethernet-huawei-hinic3-hw-hinic3_mbox.c:warning:expecting-prototype-for-hinic3_unregister_ppf_mbox_cb().-Prototype-was-for-hinic3_unregister_ppf_to_pf_mbox_cb()-instead | |-- drivers-net-ethernet-huawei-hinic3-hw-hinic3_mgmt.c:warning:This-comment-starts-with-but-isn-t-a-kernel-doc-comment.-Refer-Documentation-doc-guide-kernel-doc.rst | |-- drivers-net-ethernet-huawei-hinic3-hw-hinic3_mgmt.c:warning:expecting-prototype-for-hinic_pf_to_mgmt_free().-Prototype-was-for-hinic3_pf_to_mgmt_free()-instead | |-- drivers-net-ethernet-huawei-hinic3-hw-hinic3_mgmt.c:warning:expecting-prototype-for-hinic_pf_to_mgmt_init().-Prototype-was-for-hinic3_pf_to_mgmt_init()-instead | |-- drivers-net-ethernet-mucse-rnp-rnp_main.c:warning:Function-parameter-or-member-netdev-not-described-in-rnp_netpoll | |-- drivers-net-ethernet-mucse-rnp-rnp_main.c:warning:expecting-prototype-for-Polling-interrupt-().-Prototype-was-for-rnp_netpoll()-instead | |-- drivers-net-ethernet-mucse-rnp-rnp_mbx_fw.c:warning:This-comment-starts-with-but-isn-t-a-kernel-doc-comment.-Refer-Documentation-doc-guide-kernel-doc.rst | |-- drivers-net-ethernet-mucse-rnpm-rnpm_common.c:warning:expecting-prototype-for-rnpm_enable_rx_buff().-Prototype-was-for-rnpm_enable_rx_buff_generic()-instead | |-- drivers-net-ethernet-mucse-rnpm-rnpm_common.c:warning:expecting-prototype-for-rnpm_update_mc_addr_list_generic().-Prototype-was-for-rnpm_update_mutiport_mc_addr_list_generic()-instead | |-- drivers-net-ethernet-mucse-rnpm-rnpm_debugfs.c:warning:expecting-prototype-for-rnpm_dbg_reg_ops_write().-Prototype-was-for-rnpm_dbg_phy_ops_write()-instead | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:no-previous-prototype-for-function-rnpm_get_phy_statistics | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:expecting-prototype-for-ixgbe_write_eitr().-Prototype-was-for-rnpm_write_eitr()-instead | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:expecting-prototype-for-rnp_irq_affinity_notify().-Prototype-was-for-rnpm_irq_affinity_notify()-instead | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:expecting-prototype-for-rnp_irq_affinity_release().-Prototype-was-for-rnpm_irq_affinity_release()-instead | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:expecting-prototype-for-rnp_is_non_eop().-Prototype-was-for-rnpm_is_non_eop()-instead | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:expecting-prototype-for-rnpm_set_ivar().-Prototype-was-for-rnpm_set_ring_vector()-instead | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:Cannot-understand-speed: | |-- drivers-net-ethernet-mucse-rnpm-rnpm_n10.c:warning:expecting-prototype-for-rnpm_atr_add_signature_filter_n10().-Prototype-was-for-rnpm_fdir_add_signature_filter_n10()-instead | |-- drivers-net-ethernet-mucse-rnpm-rnpm_sriov.c:warning:no-previous-prototype-for-function-rnpm_get_vf_ringnum | |-- drivers-net-ethernet-mucse-rnpm-rnpm_sriov.c:warning:no-previous-prototype-for-function-rnpm_setup_ring_maxrate | |-- drivers-net-ethernet-mucse-rnpm-rnpm_sriov.c:warning:variable-y-set-but-not-used | |-- drivers-scsi-hisi_raid-hiraid_main.c:warning:expecting-prototype-for-hiraid_create_cq().-Prototype-was-for-hiraid_create_complete_queue()-instead | `-- drivers-scsi-hisi_raid-hiraid_main.c:warning:expecting-prototype-for-hiraid_create_sq().-Prototype-was-for-hiraid_create_send_queue()-instead `-- arm64-randconfig-001-20240418 |-- drivers-net-ethernet-huawei-hinic-hinic_api_cmd.c:warning:expecting-prototype-for-prepare_cell().-Prototype-was-for-wait_for_resp_polling()-instead |-- drivers-net-ethernet-huawei-hinic-hinic_cfg.c:warning:arithmetic-between-different-enumeration-types-(-enum-hinic_node_id-and-enum-hinic_fault_err_level-) |-- drivers-net-ethernet-huawei-hinic-hinic_dcb.c:error:incomplete-definition-of-type-struct-ieee_ets |-- drivers-net-ethernet-huawei-hinic-hinic_dcb.c:error:incomplete-definition-of-type-struct-ieee_pfc |-- drivers-net-ethernet-huawei-hinic-hinic_dcb.c:error:invalid-application-of-sizeof-to-an-incomplete-type-struct-ieee_ets |-- drivers-net-ethernet-huawei-hinic-hinic_dcb.c:error:invalid-application-of-sizeof-to-an-incomplete-type-struct-ieee_pfc |-- drivers-net-ethernet-huawei-hinic-hinic_dcb.c:error:use-of-undeclared-identifier-DCB_ATTR_VALUE_UNDEFINED |-- drivers-net-ethernet-huawei-hinic-hinic_dcb.c:error:use-of-undeclared-identifier-DCB_CAP_DCBX_HOST |-- drivers-net-ethernet-huawei-hinic-hinic_dcb.c:error:use-of-undeclared-identifier-DCB_CAP_DCBX_VER_CEE |-- drivers-net-ethernet-huawei-hinic-hinic_eqs.c:warning:expecting-prototype-for-hinic_aeq_register_sw_cb().-Prototype-was-for-hinic_aeq_register_swe_cb()-instead |-- drivers-net-ethernet-huawei-hinic-hinic_eqs.c:warning:expecting-prototype-for-hinic_aeq_unregister_sw_cb().-Prototype-was-for-hinic_aeq_unregister_swe_cb()-instead |-- drivers-net-ethernet-huawei-hinic-hinic_eqs.c:warning:expecting-prototype-for-hinic_ceq_register_sw_cb().-Prototype-was-for-hinic_ceq_register_cb()-instead |-- drivers-net-ethernet-huawei-hinic-hinic_hwdev.c:warning:arithmetic-between-different-enumeration-types-(-enum-hinic_node_id-and-enum-hinic_fault_err_level-) |-- drivers-net-ethernet-huawei-hinic-hinic_hwif.c:warning:This-comment-starts-with-but-isn-t-a-kernel-doc-comment.-Refer-Documentation-doc-guide-kernel-doc.rst |-- drivers-net-ethernet-huawei-hinic-hinic_main.c:error:call-to-undeclared-function-vlan_dev_priv-ISO-C99-and-later-do-not-support-implicit-function-declarations |-- drivers-net-ethernet-huawei-hinic-hinic_main.c:error:member-reference-type-int-is-not-a-pointer |-- drivers-net-ethernet-huawei-hinic-hinic_main.c:error:no-member-named-dcbnl_ops-in-struct-net_device |-- drivers-net-ethernet-huawei-hinic-hinic_mbox.c:warning:expecting-prototype-for-hinic_unregister_ppf_mbox_cb().-Prototype-was-for-hinic_unregister_pf_mbox_cb()-instead |-- drivers-net-ethernet-huawei-hinic-hinic_mbox.c:warning:expecting-prototype-for-hinic_unregister_ppf_mbox_cb().-Prototype-was-for-hinic_unregister_ppf_to_pf_mbox_cb()-instead |-- drivers-net-ethernet-huawei-hinic-hinic_mgmt.c:warning:This-comment-starts-with-but-isn-t-a-kernel-doc-comment.-Refer-Documentation-doc-guide-kernel-doc.rst |-- drivers-net-ethernet-huawei-hinic-hinic_nic_dbg.c:warning:arithmetic-between-different-enumeration-types-(-enum-hinic_node_id-and-enum-hinic_fault_err_level-) |-- drivers-net-ethernet-huawei-hinic-hinic_nic_dev.h:error:field-has-incomplete-type-struct-ieee_ets `-- drivers-net-ethernet-huawei-hinic-hinic_nic_dev.h:error:field-has-incomplete-type-struct-ieee_pfc elapsed time: 734m configs tested: 40 configs skipped: 126 tested configs: arm64 allmodconfig clang arm64 allnoconfig gcc arm64 defconfig gcc arm64 randconfig-001-20240418 clang arm64 randconfig-002-20240418 gcc arm64 randconfig-003-20240418 gcc arm64 randconfig-004-20240418 gcc loongarch allmodconfig gcc loongarch allnoconfig gcc loongarch defconfig gcc loongarch randconfig-001-20240418 gcc loongarch randconfig-002-20240418 gcc x86_64 allnoconfig clang x86_64 allyesconfig clang x86_64 buildonly-randconfig-001-20240418 clang x86_64 buildonly-randconfig-002-20240418 clang x86_64 buildonly-randconfig-003-20240418 clang x86_64 buildonly-randconfig-004-20240418 clang x86_64 buildonly-randconfig-005-20240418 gcc x86_64 buildonly-randconfig-006-20240418 clang x86_64 defconfig gcc x86_64 randconfig-001-20240418 gcc x86_64 randconfig-002-20240418 clang x86_64 randconfig-003-20240418 gcc x86_64 randconfig-004-20240418 clang x86_64 randconfig-005-20240418 gcc x86_64 randconfig-006-20240418 gcc x86_64 randconfig-011-20240418 clang x86_64 randconfig-012-20240418 gcc x86_64 randconfig-013-20240418 clang x86_64 randconfig-014-20240418 gcc x86_64 randconfig-015-20240418 gcc x86_64 randconfig-016-20240418 gcc x86_64 randconfig-071-20240418 gcc x86_64 randconfig-072-20240418 clang x86_64 randconfig-073-20240418 clang x86_64 randconfig-074-20240418 gcc x86_64 randconfig-075-20240418 gcc x86_64 randconfig-076-20240418 gcc x86_64 rhel-8.3-rust clang -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 22104/22139] fs/proc/array.c:614:9: warning: 'gtime' may be used uninitialized
by kernel test robot 19 Apr '24

19 Apr '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: cc163ca2127ce6ebda08bc76d555cdabfb19ef65 commit: 4f8730514c736b09927b1b9c08ad946b70639545 [22104/22139] fs/proc: do_task_stat: use sig->stats_lock to gather the threads/children stats config: x86_64-buildonly-randconfig-005-20240418 (https://download.01.org/0day-ci/archive/20240419/202404190005.E7Ruoi45-lkp@…) compiler: gcc-12 (Ubuntu 12.3.0-9ubuntu2) 12.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240419/202404190005.E7Ruoi45-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/202404190005.E7Ruoi45-lkp@intel.com/ Note: it may well be a FALSE warning. FWIW you are at least aware of it now. http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings All warnings (new ones prefixed by >>): In file included from include/linux/sched/signal.h:7, from include/linux/sched/cputime.h:5, from fs/proc/array.c:68: include/linux/signal.h: In function 'sigemptyset': include/linux/signal.h:180:29: warning: this statement may fall through [-Wimplicit-fallthrough=] 180 | case 2: set->sig[1] = 0; | ~~~~~~~~~~~~^~~ include/linux/signal.h:181:9: note: here 181 | case 1: set->sig[0] = 0; | ^~~~ fs/proc/array.c: In function 'do_task_stat': >> fs/proc/array.c:614:9: warning: 'gtime' may be used uninitialized [-Wmaybe-uninitialized] 614 | seq_put_decimal_ull(m, " ", nsec_to_clock_t(gtime)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/proc/array.c:447:51: note: 'gtime' was declared here 447 | u64 cutime, cstime, cgtime, utime, stime, gtime; | ^~~~~ >> fs/proc/array.c:567:9: warning: 'maj_flt' may be used uninitialized [-Wmaybe-uninitialized] 567 | seq_put_decimal_ull(m, " ", maj_flt); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/proc/array.c:446:52: note: 'maj_flt' was declared here 446 | unsigned long cmin_flt, cmaj_flt, min_flt, maj_flt; | ^~~~~~~ >> fs/proc/array.c:565:9: warning: 'min_flt' may be used uninitialized [-Wmaybe-uninitialized] 565 | seq_put_decimal_ull(m, " ", min_flt); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/proc/array.c:446:43: note: 'min_flt' was declared here 446 | unsigned long cmin_flt, cmaj_flt, min_flt, maj_flt; | ^~~~~~~ vim +/gtime +614 fs/proc/array.c ^1da177e4c3f41 Linus Torvalds 2005-04-16 432 ee992744ea53db Eric W. Biederman 2008-02-08 433 static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, ee992744ea53db Eric W. Biederman 2008-02-08 434 struct pid *pid, struct task_struct *task, int whole) ^1da177e4c3f41 Linus Torvalds 2005-04-16 435 { b2f73922d11968 Ingo Molnar 2015-09-30 436 unsigned long vsize, eip, esp, wchan = 0; 715be1fce0d964 Jan Engelhardt 2012-05-31 437 int priority, nice; ^1da177e4c3f41 Linus Torvalds 2005-04-16 438 int tty_pgrp = -1, tty_nr = 0; ^1da177e4c3f41 Linus Torvalds 2005-04-16 439 sigset_t sigign, sigcatch; ^1da177e4c3f41 Linus Torvalds 2005-04-16 440 char state; a593d6edeb0a5a Oleg Nesterov 2006-10-02 441 pid_t ppid = 0, pgid = -1, sid = -1; ^1da177e4c3f41 Linus Torvalds 2005-04-16 442 int num_threads = 0; f83ce3e6b02d5e Jake Edge 2009-05-04 443 int permitted; ^1da177e4c3f41 Linus Torvalds 2005-04-16 444 struct mm_struct *mm; ^1da177e4c3f41 Linus Torvalds 2005-04-16 445 unsigned long long start_time; 4f8730514c736b Oleg Nesterov 2024-04-13 446 unsigned long cmin_flt, cmaj_flt, min_flt, maj_flt; 4f8730514c736b Oleg Nesterov 2024-04-13 447 u64 cutime, cstime, cgtime, utime, stime, gtime; ^1da177e4c3f41 Linus Torvalds 2005-04-16 448 unsigned long rsslim = 0; a593d6edeb0a5a Oleg Nesterov 2006-10-02 449 unsigned long flags; 08132d3d089b9a Eric W. Biederman 2024-04-13 450 int exit_code = task->exit_code; 4f8730514c736b Oleg Nesterov 2024-04-13 451 struct signal_struct *sig = task->signal; 4f8730514c736b Oleg Nesterov 2024-04-13 452 unsigned int seq = 1; ^1da177e4c3f41 Linus Torvalds 2005-04-16 453 ^1da177e4c3f41 Linus Torvalds 2005-04-16 454 state = *get_task_state(task); ^1da177e4c3f41 Linus Torvalds 2005-04-16 455 vsize = eip = esp = 0; caaee6234d05a5 Jann Horn 2016-01-20 456 permitted = ptrace_may_access(task, PTRACE_MODE_READ_FSCREDS | PTRACE_MODE_NOAUDIT); ^1da177e4c3f41 Linus Torvalds 2005-04-16 457 mm = get_task_mm(task); ^1da177e4c3f41 Linus Torvalds 2005-04-16 458 if (mm) { ^1da177e4c3f41 Linus Torvalds 2005-04-16 459 vsize = task_vsize(mm); 0a1eb2d474edfe Andy Lutomirski 2016-09-30 460 /* 0a1eb2d474edfe Andy Lutomirski 2016-09-30 461 * esp and eip are intentionally zeroed out. There is no 0a1eb2d474edfe Andy Lutomirski 2016-09-30 462 * non-racy way to read them without freezing the task. 0a1eb2d474edfe Andy Lutomirski 2016-09-30 463 * Programs that need reliable values can use ptrace(2). fd7d56270b526c John Ogness 2017-09-14 464 * fd7d56270b526c John Ogness 2017-09-14 465 * The only exception is if the task is core dumping because fd7d56270b526c John Ogness 2017-09-14 466 * a program is not able to use ptrace(2) in that case. It is fd7d56270b526c John Ogness 2017-09-14 467 * safe because the task has stopped executing permanently. 0a1eb2d474edfe Andy Lutomirski 2016-09-30 468 */ ef7622dbb87776 John Ogness 2019-07-04 469 if (permitted && (task->flags & (PF_EXITING|PF_DUMPCORE))) { 8bb2ee192e482c Alexey Dobriyan 2018-01-18 470 if (try_get_task_stack(task)) { fd7d56270b526c John Ogness 2017-09-14 471 eip = KSTK_EIP(task); fd7d56270b526c John Ogness 2017-09-14 472 esp = KSTK_ESP(task); 8bb2ee192e482c Alexey Dobriyan 2018-01-18 473 put_task_stack(task); 8bb2ee192e482c Alexey Dobriyan 2018-01-18 474 } fd7d56270b526c John Ogness 2017-09-14 475 } f83ce3e6b02d5e Jake Edge 2009-05-04 476 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 477 ^1da177e4c3f41 Linus Torvalds 2005-04-16 478 sigemptyset(&sigign); ^1da177e4c3f41 Linus Torvalds 2005-04-16 479 sigemptyset(&sigcatch); 3cfd0885fac78c Alan Cox 2006-09-29 480 a593d6edeb0a5a Oleg Nesterov 2006-10-02 481 if (lock_task_sighand(task, &flags)) { 915935041281c6 Oleg Nesterov 2006-12-08 482 if (sig->tty) { 5d0fdf1e018998 Alan Cox 2008-04-30 483 struct pid *pgrp = tty_get_pgrp(sig->tty); 5d0fdf1e018998 Alan Cox 2008-04-30 484 tty_pgrp = pid_nr_ns(pgrp, ns); 5d0fdf1e018998 Alan Cox 2008-04-30 485 put_pid(pgrp); 915935041281c6 Oleg Nesterov 2006-12-08 486 tty_nr = new_encode_dev(tty_devnum(sig->tty)); a593d6edeb0a5a Oleg Nesterov 2006-10-02 487 } a593d6edeb0a5a Oleg Nesterov 2006-10-02 488 7e49827cc937a7 Oleg Nesterov 2010-05-26 489 num_threads = get_nr_threads(task); ^1da177e4c3f41 Linus Torvalds 2005-04-16 490 collect_sigign_sigcatch(task, &sigign, &sigcatch); ^1da177e4c3f41 Linus Torvalds 2005-04-16 491 6aa7de059173a9 Mark Rutland 2017-10-23 492 rsslim = READ_ONCE(sig->rlim[RLIMIT_RSS].rlim_cur); a593d6edeb0a5a Oleg Nesterov 2006-10-02 493 ^1da177e4c3f41 Linus Torvalds 2005-04-16 494 if (whole) { 08132d3d089b9a Eric W. Biederman 2024-04-13 495 if (sig->flags & (SIGNAL_GROUP_EXIT | SIGNAL_STOP_STOPPED)) 08132d3d089b9a Eric W. Biederman 2024-04-13 496 exit_code = sig->group_exit_code; ^1da177e4c3f41 Linus Torvalds 2005-04-16 497 } a593d6edeb0a5a Oleg Nesterov 2006-10-02 498 b488893a390edf Pavel Emelyanov 2007-10-18 499 sid = task_session_nr_ns(task, ns); a98fdcef941e10 Oleg Nesterov 2008-01-15 500 ppid = task_tgid_nr_ns(task->real_parent, ns); b488893a390edf Pavel Emelyanov 2007-10-18 501 pgid = task_pgrp_nr_ns(task, ns); a593d6edeb0a5a Oleg Nesterov 2006-10-02 502 a593d6edeb0a5a Oleg Nesterov 2006-10-02 503 unlock_task_sighand(task, &flags); ^1da177e4c3f41 Linus Torvalds 2005-04-16 504 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 505 f83ce3e6b02d5e Jake Edge 2009-05-04 506 if (permitted && (!whole || num_threads < 2)) ^1da177e4c3f41 Linus Torvalds 2005-04-16 507 wchan = get_wchan(task); f59c1abf66d159 Oleg Nesterov 2024-04-13 508 4f8730514c736b Oleg Nesterov 2024-04-13 509 do { 4f8730514c736b Oleg Nesterov 2024-04-13 510 seq++; /* 2 on the 1st/lockless path, otherwise odd */ 4f8730514c736b Oleg Nesterov 2024-04-13 511 flags = read_seqbegin_or_lock_irqsave(&sig->stats_lock, &seq); 4f8730514c736b Oleg Nesterov 2024-04-13 512 4f8730514c736b Oleg Nesterov 2024-04-13 513 cmin_flt = sig->cmin_flt; 4f8730514c736b Oleg Nesterov 2024-04-13 514 cmaj_flt = sig->cmaj_flt; 4f8730514c736b Oleg Nesterov 2024-04-13 515 cutime = sig->cutime; 4f8730514c736b Oleg Nesterov 2024-04-13 516 cstime = sig->cstime; 4f8730514c736b Oleg Nesterov 2024-04-13 517 cgtime = sig->cgtime; 4f8730514c736b Oleg Nesterov 2024-04-13 518 4f8730514c736b Oleg Nesterov 2024-04-13 519 if (whole) { 4f8730514c736b Oleg Nesterov 2024-04-13 520 struct task_struct *t; 4f8730514c736b Oleg Nesterov 2024-04-13 521 4f8730514c736b Oleg Nesterov 2024-04-13 522 min_flt = sig->min_flt; 4f8730514c736b Oleg Nesterov 2024-04-13 523 maj_flt = sig->maj_flt; 4f8730514c736b Oleg Nesterov 2024-04-13 524 gtime = sig->gtime; 4f8730514c736b Oleg Nesterov 2024-04-13 525 4f8730514c736b Oleg Nesterov 2024-04-13 526 rcu_read_lock(); 4f8730514c736b Oleg Nesterov 2024-04-13 527 __for_each_thread(sig, t) { 4f8730514c736b Oleg Nesterov 2024-04-13 528 min_flt += t->min_flt; 4f8730514c736b Oleg Nesterov 2024-04-13 529 maj_flt += t->maj_flt; 4f8730514c736b Oleg Nesterov 2024-04-13 530 gtime += task_gtime(t); 4f8730514c736b Oleg Nesterov 2024-04-13 531 } 4f8730514c736b Oleg Nesterov 2024-04-13 532 rcu_read_unlock(); 4f8730514c736b Oleg Nesterov 2024-04-13 533 } 4f8730514c736b Oleg Nesterov 2024-04-13 534 } while (need_seqretry(&sig->stats_lock, seq)); 4f8730514c736b Oleg Nesterov 2024-04-13 535 done_seqretry_irqrestore(&sig->stats_lock, seq, flags); 4f8730514c736b Oleg Nesterov 2024-04-13 536 f59c1abf66d159 Oleg Nesterov 2024-04-13 537 if (whole) { f59c1abf66d159 Oleg Nesterov 2024-04-13 538 thread_group_cputime_adjusted(task, &utime, &stime); f59c1abf66d159 Oleg Nesterov 2024-04-13 539 } else { f59c1abf66d159 Oleg Nesterov 2024-04-13 540 task_cputime_adjusted(task, &utime, &stime); ^1da177e4c3f41 Linus Torvalds 2005-04-16 541 min_flt = task->min_flt; ^1da177e4c3f41 Linus Torvalds 2005-04-16 542 maj_flt = task->maj_flt; 6fac4829ce0ef9 Frederic Weisbecker 2012-11-13 543 gtime = task_gtime(task); ^1da177e4c3f41 Linus Torvalds 2005-04-16 544 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 545 ^1da177e4c3f41 Linus Torvalds 2005-04-16 546 /* scale priority and nice values from timeslices to -20..20 */ ^1da177e4c3f41 Linus Torvalds 2005-04-16 547 /* to make it look like a "normal" Unix priority/nice value */ ^1da177e4c3f41 Linus Torvalds 2005-04-16 548 priority = task_prio(task); ^1da177e4c3f41 Linus Torvalds 2005-04-16 549 nice = task_nice(task); ^1da177e4c3f41 Linus Torvalds 2005-04-16 550 ^1da177e4c3f41 Linus Torvalds 2005-04-16 551 /* convert nsec -> ticks */ 57e0be041d9e21 Thomas Gleixner 2014-07-16 552 start_time = nsec_to_clock_t(task->real_start_time); ^1da177e4c3f41 Linus Torvalds 2005-04-16 553 d0f02231222b31 Andrei Vagin 2018-04-10 554 seq_put_decimal_ull(m, "", pid_nr_ns(pid, ns)); d0f02231222b31 Andrei Vagin 2018-04-10 555 seq_puts(m, " ("); 88b72b31e15f9d Tejun Heo 2018-05-18 556 proc_task_name(m, task, false); d0f02231222b31 Andrei Vagin 2018-04-10 557 seq_puts(m, ") "); d0f02231222b31 Andrei Vagin 2018-04-10 558 seq_putc(m, state); 75ba1d07fd6a49 Joe Perches 2016-10-07 559 seq_put_decimal_ll(m, " ", ppid); 75ba1d07fd6a49 Joe Perches 2016-10-07 560 seq_put_decimal_ll(m, " ", pgid); 75ba1d07fd6a49 Joe Perches 2016-10-07 561 seq_put_decimal_ll(m, " ", sid); 75ba1d07fd6a49 Joe Perches 2016-10-07 562 seq_put_decimal_ll(m, " ", tty_nr); 75ba1d07fd6a49 Joe Perches 2016-10-07 563 seq_put_decimal_ll(m, " ", tty_pgrp); 75ba1d07fd6a49 Joe Perches 2016-10-07 564 seq_put_decimal_ull(m, " ", task->flags); 75ba1d07fd6a49 Joe Perches 2016-10-07 @565 seq_put_decimal_ull(m, " ", min_flt); 75ba1d07fd6a49 Joe Perches 2016-10-07 566 seq_put_decimal_ull(m, " ", cmin_flt); 75ba1d07fd6a49 Joe Perches 2016-10-07 @567 seq_put_decimal_ull(m, " ", maj_flt); 75ba1d07fd6a49 Joe Perches 2016-10-07 568 seq_put_decimal_ull(m, " ", cmaj_flt); 5613fda9a503cd Frederic Weisbecker 2017-01-31 569 seq_put_decimal_ull(m, " ", nsec_to_clock_t(utime)); 5613fda9a503cd Frederic Weisbecker 2017-01-31 570 seq_put_decimal_ull(m, " ", nsec_to_clock_t(stime)); 5613fda9a503cd Frederic Weisbecker 2017-01-31 571 seq_put_decimal_ll(m, " ", nsec_to_clock_t(cutime)); 5613fda9a503cd Frederic Weisbecker 2017-01-31 572 seq_put_decimal_ll(m, " ", nsec_to_clock_t(cstime)); 75ba1d07fd6a49 Joe Perches 2016-10-07 573 seq_put_decimal_ll(m, " ", priority); 75ba1d07fd6a49 Joe Perches 2016-10-07 574 seq_put_decimal_ll(m, " ", nice); 75ba1d07fd6a49 Joe Perches 2016-10-07 575 seq_put_decimal_ll(m, " ", num_threads); 75ba1d07fd6a49 Joe Perches 2016-10-07 576 seq_put_decimal_ull(m, " ", 0); 75ba1d07fd6a49 Joe Perches 2016-10-07 577 seq_put_decimal_ull(m, " ", start_time); 75ba1d07fd6a49 Joe Perches 2016-10-07 578 seq_put_decimal_ull(m, " ", vsize); 75ba1d07fd6a49 Joe Perches 2016-10-07 579 seq_put_decimal_ull(m, " ", mm ? get_mm_rss(mm) : 0); 75ba1d07fd6a49 Joe Perches 2016-10-07 580 seq_put_decimal_ull(m, " ", rsslim); 75ba1d07fd6a49 Joe Perches 2016-10-07 581 seq_put_decimal_ull(m, " ", mm ? (permitted ? mm->start_code : 1) : 0); 75ba1d07fd6a49 Joe Perches 2016-10-07 582 seq_put_decimal_ull(m, " ", mm ? (permitted ? mm->end_code : 1) : 0); 75ba1d07fd6a49 Joe Perches 2016-10-07 583 seq_put_decimal_ull(m, " ", (permitted && mm) ? mm->start_stack : 0); 75ba1d07fd6a49 Joe Perches 2016-10-07 584 seq_put_decimal_ull(m, " ", esp); 75ba1d07fd6a49 Joe Perches 2016-10-07 585 seq_put_decimal_ull(m, " ", eip); ^1da177e4c3f41 Linus Torvalds 2005-04-16 586 /* The signal information here is obsolete. ^1da177e4c3f41 Linus Torvalds 2005-04-16 587 * It must be decimal for Linux 2.0 compatibility. ^1da177e4c3f41 Linus Torvalds 2005-04-16 588 * Use /proc/#/status for real-time signals. ^1da177e4c3f41 Linus Torvalds 2005-04-16 589 */ 75ba1d07fd6a49 Joe Perches 2016-10-07 590 seq_put_decimal_ull(m, " ", task->pending.signal.sig[0] & 0x7fffffffUL); 75ba1d07fd6a49 Joe Perches 2016-10-07 591 seq_put_decimal_ull(m, " ", task->blocked.sig[0] & 0x7fffffffUL); 75ba1d07fd6a49 Joe Perches 2016-10-07 592 seq_put_decimal_ull(m, " ", sigign.sig[0] & 0x7fffffffUL); 75ba1d07fd6a49 Joe Perches 2016-10-07 593 seq_put_decimal_ull(m, " ", sigcatch.sig[0] & 0x7fffffffUL); b2f73922d11968 Ingo Molnar 2015-09-30 594 b2f73922d11968 Ingo Molnar 2015-09-30 595 /* b2f73922d11968 Ingo Molnar 2015-09-30 596 * We used to output the absolute kernel address, but that's an b2f73922d11968 Ingo Molnar 2015-09-30 597 * information leak - so instead we show a 0/1 flag here, to signal b2f73922d11968 Ingo Molnar 2015-09-30 598 * to user-space whether there's a wchan field in /proc/PID/wchan. b2f73922d11968 Ingo Molnar 2015-09-30 599 * b2f73922d11968 Ingo Molnar 2015-09-30 600 * This works with older implementations of procps as well. b2f73922d11968 Ingo Molnar 2015-09-30 601 */ b2f73922d11968 Ingo Molnar 2015-09-30 602 if (wchan) b2f73922d11968 Ingo Molnar 2015-09-30 603 seq_puts(m, " 1"); b2f73922d11968 Ingo Molnar 2015-09-30 604 else b2f73922d11968 Ingo Molnar 2015-09-30 605 seq_puts(m, " 0"); b2f73922d11968 Ingo Molnar 2015-09-30 606 75ba1d07fd6a49 Joe Perches 2016-10-07 607 seq_put_decimal_ull(m, " ", 0); 75ba1d07fd6a49 Joe Perches 2016-10-07 608 seq_put_decimal_ull(m, " ", 0); 75ba1d07fd6a49 Joe Perches 2016-10-07 609 seq_put_decimal_ll(m, " ", task->exit_signal); 75ba1d07fd6a49 Joe Perches 2016-10-07 610 seq_put_decimal_ll(m, " ", task_cpu(task)); 75ba1d07fd6a49 Joe Perches 2016-10-07 611 seq_put_decimal_ull(m, " ", task->rt_priority); 75ba1d07fd6a49 Joe Perches 2016-10-07 612 seq_put_decimal_ull(m, " ", task->policy); 75ba1d07fd6a49 Joe Perches 2016-10-07 613 seq_put_decimal_ull(m, " ", delayacct_blkio_ticks(task)); 16a6d9be90373f Frederic Weisbecker 2017-01-31 @614 seq_put_decimal_ull(m, " ", nsec_to_clock_t(gtime)); 16a6d9be90373f Frederic Weisbecker 2017-01-31 615 seq_put_decimal_ll(m, " ", nsec_to_clock_t(cgtime)); 5b172087f99189 Cyrill Gorcunov 2012-05-31 616 5b172087f99189 Cyrill Gorcunov 2012-05-31 617 if (mm && permitted) { 75ba1d07fd6a49 Joe Perches 2016-10-07 618 seq_put_decimal_ull(m, " ", mm->start_data); 75ba1d07fd6a49 Joe Perches 2016-10-07 619 seq_put_decimal_ull(m, " ", mm->end_data); 75ba1d07fd6a49 Joe Perches 2016-10-07 620 seq_put_decimal_ull(m, " ", mm->start_brk); 75ba1d07fd6a49 Joe Perches 2016-10-07 621 seq_put_decimal_ull(m, " ", mm->arg_start); 75ba1d07fd6a49 Joe Perches 2016-10-07 622 seq_put_decimal_ull(m, " ", mm->arg_end); 75ba1d07fd6a49 Joe Perches 2016-10-07 623 seq_put_decimal_ull(m, " ", mm->env_start); 75ba1d07fd6a49 Joe Perches 2016-10-07 624 seq_put_decimal_ull(m, " ", mm->env_end); 5b172087f99189 Cyrill Gorcunov 2012-05-31 625 } else 75ba1d07fd6a49 Joe Perches 2016-10-07 626 seq_puts(m, " 0 0 0 0 0 0 0"); 5b172087f99189 Cyrill Gorcunov 2012-05-31 627 5b172087f99189 Cyrill Gorcunov 2012-05-31 628 if (permitted) 08132d3d089b9a Eric W. Biederman 2024-04-13 629 seq_put_decimal_ll(m, " ", exit_code); 5b172087f99189 Cyrill Gorcunov 2012-05-31 630 else 75ba1d07fd6a49 Joe Perches 2016-10-07 631 seq_puts(m, " 0"); 5b172087f99189 Cyrill Gorcunov 2012-05-31 632 bda7bad62bc4c4 KAMEZAWA Hiroyuki 2012-03-23 633 seq_putc(m, '\n'); ^1da177e4c3f41 Linus Torvalds 2005-04-16 634 if (mm) ^1da177e4c3f41 Linus Torvalds 2005-04-16 635 mmput(mm); ee992744ea53db Eric W. Biederman 2008-02-08 636 return 0; ^1da177e4c3f41 Linus Torvalds 2005-04-16 637 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 638 :::::: The code at line 614 was first introduced by commit :::::: 16a6d9be90373fb0b521850cd0185a4d460dd152 sched/cputime: Convert guest time accounting to nsecs (u64) :::::: TO: Frederic Weisbecker <fweisbec(a)gmail.com> :::::: CC: Ingo Molnar <mingo(a)kernel.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH openEuler-1.0-LTS] tipc: Check the bearer type before calling tipc_udp_nl_bearer_add()
by Wang Hai 18 Apr '24

18 Apr '24
From: Shigeru Yoshida <syoshida(a)redhat.com> stable inclusion from stable-v4.19.307 commit 24ec8f0da93b8a9fba11600be8a90f0d73fb46f1 category: bugfix bugzilla: 189794 CVE: CVE-2024-26663 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit 3871aa01e1a779d866fa9dfdd5a836f342f4eb87 ] syzbot reported the following general protection fault [1]: general protection fault, probably for non-canonical address 0xdffffc0000000010: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000080-0x0000000000000087] ... RIP: 0010:tipc_udp_is_known_peer+0x9c/0x250 net/tipc/udp_media.c:291 ... Call Trace: <TASK> tipc_udp_nl_bearer_add+0x212/0x2f0 net/tipc/udp_media.c:646 tipc_nl_bearer_add+0x21e/0x360 net/tipc/bearer.c:1089 genl_family_rcv_msg_doit+0x1fc/0x2e0 net/netlink/genetlink.c:972 genl_family_rcv_msg net/netlink/genetlink.c:1052 [inline] genl_rcv_msg+0x561/0x800 net/netlink/genetlink.c:1067 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2544 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1076 netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline] netlink_unicast+0x53b/0x810 net/netlink/af_netlink.c:1367 netlink_sendmsg+0x8b7/0xd70 net/netlink/af_netlink.c:1909 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0xd5/0x180 net/socket.c:745 ____sys_sendmsg+0x6ac/0x940 net/socket.c:2584 ___sys_sendmsg+0x135/0x1d0 net/socket.c:2638 __sys_sendmsg+0x117/0x1e0 net/socket.c:2667 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b The cause of this issue is that when tipc_nl_bearer_add() is called with the TIPC_NLA_BEARER_UDP_OPTS attribute, tipc_udp_nl_bearer_add() is called even if the bearer is not UDP. tipc_udp_is_known_peer() called by tipc_udp_nl_bearer_add() assumes that the media_ptr field of the tipc_bearer has an udp_bearer type object, so the function goes crazy for non-UDP bearers. This patch fixes the issue by checking the bearer type before calling tipc_udp_nl_bearer_add() in tipc_nl_bearer_add(). Fixes: ef20cd4dd163 ("tipc: introduce UDP replicast") Reported-and-tested-by: syzbot+5142b87a9abc510e14fa(a)syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=5142b87a9abc510e14fa [1] Signed-off-by: Shigeru Yoshida <syoshida(a)redhat.com> Reviewed-by: Tung Nguyen <tung.q.nguyen(a)dektech.com.au> Link: https://lore.kernel.org/r/20240131152310.4089541-1-syoshida@redhat.com Signed-off-by: Paolo Abeni <pabeni(a)redhat.com> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Wang Hai <wanghai38(a)huawei.com> --- net/tipc/bearer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index 2649a0a0d45e..6f808402bb21 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c @@ -937,6 +937,12 @@ int tipc_nl_bearer_add(struct sk_buff *skb, struct genl_info *info) #ifdef CONFIG_TIPC_MEDIA_UDP if (attrs[TIPC_NLA_BEARER_UDP_OPTS]) { + if (b->media->type_id != TIPC_MEDIA_TYPE_UDP) { + rtnl_unlock(); + NL_SET_ERR_MSG(info->extack, "UDP option is unsupported"); + return -EINVAL; + } + err = tipc_udp_nl_bearer_add(b, attrs[TIPC_NLA_BEARER_UDP_OPTS]); if (err) { -- 2.17.1
2 1
0 0
[PATCH OLK-5.10] net/mlx5e: CT, Fix multiple allocations and memleak of mod acts
by Zeng Heng 18 Apr '24

18 Apr '24
From: Roi Dayan <roid(a)nvidia.com> mainline inclusion from mainline-v5.16-rc2 commit 806401c20a0f9c51b6c8fd7035671e6ca841f6c2 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9FNFU CVE: CVE-2021-47199 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- CT clear action offload adds additional mod hdr actions to the flow's original mod actions in order to clear the registers which hold ct_state. When such flow also includes encap action, a neigh update event can cause the driver to unoffload the flow and then reoffload it. Each time this happens, the ct clear handling adds that same set of mod hdr actions to reset ct_state until the max of mod hdr actions is reached. Also the driver never releases the allocated mod hdr actions and causing a memleak. Fix above two issues by moving CT clear mod acts allocation into the parsing actions phase and only use it when offloading the rule. The release of mod acts will be done in the normal flow_put(). backtrace: [<000000007316e2f3>] krealloc+0x83/0xd0 [<00000000ef157de1>] mlx5e_mod_hdr_alloc+0x147/0x300 [mlx5_core] [<00000000970ce4ae>] mlx5e_tc_match_to_reg_set_and_get_id+0xd7/0x240 [mlx5_core] [<0000000067c5fa17>] mlx5e_tc_match_to_reg_set+0xa/0x20 [mlx5_core] [<00000000d032eb98>] mlx5_tc_ct_entry_set_registers.isra.0+0x36/0xc0 [mlx5_core] [<00000000fd23b869>] mlx5_tc_ct_flow_offload+0x272/0x1f10 [mlx5_core] [<000000004fc24acc>] mlx5e_tc_offload_fdb_rules.part.0+0x150/0x620 [mlx5_core] [<00000000dc741c17>] mlx5e_tc_encap_flows_add+0x489/0x690 [mlx5_core] [<00000000e92e49d7>] mlx5e_rep_update_flows+0x6e4/0x9b0 [mlx5_core] [<00000000f60f5602>] mlx5e_rep_neigh_update+0x39a/0x5d0 [mlx5_core] Fixes: 1ef3018f5af3 ("net/mlx5e: CT: Support clear action") Signed-off-by: Roi Dayan <roid(a)nvidia.com> Reviewed-by: Paul Blakey <paulb(a)nvidia.com> Reviewed-by: Maor Dickman <maord(a)nvidia.com> Signed-off-by: Saeed Mahameed <saeedm(a)nvidia.com> Signed-off-by: Zeng Heng <zengheng4(a)huawei.com> --- .../ethernet/mellanox/mlx5/core/en/tc_ct.c | 26 ++++++++++++------- .../ethernet/mellanox/mlx5/core/en/tc_ct.h | 2 ++ .../net/ethernet/mellanox/mlx5/core/en_tc.c | 8 ++++-- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c index 511c43146562..ce10bbf27e16 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c @@ -1310,9 +1310,13 @@ mlx5_tc_ct_match_add(struct mlx5_tc_ct_priv *priv, int mlx5_tc_ct_parse_action(struct mlx5_tc_ct_priv *priv, struct mlx5_flow_attr *attr, + struct mlx5e_tc_mod_hdr_acts *mod_acts, const struct flow_action_entry *act, struct netlink_ext_ack *extack) { + bool clear_action = act->ct.action & TCA_CT_ACT_CLEAR; + int err; + if (!priv) { NL_SET_ERR_MSG_MOD(extack, "offload of ct action isn't available"); @@ -1323,6 +1327,17 @@ mlx5_tc_ct_parse_action(struct mlx5_tc_ct_priv *priv, attr->ct_attr.ct_action = act->ct.action; attr->ct_attr.nf_ft = act->ct.flow_table; + if (!clear_action) + goto out; + + err = mlx5_tc_ct_entry_set_registers(priv, mod_acts, 0, 0, 0, 0); + if (err) { + NL_SET_ERR_MSG_MOD(extack, "Failed to set registers for ct clear"); + return err; + } + attr->action |= MLX5_FLOW_CONTEXT_ACTION_MOD_HDR; + +out: return 0; } @@ -1890,24 +1905,17 @@ __mlx5_tc_ct_flow_offload_clear(struct mlx5_tc_ct_priv *ct_priv, memcpy(pre_ct_attr, attr, attr_sz); - err = mlx5_tc_ct_entry_set_registers(ct_priv, mod_acts, 0, 0, 0, 0); - if (err) { - ct_dbg("Failed to set register for ct clear"); - goto err_set_registers; - } - mod_hdr = mlx5_modify_header_alloc(priv->mdev, ct_priv->ns_type, mod_acts->num_actions, mod_acts->actions); if (IS_ERR(mod_hdr)) { err = PTR_ERR(mod_hdr); ct_dbg("Failed to add create ct clear mod hdr"); - goto err_set_registers; + goto err_mod_hdr; } dealloc_mod_hdr_actions(mod_acts); pre_ct_attr->modify_hdr = mod_hdr; - pre_ct_attr->action |= MLX5_FLOW_CONTEXT_ACTION_MOD_HDR; rule = mlx5_tc_rule_insert(priv, orig_spec, pre_ct_attr); if (IS_ERR(rule)) { @@ -1923,7 +1931,7 @@ __mlx5_tc_ct_flow_offload_clear(struct mlx5_tc_ct_priv *ct_priv, err_insert: mlx5_modify_header_dealloc(priv->mdev, mod_hdr); -err_set_registers: +err_mod_hdr: netdev_warn(priv->netdev, "Failed to offload ct clear flow, err %d\n", err); kfree(pre_ct_attr); diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.h b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.h index 6503b614337c..50bc0368387b 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.h @@ -112,6 +112,7 @@ int mlx5_tc_ct_add_no_trk_match(struct mlx5_flow_spec *spec); int mlx5_tc_ct_parse_action(struct mlx5_tc_ct_priv *priv, struct mlx5_flow_attr *attr, + struct mlx5e_tc_mod_hdr_acts *mod_acts, const struct flow_action_entry *act, struct netlink_ext_ack *extack); @@ -173,6 +174,7 @@ mlx5_tc_ct_add_no_trk_match(struct mlx5_flow_spec *spec) static inline int mlx5_tc_ct_parse_action(struct mlx5_tc_ct_priv *priv, struct mlx5_flow_attr *attr, + struct mlx5e_tc_mod_hdr_acts *mod_acts, const struct flow_action_entry *act, struct netlink_ext_ack *extack) { diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index d50f12fb5e19..f7ccca74b789 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -3617,7 +3617,9 @@ static int parse_tc_nic_actions(struct mlx5e_priv *priv, attr->dest_chain = act->chain_index; break; case FLOW_ACTION_CT: - err = mlx5_tc_ct_parse_action(get_ct_priv(priv), attr, act, extack); + err = mlx5_tc_ct_parse_action(get_ct_priv(priv), attr, + &parse_attr->mod_hdr_acts, + act, extack); if (err) return err; @@ -4457,7 +4459,9 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, attr->dest_chain = act->chain_index; break; case FLOW_ACTION_CT: - err = mlx5_tc_ct_parse_action(get_ct_priv(priv), attr, act, extack); + err = mlx5_tc_ct_parse_action(get_ct_priv(priv), attr, + &parse_attr->mod_hdr_acts, + act, extack); if (err) return err; -- 2.25.1
2 1
0 0
[PATCH OLK-6.6 0/2] fix deadlock in cgroup1_writeback V2
by Chen Ridong 18 Apr '24

18 Apr '24
*** BLURB HERE *** Chen Ridong (2): cgroup_writeback: Revert "fix deadlock in cgroup1_writeback" cgroup_writeback: fix deadlock in cgroup1_writeback mm/backing-dev.c | 7 +++++-- mm/memcontrol.c | 24 ++++++++++-------------- 2 files changed, 15 insertions(+), 16 deletions(-) -- 2.34.1
2 3
0 0
  • ← Newer
  • 1
  • ...
  • 1123
  • 1124
  • 1125
  • 1126
  • 1127
  • 1128
  • 1129
  • ...
  • 1873
  • Older →

HyperKitty Powered by HyperKitty