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 -----
  • 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

  • 52 participants
  • 18285 discussions
[PATCH openEuler-1.0-LTS] x86/apic: Always explicitly disarm TSC-deadline timer
by Heyuan Wang 23 Dec '24

23 Dec '24
From: Zhang Rui <rui.zhang(a)intel.com> stable inclusion from stable-v4.19.323 commit e75562346cac53c7e933373a004b1829e861123a category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IBBN6V Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… ------------------------------------------------------------- commit ffd95846c6ec6cf1f93da411ea10d504036cab42 upstream. New processors have become pickier about the local APIC timer state before entering low power modes. These low power modes are used (for example) when you close your laptop lid and suspend. If you put your laptop in a bag and it is not in this low power mode, it is likely to get quite toasty while it quickly sucks the battery dry. The problem boils down to some CPUs' inability to power down until the CPU recognizes that the local APIC timer is shut down. The current kernel code works in one-shot and periodic modes but does not work for deadline mode. Deadline mode has been the supported and preferred mode on Intel CPUs for over a decade and uses an MSR to drive the timer instead of an APIC register. Disable the TSC Deadline timer in lapic_timer_shutdown() by writing to MSR_IA32_TSC_DEADLINE when in TSC-deadline mode. Also avoid writing to the initial-count register (APIC_TMICT) which is ignored in TSC-deadline mode. Note: The APIC_LVTT|=APIC_LVT_MASKED operation should theoretically be enough to tell the hardware that the timer will not fire in any of the timer modes. But mitigating AMD erratum 411[1] also requires clearing out APIC_TMICT. Solely setting APIC_LVT_MASKED is also ineffective in practice on Intel Lunar Lake systems, which is the motivation for this change. 1. 411 Processor May Exit Message-Triggered C1E State Without an Interrupt if Local APIC Timer Reaches Zero - https://www.amd.com/content/dam/amd/en/documents/archived-tech-docs/revisio… Fixes: 279f1461432c ("x86: apic: Use tsc deadline for oneshot when available") Suggested-by: Dave Hansen <dave.hansen(a)intel.com> Signed-off-by: Zhang Rui <rui.zhang(a)intel.com> Signed-off-by: Dave Hansen <dave.hansen(a)linux.intel.com> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki(a)intel.com> Tested-by: Srinivas Pandruvada <srinivas.pandruvada(a)linux.intel.com> Tested-by: Todd Brandt <todd.e.brandt(a)intel.com> Cc: stable(a)vger.kernel.org Link: https://lore.kernel.org/all/20241015061522.25288-1-rui.zhang%40intel.com Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: Heyuan Wang <wangheyuan2(a)h-partners.com> --- arch/x86/kernel/apic/apic.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 9318fe7d850e..e316f5a2aab4 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -484,7 +484,19 @@ static int lapic_timer_shutdown(struct clock_event_device *evt) v = apic_read(APIC_LVTT); v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR); apic_write(APIC_LVTT, v); - apic_write(APIC_TMICT, 0); + + /* + * Setting APIC_LVT_MASKED (above) should be enough to tell + * the hardware that this timer will never fire. But AMD + * erratum 411 and some Intel CPU behavior circa 2024 say + * otherwise. Time for belt and suspenders programming: mask + * the timer _and_ zero the counter registers: + */ + if (v & APIC_LVT_TIMER_TSCDEADLINE) + wrmsrl(MSR_IA32_TSC_DEADLINE, 0); + else + apic_write(APIC_TMICT, 0); + return 0; } -- 2.25.1
2 1
0 0
[PATCH openEuler-1.0-LTS] io_uring/io-wq: Use set_bit() and test_bit() at worker->flags
by Yifan Qiao 23 Dec '24

23 Dec '24
From: Breno Leitao <leitao(a)debian.org> mainline inclusion from mainline-v6.10-rc1 commit 8a565304927fbd28c9f028c492b5c1714002cbab category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IACR2Y CVE: CVE-2024-39508 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- Utilize set_bit() and test_bit() on worker->flags within io_uring/io-wq to address potential data races. The structure io_worker->flags may be accessed through various data paths, leading to concurrency issues. When KCSAN is enabled, it reveals data races occurring in io_worker_handle_work and io_wq_activate_free_worker functions. BUG: KCSAN: data-race in io_worker_handle_work / io_wq_activate_free_worker write to 0xffff8885c4246404 of 4 bytes by task 49071 on cpu 28: io_worker_handle_work (io_uring/io-wq.c:434 io_uring/io-wq.c:569) io_wq_worker (io_uring/io-wq.c:?) <snip> read to 0xffff8885c4246404 of 4 bytes by task 49024 on cpu 5: io_wq_activate_free_worker (io_uring/io-wq.c:? io_uring/io-wq.c:285) io_wq_enqueue (io_uring/io-wq.c:947) io_queue_iowq (io_uring/io_uring.c:524) io_req_task_submit (io_uring/io_uring.c:1511) io_handle_tw_list (io_uring/io_uring.c:1198) <snip> Line numbers against commit 18daea77cca6 ("Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm"). These races involve writes and reads to the same memory location by different tasks running on different CPUs. To mitigate this, refactor the code to use atomic operations such as set_bit(), test_bit(), and clear_bit() instead of basic "and" and "or" operations. This ensures thread-safe manipulation of worker flags. Also, move `create_index` to avoid holes in the structure. Signed-off-by: Breno Leitao <leitao(a)debian.org> Link: https://lore.kernel.org/r/20240507170002.2269003-1-leitao@debian.org Signed-off-by: Jens Axboe <axboe(a)kernel.dk> Conflicts: fs/io-wq.c io_uring/io-wq.c [The function names are different than cve commit. But their basic functions are same and they are using the io_worker in the same way.] Signed-off-by: Yifan Qiao <qiaoyifan4(a)huawei.com> --- fs/io-wq.c | 59 +++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/fs/io-wq.c b/fs/io-wq.c index 67d157bcf2fb..b7aaf060547b 100644 --- a/fs/io-wq.c +++ b/fs/io-wq.c @@ -25,12 +25,12 @@ #define WORKER_IDLE_TIMEOUT (5 * HZ) enum { - IO_WORKER_F_UP = 1, /* up and active */ - IO_WORKER_F_RUNNING = 2, /* account as running */ - IO_WORKER_F_FREE = 4, /* worker on free list */ - IO_WORKER_F_EXITING = 8, /* worker exiting */ - IO_WORKER_F_FIXED = 16, /* static idle worker */ - IO_WORKER_F_BOUND = 32, /* is doing bounded work */ + IO_WORKER_F_UP = 0, /* up and active */ + IO_WORKER_F_RUNNING = 1, /* account as running */ + IO_WORKER_F_FREE = 2, /* worker on free list */ + IO_WORKER_F_EXITING = 3, /* worker exiting */ + IO_WORKER_F_FIXED = 4, /* static idle worker */ + IO_WORKER_F_BOUND = 5, /* is doing bounded work */ }; enum { @@ -48,7 +48,7 @@ enum { */ struct io_worker { refcount_t ref; - unsigned flags; + unsigned long flags; struct hlist_nulls_node nulls_node; struct list_head all_list; struct task_struct *task; @@ -193,7 +193,7 @@ static inline struct io_wqe_acct *io_work_get_acct(struct io_wqe *wqe, static inline struct io_wqe_acct *io_wqe_get_acct(struct io_wqe *wqe, struct io_worker *worker) { - if (worker->flags & IO_WORKER_F_BOUND) + if (test_bit(IO_WORKER_F_BOUND, &worker->flags)) return &wqe->acct[IO_WQ_ACCT_BOUND]; return &wqe->acct[IO_WQ_ACCT_UNBOUND]; @@ -215,9 +215,9 @@ static void io_worker_exit(struct io_worker *worker) preempt_disable(); current->flags &= ~PF_IO_WORKER; - if (worker->flags & IO_WORKER_F_RUNNING) + if (test_bit(IO_WORKER_F_RUNNING, &worker->flags)) atomic_dec(&acct->nr_running); - if (!(worker->flags & IO_WORKER_F_BOUND)) + if (!test_bit(IO_WORKER_F_BOUND, &worker->flags)) atomic_dec(&wqe->wq->user->processes); worker->flags = 0; preempt_enable(); @@ -315,7 +315,8 @@ static void io_worker_start(struct io_wqe *wqe, struct io_worker *worker) current->flags |= PF_IO_WORKER; - worker->flags |= (IO_WORKER_F_UP | IO_WORKER_F_RUNNING); + set_mask_bits(&worker->flags, 0, + BIT(IO_WORKER_F_UP) | BIT(IO_WORKER_F_RUNNING)); worker->restore_files = current->files; worker->restore_fs = current->fs; io_wqe_inc_running(wqe, worker); @@ -331,8 +332,8 @@ static void __io_worker_busy(struct io_wqe *wqe, struct io_worker *worker, { bool worker_bound, work_bound; - if (worker->flags & IO_WORKER_F_FREE) { - worker->flags &= ~IO_WORKER_F_FREE; + if (test_bit(IO_WORKER_F_FREE, &worker->flags)) { + clear_bit(IO_WORKER_F_FREE, &worker->flags); hlist_nulls_del_init_rcu(&worker->nulls_node); } @@ -340,17 +341,17 @@ static void __io_worker_busy(struct io_wqe *wqe, struct io_worker *worker, * If worker is moving from bound to unbound (or vice versa), then * ensure we update the running accounting. */ - worker_bound = (worker->flags & IO_WORKER_F_BOUND) != 0; + worker_bound = test_bit(IO_WORKER_F_BOUND, &worker->flags); work_bound = (work->flags & IO_WQ_WORK_UNBOUND) == 0; if (worker_bound != work_bound) { io_wqe_dec_running(wqe, worker); if (work_bound) { - worker->flags |= IO_WORKER_F_BOUND; + set_bit(IO_WORKER_F_BOUND, &worker->flags); wqe->acct[IO_WQ_ACCT_UNBOUND].nr_workers--; wqe->acct[IO_WQ_ACCT_BOUND].nr_workers++; atomic_dec(&wqe->wq->user->processes); } else { - worker->flags &= ~IO_WORKER_F_BOUND; + clear_bit(IO_WORKER_F_BOUND, &worker->flags); wqe->acct[IO_WQ_ACCT_UNBOUND].nr_workers++; wqe->acct[IO_WQ_ACCT_BOUND].nr_workers--; atomic_inc(&wqe->wq->user->processes); @@ -369,8 +370,8 @@ static void __io_worker_busy(struct io_wqe *wqe, struct io_worker *worker, static bool __io_worker_idle(struct io_wqe *wqe, struct io_worker *worker) __must_hold(wqe->lock) { - if (!(worker->flags & IO_WORKER_F_FREE)) { - worker->flags |= IO_WORKER_F_FREE; + if (!test_bit(IO_WORKER_F_FREE, &worker->flags)) { + set_bit(IO_WORKER_F_FREE, &worker->flags); hlist_nulls_add_head_rcu(&worker->nulls_node, &wqe->free_list); } @@ -585,7 +586,7 @@ static int io_wqe_worker(void *data) continue; /* timed out, exit unless we're the fixed worker */ if (test_bit(IO_WQ_BIT_EXIT, &wq->state) || - !(worker->flags & IO_WORKER_F_FIXED)) + !test_bit(IO_WORKER_F_FIXED, &worker->flags)) break; } @@ -609,11 +610,11 @@ void io_wq_worker_running(struct task_struct *tsk) struct io_worker *worker = kthread_data(tsk); struct io_wqe *wqe = worker->wqe; - if (!(worker->flags & IO_WORKER_F_UP)) + if (!test_bit(IO_WORKER_F_UP, &worker->flags)) return; - if (worker->flags & IO_WORKER_F_RUNNING) + if (test_bit(IO_WORKER_F_RUNNING, &worker->flags)) return; - worker->flags |= IO_WORKER_F_RUNNING; + set_bit(IO_WORKER_F_RUNNING, &worker->flags); io_wqe_inc_running(wqe, worker); } @@ -627,12 +628,12 @@ void io_wq_worker_sleeping(struct task_struct *tsk) struct io_worker *worker = kthread_data(tsk); struct io_wqe *wqe = worker->wqe; - if (!(worker->flags & IO_WORKER_F_UP)) + if (!test_bit(IO_WORKER_F_UP, &worker->flags)) return; - if (!(worker->flags & IO_WORKER_F_RUNNING)) + if (!test_bit(IO_WORKER_F_RUNNING, &worker->flags)) return; - worker->flags &= ~IO_WORKER_F_RUNNING; + clear_bit(IO_WORKER_F_RUNNING, &worker->flags); spin_lock_irq(&wqe->lock); io_wqe_dec_running(wqe, worker); @@ -663,11 +664,11 @@ static bool create_io_worker(struct io_wq *wq, struct io_wqe *wqe, int index) spin_lock_irq(&wqe->lock); hlist_nulls_add_head_rcu(&worker->nulls_node, &wqe->free_list); list_add_tail_rcu(&worker->all_list, &wqe->all_list); - worker->flags |= IO_WORKER_F_FREE; + set_bit(IO_WORKER_F_FREE, &worker->flags); if (index == IO_WQ_ACCT_BOUND) - worker->flags |= IO_WORKER_F_BOUND; - if (!acct->nr_workers && (worker->flags & IO_WORKER_F_BOUND)) - worker->flags |= IO_WORKER_F_FIXED; + set_bit(IO_WORKER_F_BOUND, &worker->flags); + if (!acct->nr_workers && test_bit(IO_WORKER_F_BOUND, &worker->flags)) + set_bit(IO_WORKER_F_FIXED, &worker->flags); acct->nr_workers++; spin_unlock_irq(&wqe->lock); -- 2.39.2
2 1
0 0
[openeuler:OLK-6.6] BUILD REGRESSION 5f2e69404ccc6b0a60f370b25310213b19b657c1
by kernel test robot 22 Dec '24

22 Dec '24
tree/branch: https://gitee.com/openeuler/kernel.git OLK-6.6 branch HEAD: 5f2e69404ccc6b0a60f370b25310213b19b657c1 !14213 v2 bpf: Add kabi reserve padding for uapi struct bpf_link_info Error/Warning ids grouped by kconfigs: recent_errors |-- arm64-allmodconfig | |-- arch-arm64-kernel-virtcca_cvm_guest.c:warning:no-previous-prototype-for-function-enable_swiotlb_for_cvm_dev | |-- drivers-ata-libahci.c:warning:no-previous-prototype-for-function-get_ahci_em_messages | |-- drivers-net-ethernet-huawei-hinic3-cqm-cqm_bitmap_table.c:error:a-randomized-struct-can-only-be-initialized-with-a-designated-initializer | |-- drivers-net-ethernet-huawei-hinic3-hinic3_tx.c:warning:no-previous-prototype-for-function-hinic3_tx_offload | |-- drivers-perf-arm_pmuv3.c:warning:stack-frame-size-()-exceeds-limit-()-in-armv8pmu_handle_irq | |-- instantiation:error:expected-absolute-expression | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-function-register_irqchip_proc | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-function-unregister_irqchip_proc | |-- kernel-sched-bpf_sched.c:warning:no-previous-prototype-for-function-bpf_sched_entity_is_task | |-- kernel-sched-bpf_sched.c:warning:no-previous-prototype-for-function-bpf_sched_entity_to_task | `-- kernel-sched-bpf_sched.c:warning:no-previous-prototype-for-function-bpf_sched_tag_of_entity |-- arm64-allnoconfig | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-register_irqchip_proc | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-unregister_irqchip_proc | `-- mm-memory.c:warning:variable-nr_pages-set-but-not-used |-- arm64-randconfig-001-20241221 | |-- drivers-ata-libahci.c:warning:no-previous-prototype-for-function-get_ahci_em_messages | |-- instantiation:error:expected-absolute-expression | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-function-register_irqchip_proc | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-function-unregister_irqchip_proc | `-- mm-memory.c:warning:variable-nr_pages-set-but-not-used |-- arm64-randconfig-002-20241221 | |-- drivers-ata-libahci.c:warning:no-previous-prototype-for-function-get_ahci_em_messages | |-- instantiation:error:expected-absolute-expression | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-function-register_irqchip_proc | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-function-unregister_irqchip_proc | `-- mm-memory.c:warning:variable-nr_pages-set-but-not-used |-- arm64-randconfig-003-20241221 | |-- drivers-ata-libahci.c:warning:no-previous-prototype-for-function-get_ahci_em_messages | |-- instantiation:error:expected-absolute-expression | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-function-register_irqchip_proc | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-function-unregister_irqchip_proc | `-- mm-memory.c:warning:variable-nr_pages-set-but-not-used |-- arm64-randconfig-004-20241221 | `-- mm-memory.c:warning:variable-nr_pages-set-but-not-used |-- loongarch-allmodconfig | |-- arch-loongarch-kernel-paravirt.c:error:KVM_HCALL_FUNC_PV_IPI-undeclared-(first-use-in-this-function) | |-- arch-loongarch-kernel-paravirt.c:error:mp_ops-undeclared-(first-use-in-this-function) | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-paravt_steal_clock | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-parse_no_stealacc | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-pv_cpu_reboot | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-pv_disable_steal_time | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-pv_enable_steal_time | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-pv_reboot_nb | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-pv_reboot_notify | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-pv_time_cpu_down_prepare | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-pv_time_cpu_online | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-pv_time_init | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-steal_acc | |-- arch-loongarch-kernel-paravirt.c:warning:paravt_steal_clock-defined-but-not-used | |-- arch-loongarch-kvm-intc-pch_pic.c:warning:variable-ret-set-but-not-used | |-- arch-loongarch-kvm-irqfd.c:warning:Function-parameter-or-member-e-not-described-in-kvm_set_msi | |-- arch-loongarch-kvm-irqfd.c:warning:Function-parameter-or-member-irq_source_id-not-described-in-kvm_set_msi | |-- arch-loongarch-kvm-irqfd.c:warning:Function-parameter-or-member-kvm-not-described-in-kvm_set_msi | |-- arch-loongarch-kvm-irqfd.c:warning:Function-parameter-or-member-level-not-described-in-kvm_set_msi | |-- arch-loongarch-kvm-irqfd.c:warning:Function-parameter-or-member-line_status-not-described-in-kvm_set_msi | |-- arch-loongarch-kvm-vm.c:warning:variable-vcpu-set-but-not-used | |-- arch-loongarch-kvm-vm.c:warning:variable-vcpus-set-but-not-used | |-- drivers-iommu-loongarch_iommu.c:warning:Function-parameter-or-member-ivrs-not-described-in-get_highest_supported_ivhd_type | |-- drivers-iommu-loongarch_iommu.c:warning:la_iommu_setup-defined-but-not-used | |-- drivers-iommu-loongarch_iommu.c:warning:no-previous-prototype-for-check_device_compat | |-- drivers-iommu-loongarch_iommu.c:warning:no-previous-prototype-for-create_rlookup_entry | |-- drivers-iommu-loongarch_iommu.c:warning:no-previous-prototype-for-domain_attach_iommu | |-- drivers-iommu-loongarch_iommu.c:warning:no-previous-prototype-for-domain_deattach_iommu | |-- drivers-iommu-loongarch_iommu.c:warning:no-previous-prototype-for-find_iommu_by_dev | |-- drivers-iommu-loongarch_iommu.c:warning:no-previous-prototype-for-get_iommu_info_from_dom | |-- drivers-iommu-loongarch_iommu.c:warning:no-previous-prototype-for-iommu_init_device | |-- drivers-iommu-loongarch_iommu.c:warning:no-previous-prototype-for-la_iommu_probe_device | |-- drivers-iommu-loongarch_iommu.c:warning:no-previous-prototype-for-lookup_rlooptable | |-- drivers-iommu-loongarch_iommu.c:warning:no-previous-prototype-for-loongarch_get_iommu_by_devid | |-- drivers-scsi-leapioraid-leapioraid_func.c:warning:mq-poll-directive-output-may-be-truncated-writing-bytes-into-a-region-of-size-between-and | |-- drivers-scsi-leapioraid-leapioraid_func.c:warning:u-directive-output-may-be-truncated-writing-between-and-bytes-into-a-region-of-size-between-and | |-- include-linux-init.h:error:redefinition-of-parse_no_stealacc | |-- include-linux-init.h:error:redefinition-of-str_parse_no_stealacc | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-register_irqchip_proc | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-unregister_irqchip_proc | |-- kernel-sched-bpf_sched.c:warning:no-previous-prototype-for-bpf_sched_entity_is_task | |-- kernel-sched-bpf_sched.c:warning:no-previous-prototype-for-bpf_sched_entity_to_task | `-- kernel-sched-bpf_sched.c:warning:no-previous-prototype-for-bpf_sched_tag_of_entity |-- loongarch-allnoconfig | |-- arch-loongarch-kernel-efi.c:error:implicit-declaration-of-function-pmd_mkhuge | |-- arch-loongarch-kernel-efi.c:error:incompatible-types-when-assigning-to-type-pmd_t-from-type-int | |-- arch-loongarch-kernel-legacy_boot.c:error:implicit-declaration-of-function-nid_to_addrbase | |-- drivers-irqchip-irq-loongson-eiointc.c:error:NODES_PER_FLATMODE_NODE-undeclared-(first-use-in-this-function) | |-- include-linux-suspend.h:error:expected-)-before-numeric-constant | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-register_irqchip_proc | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-unregister_irqchip_proc | `-- mm-memory.c:warning:variable-nr_pages-set-but-not-used |-- loongarch-randconfig-001-20241222 | |-- arch-loongarch-kernel-legacy_boot.c:error:implicit-declaration-of-function-nid_to_addrbase | |-- arch-loongarch-kernel-paravirt.c:error:KVM_HCALL_FUNC_PV_IPI-undeclared-(first-use-in-this-function) | |-- arch-loongarch-kernel-paravirt.c:error:mp_ops-undeclared-(first-use-in-this-function) | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-paravt_steal_clock | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-parse_no_stealacc | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-pv_cpu_reboot | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-pv_disable_steal_time | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-pv_enable_steal_time | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-pv_reboot_nb | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-pv_reboot_notify | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-pv_time_cpu_down_prepare | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-pv_time_cpu_online | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-pv_time_init | |-- arch-loongarch-kernel-paravirt.c:error:redefinition-of-steal_acc | |-- arch-loongarch-kernel-paravirt.c:warning:paravt_steal_clock-defined-but-not-used | |-- drivers-cpufreq-loongson3-acpi-cpufreq.c:warning:lasx_count_threshold-defined-but-not-used | |-- drivers-irqchip-irq-loongson-eiointc.c:error:NODES_PER_FLATMODE_NODE-undeclared-(first-use-in-this-function) | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:error:struct-rnpm_tx_buffer-has-no-member-named-gso_need_padding | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:error:struct-rnpm_tx_buffer-has-no-member-named-gso_need_padding | |-- drivers-scsi-leapioraid-leapioraid_func.c:warning:mq-poll-directive-output-may-be-truncated-writing-bytes-into-a-region-of-size-between-and | |-- drivers-scsi-leapioraid-leapioraid_func.c:warning:u-directive-output-may-be-truncated-writing-between-and-bytes-into-a-region-of-size-between-and | |-- include-linux-init.h:error:redefinition-of-parse_no_stealacc | |-- include-linux-init.h:error:redefinition-of-str_parse_no_stealacc | |-- include-linux-suspend.h:error:expected-)-before-numeric-constant | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-register_irqchip_proc | `-- kernel-irq-proc.c:warning:no-previous-prototype-for-unregister_irqchip_proc |-- loongarch-randconfig-002-20241222 | |-- arch-loongarch-kernel-legacy_boot.c:error:implicit-declaration-of-function-nid_to_addrbase | |-- drivers-irqchip-irq-loongson-eiointc.c:error:NODES_PER_FLATMODE_NODE-undeclared-(first-use-in-this-function) | `-- kernel-cgroup-cgroup.c:error:cgroup_psi_stat_show-undeclared-here-(not-in-a-function) |-- x86_64-allnoconfig | |-- drivers-char-lsse_sdf_cdev.c:linux-module.h-is-included-more-than-once. | |-- drivers-scsi-leapioraid-leapioraid_app.c:leapioraid_func.h-is-included-more-than-once. | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-function-register_irqchip_proc | `-- kernel-irq-proc.c:warning:no-previous-prototype-for-function-unregister_irqchip_proc |-- x86_64-allyesconfig | |-- arch-x86-crypto-sm3-zhaoxin-gmi.c:warning:no-previous-prototype-for-function-sm3_generic_block_fn | |-- arch-x86-crypto-sm3-zhaoxin-gmi.c:warning:no-previous-prototype-for-function-zx_sm3_finup | |-- arch-x86-crypto-sm3-zhaoxin-gmi.c:warning:no-previous-prototype-for-function-zx_sm3_update | |-- arch-x86-crypto-sm4-zhaoxin-gmi.c:warning:no-previous-prototype-for-function-gmi_sm4_set_key | |-- arch-x86-kernel-cpu-hygon.c:warning:no-previous-prototype-for-function-get_nt_block_copy_mini_len | |-- arch-x86-kernel-cpu-hygon.c:warning:no-previous-prototype-for-function-set_c86_features_para_invalid | |-- arch-x86-kernel-csv-shared.c:warning:no-previous-prototype-for-function-csv3_early_secure_call_ident_map | |-- arch-x86-kernel-csv-shared.c:warning:no-previous-prototype-for-function-csv3_scan_secure_call_pages | |-- arch-x86-kernel-fpu-core.c:warning:no-previous-prototype-for-function-get_fpustate_free_space | |-- arch-x86-kvm-svm-csv.c:warning:no-previous-prototype-for-function-csv_vm_attestation | |-- arch-x86-kvm-svm-sev.c:warning:no-previous-prototype-for-function-sev_install_hooks | |-- drivers-ata-ahci_zhaoxin_sgpio.c:warning:no-previous-prototype-for-function-add_sgpio_zhaoxin | |-- drivers-ata-ahci_zhaoxin_sgpio.c:warning:no-previous-prototype-for-function-ahci_wait_em_reset | |-- drivers-ata-ahci_zhaoxin_sgpio.c:warning:no-previous-prototype-for-function-ahci_zhaoxin_set_em_sgpio | |-- drivers-ata-ahci_zhaoxin_sgpio.c:warning:no-previous-prototype-for-function-ahci_zhaoxin_set_em_sgpio_gpmode | |-- drivers-ata-ahci_zhaoxin_sgpio.c:warning:no-previous-prototype-for-function-remove_sgpio_zhaoxin | |-- drivers-ata-ahci_zhaoxin_sgpio.c:warning:no-previous-prototype-for-function-set_em_messages | |-- drivers-ata-libahci.c:warning:no-previous-prototype-for-function-get_ahci_em_messages | |-- drivers-crypto-montage-tsse-tsse_ipc_api.c:warning:variable-device_handle-is-uninitialized-when-used-here | |-- drivers-gpu-drm-amd-amdgpu-..-amdkfd-kfd_topology.c:warning:stack-frame-size-()-exceeds-limit-()-in-kfd_topology_add_device | |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-dml-calcs-dcn_calc_auto.c:warning:stack-frame-size-()-exceeds-limit-()-in-mode_support_and_system_configuration | |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-dml-dcn30-display_mode_vba_30.c:warning:stack-frame-size-()-exceeds-limit-()-in-dml30_ModeSupportAndSystemConfigurationFull | |-- drivers-net-ethernet-huawei-hinic3-cqm-cqm_bitmap_table.c:error:a-randomized-struct-can-only-be-initialized-with-a-designated-initializer | |-- drivers-net-ethernet-huawei-hinic3-hinic3_tx.c:warning:no-previous-prototype-for-function-hinic3_tx_offload | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-function-register_irqchip_proc | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-function-unregister_irqchip_proc | |-- kernel-sched-bpf_sched.c:warning:no-previous-prototype-for-function-bpf_sched_entity_is_task | |-- kernel-sched-bpf_sched.c:warning:no-previous-prototype-for-function-bpf_sched_entity_to_task | |-- kernel-sched-bpf_sched.c:warning:no-previous-prototype-for-function-bpf_sched_tag_of_entity | |-- net-ipv4-tcp_comp.c:warning:no-previous-prototype-for-function-comp_setup_strp | `-- net-ipv4-tcp_comp.c:warning:no-previous-prototype-for-function-comp_stream_read |-- x86_64-buildonly-randconfig-001-20241221 | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-register_irqchip_proc | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-unregister_irqchip_proc | `-- mm-memory.c:warning:variable-nr_pages-set-but-not-used |-- x86_64-buildonly-randconfig-002-20241221 | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-register_irqchip_proc | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-unregister_irqchip_proc | |-- kernel-sched-isolation.c:error:setup_max_cpus-undeclared-(first-use-in-this-function) | `-- mm-memory.c:warning:variable-nr_pages-set-but-not-used |-- x86_64-buildonly-randconfig-003-20241221 | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-register_irqchip_proc | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-unregister_irqchip_proc | |-- kernel-sched-isolation.c:error:setup_max_cpus-undeclared-(first-use-in-this-function) | `-- mm-memory.c:warning:variable-nr_pages-set-but-not-used |-- x86_64-buildonly-randconfig-004-20241221 | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-register_irqchip_proc | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-unregister_irqchip_proc | `-- mm-memory.c:warning:variable-nr_pages-set-but-not-used |-- x86_64-buildonly-randconfig-005-20241221 | |-- drivers-crypto-ccp-hygon-hct.c:error:struct-device-has-no-member-named-numa_node | `-- mm-memory.c:warning:variable-nr_pages-set-but-not-used |-- x86_64-buildonly-randconfig-006-20241221 | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-register_irqchip_proc | |-- kernel-irq-proc.c:warning:no-previous-prototype-for-unregister_irqchip_proc | |-- kernel-sched-isolation.c:error:setup_max_cpus-undeclared-(first-use-in-this-function) | |-- mm-memory.c:warning:variable-nr_pages-set-but-not-used | `-- net-ipv4-tcp_output.c:warning:variable-tcp_hdr_rsrvd_4b-set-but-not-used `-- x86_64-defconfig |-- kernel-irq-proc.c:warning:no-previous-prototype-for-register_irqchip_proc |-- kernel-irq-proc.c:warning:no-previous-prototype-for-unregister_irqchip_proc `-- net-ipv4-tcp_output.c:warning:variable-tcp_hdr_rsrvd_4b-set-but-not-used elapsed time: 765m configs tested: 19 configs skipped: 106 tested configs: arm64 allmodconfig clang-18 arm64 allnoconfig gcc-14.2.0 arm64 randconfig-001-20241221 clang-18 arm64 randconfig-002-20241221 clang-16 arm64 randconfig-003-20241221 clang-20 arm64 randconfig-004-20241221 gcc-14.2.0 loongarch allmodconfig gcc-14.2.0 loongarch allnoconfig gcc-14.2.0 loongarch randconfig-001-20241222 gcc-14.2.0 loongarch randconfig-002-20241222 gcc-14.2.0 x86_64 allnoconfig clang-19 x86_64 allyesconfig clang-19 x86_64 buildonly-randconfig-001-20241221 gcc-12 x86_64 buildonly-randconfig-002-20241221 gcc-12 x86_64 buildonly-randconfig-003-20241221 gcc-12 x86_64 buildonly-randconfig-004-20241221 gcc-12 x86_64 buildonly-randconfig-005-20241221 gcc-11 x86_64 buildonly-randconfig-006-20241221 gcc-12 x86_64 defconfig gcc-11 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH OLK-5.10 0/2] Fix the incorrect definition and use of IMA_FIX_OVERLAYFS_DETECTION
by Xiang Yang 21 Dec '24

21 Dec '24
Xiang Yang (2): IMA: Fix the incorrect definition and use of IMA_FIX_OVERLAYFS_DETECTION config: Enable IMA_FIX_OVERLAYFS_DETECTION in openeuler defconfigs arch/arm64/configs/openeuler_defconfig | 1 + arch/x86/configs/openeuler_defconfig | 1 + security/integrity/ima/Kconfig | 2 +- security/integrity/ima/ima_main.c | 4 ++-- 4 files changed, 5 insertions(+), 3 deletions(-) -- 2.34.1
2 3
0 0
[openeuler:OLK-5.10 2588/2588] arch/x86/kvm/x86.c:1076:6: sparse: sparse: symbol 'kvm_post_set_cr4' was not declared. Should it be static?
by kernel test robot 21 Dec '24

21 Dec '24
Hi Yu, FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: e804413fbbd504bc7b5b84dc7b86307f2b127a83 commit: 8a7e6f51a756aa6e88ebd5da8a5f3b6744cd07b5 [2588/2588] KVM: x86: Introduce kvm_post_set_cr4 to post handle the CR4 emulation config: x86_64-randconfig-121-20241218 (https://download.01.org/0day-ci/archive/20241221/202412211034.4bD5Ydra-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/20241221/202412211034.4bD5Ydra-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/202412211034.4bD5Ydra-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) arch/x86/kvm/x86.c:893:6: sparse: sparse: symbol 'kvm_post_set_cr0' was not declared. Should it be static? >> arch/x86/kvm/x86.c:1076:6: sparse: sparse: symbol 'kvm_post_set_cr4' was not declared. Should it be static? arch/x86/kvm/x86.c:3051:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user * @@ got unsigned char [usertype] * @@ arch/x86/kvm/x86.c:3051:38: sparse: expected void const [noderef] __user * arch/x86/kvm/x86.c:3051:38: sparse: got unsigned char [usertype] * arch/x86/kvm/x86.c:8615:15: sparse: sparse: incompatible types in comparison expression (different address spaces): arch/x86/kvm/x86.c:8615:15: sparse: struct kvm_apic_map [noderef] __rcu * arch/x86/kvm/x86.c:8615:15: sparse: struct kvm_apic_map * arch/x86/kvm/x86.c:11015:32: sparse: sparse: Using plain integer as NULL pointer arch/x86/kvm/x86.c:11068:16: sparse: sparse: incompatible types in comparison expression (different address spaces): arch/x86/kvm/x86.c:11068:16: sparse: struct kvm_apic_map [noderef] __rcu * arch/x86/kvm/x86.c:11068:16: sparse: struct kvm_apic_map * arch/x86/kvm/x86.c:11069:15: sparse: sparse: incompatible types in comparison expression (different address spaces): arch/x86/kvm/x86.c:11069:15: sparse: struct kvm_pmu_event_filter [noderef] __rcu * arch/x86/kvm/x86.c:11069:15: sparse: struct kvm_pmu_event_filter * arch/x86/kvm/x86.c:4141:42: sparse: sparse: self-comparison always evaluates to false arch/x86/kvm/x86.c: note: in included file (through include/linux/notifier.h, include/linux/memory_hotplug.h, include/linux/mmzone.h, ...): include/linux/srcu.h:182:9: sparse: sparse: context imbalance in 'vcpu_enter_guest' - unexpected unlock vim +/kvm_post_set_cr4 +1076 arch/x86/kvm/x86.c 1075 > 1076 void kvm_post_set_cr4(struct kvm_vcpu *vcpu, unsigned long old_cr4, unsigned long cr4) 1077 { 1078 unsigned long mmu_role_bits = X86_CR4_PGE | X86_CR4_PSE | X86_CR4_PAE | 1079 X86_CR4_SMEP | X86_CR4_SMAP | X86_CR4_PKE; 1080 1081 if (((cr4 ^ old_cr4) & mmu_role_bits) || 1082 (!(cr4 & X86_CR4_PCIDE) && (old_cr4 & X86_CR4_PCIDE))) 1083 kvm_mmu_reset_context(vcpu); 1084 } 1085 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1334/1334] net/core/sock.c:2813:33: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot 21 Dec '24

21 Dec '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 02951ceaa6d546dfa0f741f52f6d47e0fb0ac7b4 commit: e6476c21447c4b17c47e476aade6facf050f31e8 [1334/1334] net: remove bogus RCU annotations on socket.wq config: x86_64-randconfig-r112-20241218 (https://download.01.org/0day-ci/archive/20241221/202412210915.kToB6vsf-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/20241221/202412210915.kToB6vsf-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/202412210915.kToB6vsf-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> net/core/sock.c:2813:33: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct socket_wq [noderef] __rcu *sk_wq @@ got struct socket_wq *wq @@ net/core/sock.c:2813:33: sparse: expected struct socket_wq [noderef] __rcu *sk_wq net/core/sock.c:2813:33: sparse: got struct socket_wq *wq net/core/sock.c:1799:9: sparse: sparse: context imbalance in 'sk_clone_lock' - wrong count at exit net/core/sock.c:1803:6: sparse: sparse: context imbalance in 'sk_free_unlock_clone' - unexpected unlock net/core/sock.c:2922:6: sparse: sparse: context imbalance in 'lock_sock_fast' - different lock contexts for basic block net/core/sock.c:3397:13: sparse: sparse: context imbalance in 'proto_seq_start' - wrong count at exit net/core/sock.c:3409:13: sparse: sparse: context imbalance in 'proto_seq_stop' - wrong count at exit net/core/sock.o: warning: objtool: sock_warn_obsolete_bsdism()+0x31: sibling call from callable instruction with modified stack frame net/core/sock.o: warning: objtool: sk_mc_loop()+0x91: sibling call from callable instruction with modified stack frame net/core/sock.o: warning: objtool: sk_set_memalloc()+0x76: sibling call from callable instruction with modified stack frame net/core/sock.o: warning: objtool: proto_register()+0x548: sibling call from callable instruction with modified stack frame net/core/sock.o: warning: objtool: __sk_destruct()+0xd3: sibling call from callable instruction with modified stack frame net/core/sock.o: warning: objtool: skb_set_owner_w()+0xf1: sibling call from callable instruction with modified stack frame net/core/sock.o: warning: objtool: __sk_dst_check()+0xa2: sibling call from callable instruction with modified stack frame net/core/sock.o: warning: objtool: sk_common_release()+0x1c2: sibling call from callable instruction with modified stack frame net/core/sock.o: warning: objtool: trace_sock_exceed_buf_limit()+0xf4: sibling call from callable instruction with modified stack frame net/core/sock.o: warning: objtool: sk_clear_memalloc()+0x7c: sibling call from callable instruction with modified stack frame net/core/sock.o: warning: objtool: trace_sock_rcvqueue_full()+0xe6: sibling call from callable instruction with modified stack frame net/core/sock.o: warning: objtool: sock_def_wakeup()+0x10e: sibling call from callable instruction with modified stack frame net/core/sock.o: warning: objtool: sk_dst_check()+0x179: sibling call from callable instruction with modified stack frame net/core/sock.o: warning: objtool: sk_clone_lock()+0x92f: sibling call from callable instruction with modified stack frame net/core/sock.o: warning: objtool: sock_def_error_report()+0x14d: sibling call from callable instruction with modified stack frame net/core/sock.o: warning: objtool: sock_def_readable()+0x14d: sibling call from callable instruction with modified stack frame net/core/sock.o: warning: objtool: sk_alloc()+0x868: sibling call from callable instruction with modified stack frame net/core/sock.o: warning: objtool: sk_send_sigurg()+0x16f: sibling call from callable instruction with modified stack frame net/core/sock.o: warning: objtool: sock_def_write_space()+0x36c: sibling call from callable instruction with modified stack frame net/core/sock.o: warning: objtool: sock_setsockopt()+0xeb0: sibling call from callable instruction with modified stack frame net/core/sock.o: warning: objtool: sock_getsockopt()+0xab1: sibling call from callable instruction with modified stack frame vim +2813 net/core/sock.c ^1da177e4c3f41 Linus Torvalds 2005-04-16 2795 ^1da177e4c3f41 Linus Torvalds 2005-04-16 2796 void sock_init_data(struct socket *sock, struct sock *sk) ^1da177e4c3f41 Linus Torvalds 2005-04-16 2797 { 581319c58600b5 Paolo Abeni 2017-03-09 2798 sk_init_common(sk); ^1da177e4c3f41 Linus Torvalds 2005-04-16 2799 sk->sk_send_head = NULL; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2800 99767f278ccf74 Kees Cook 2017-10-16 2801 timer_setup(&sk->sk_timer, NULL, 0); ^1da177e4c3f41 Linus Torvalds 2005-04-16 2802 ^1da177e4c3f41 Linus Torvalds 2005-04-16 2803 sk->sk_allocation = GFP_KERNEL; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2804 sk->sk_rcvbuf = sysctl_rmem_default; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2805 sk->sk_sndbuf = sysctl_wmem_default; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2806 sk->sk_state = TCP_CLOSE; 972692e0db9b0a David S. Miller 2008-06-17 2807 sk_set_socket(sk, sock); ^1da177e4c3f41 Linus Torvalds 2005-04-16 2808 ^1da177e4c3f41 Linus Torvalds 2005-04-16 2809 sock_set_flag(sk, SOCK_ZAPPED); ^1da177e4c3f41 Linus Torvalds 2005-04-16 2810 e71a4783aae059 Stephen Hemminger 2007-04-10 2811 if (sock) { ^1da177e4c3f41 Linus Torvalds 2005-04-16 2812 sk->sk_type = sock->type; 43815482370c51 Eric Dumazet 2010-04-29 @2813 sk->sk_wq = sock->wq; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2814 sock->sk = sk; 86741ec25462e4 Lorenzo Colitti 2016-11-04 2815 sk->sk_uid = SOCK_INODE(sock)->i_uid; 86741ec25462e4 Lorenzo Colitti 2016-11-04 2816 } else { 43815482370c51 Eric Dumazet 2010-04-29 2817 sk->sk_wq = NULL; 86741ec25462e4 Lorenzo Colitti 2016-11-04 2818 sk->sk_uid = make_kuid(sock_net(sk)->user_ns, 0); 86741ec25462e4 Lorenzo Colitti 2016-11-04 2819 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 2820 ^1da177e4c3f41 Linus Torvalds 2005-04-16 2821 rwlock_init(&sk->sk_callback_lock); cdfbabfb2f0ce9 David Howells 2017-03-09 2822 if (sk->sk_kern_sock) cdfbabfb2f0ce9 David Howells 2017-03-09 2823 lockdep_set_class_and_name( cdfbabfb2f0ce9 David Howells 2017-03-09 2824 &sk->sk_callback_lock, cdfbabfb2f0ce9 David Howells 2017-03-09 2825 af_kern_callback_keys + sk->sk_family, cdfbabfb2f0ce9 David Howells 2017-03-09 2826 af_family_kern_clock_key_strings[sk->sk_family]); cdfbabfb2f0ce9 David Howells 2017-03-09 2827 else cdfbabfb2f0ce9 David Howells 2017-03-09 2828 lockdep_set_class_and_name( cdfbabfb2f0ce9 David Howells 2017-03-09 2829 &sk->sk_callback_lock, 443aef0eddfa44 Peter Zijlstra 2007-07-19 2830 af_callback_keys + sk->sk_family, 443aef0eddfa44 Peter Zijlstra 2007-07-19 2831 af_family_clock_key_strings[sk->sk_family]); ^1da177e4c3f41 Linus Torvalds 2005-04-16 2832 ^1da177e4c3f41 Linus Torvalds 2005-04-16 2833 sk->sk_state_change = sock_def_wakeup; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2834 sk->sk_data_ready = sock_def_readable; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2835 sk->sk_write_space = sock_def_write_space; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2836 sk->sk_error_report = sock_def_error_report; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2837 sk->sk_destruct = sock_def_destruct; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2838 5640f7685831e0 Eric Dumazet 2012-09-23 2839 sk->sk_frag.page = NULL; 5640f7685831e0 Eric Dumazet 2012-09-23 2840 sk->sk_frag.offset = 0; ef64a54f6e5581 Pavel Emelyanov 2012-02-21 2841 sk->sk_peek_off = -1; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2842 109f6e39fa07c4 Eric W. Biederman 2010-06-13 2843 sk->sk_peer_pid = NULL; 109f6e39fa07c4 Eric W. Biederman 2010-06-13 2844 sk->sk_peer_cred = NULL; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2845 sk->sk_write_pending = 0; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2846 sk->sk_rcvlowat = 1; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2847 sk->sk_rcvtimeo = MAX_SCHEDULE_TIMEOUT; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2848 sk->sk_sndtimeo = MAX_SCHEDULE_TIMEOUT; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2849 6c7c98bad4883a Paolo Abeni 2017-03-30 2850 sk->sk_stamp = SK_DEFAULT_STAMP; 52267790ef52d7 Willem de Bruijn 2017-08-03 2851 atomic_set(&sk->sk_zckey, 0); ^1da177e4c3f41 Linus Torvalds 2005-04-16 2852 :::::: The code at line 2813 was first introduced by commit :::::: 43815482370c510c569fd18edb57afcb0fa8cab6 net: sock_def_readable() and friends RCU conversion :::::: TO: Eric Dumazet <eric.dumazet(a)gmail.com> :::::: CC: David S. Miller <davem(a)davemloft.net> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2588/2588] arch/x86/kvm/x86.c:893:6: sparse: sparse: symbol 'kvm_post_set_cr0' was not declared. Should it be static?
by kernel test robot 21 Dec '24

21 Dec '24
Hi Yu, FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: e804413fbbd504bc7b5b84dc7b86307f2b127a83 commit: 1686d271f795f8756b49151978b95b095c0598ad [2588/2588] KVM: x86: Introduce kvm_post_set_cr0 to post handle the CR0 emulation config: x86_64-randconfig-121-20241218 (https://download.01.org/0day-ci/archive/20241221/202412210743.TVhBJ1oK-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/20241221/202412210743.TVhBJ1oK-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/202412210743.TVhBJ1oK-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> arch/x86/kvm/x86.c:893:6: sparse: sparse: symbol 'kvm_post_set_cr0' was not declared. Should it be static? arch/x86/kvm/x86.c:3044:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user * @@ got unsigned char [usertype] * @@ arch/x86/kvm/x86.c:3044:38: sparse: expected void const [noderef] __user * arch/x86/kvm/x86.c:3044:38: sparse: got unsigned char [usertype] * arch/x86/kvm/x86.c:8608:15: sparse: sparse: incompatible types in comparison expression (different address spaces): arch/x86/kvm/x86.c:8608:15: sparse: struct kvm_apic_map [noderef] __rcu * arch/x86/kvm/x86.c:8608:15: sparse: struct kvm_apic_map * arch/x86/kvm/x86.c:11008:32: sparse: sparse: Using plain integer as NULL pointer arch/x86/kvm/x86.c:11061:16: sparse: sparse: incompatible types in comparison expression (different address spaces): arch/x86/kvm/x86.c:11061:16: sparse: struct kvm_apic_map [noderef] __rcu * arch/x86/kvm/x86.c:11061:16: sparse: struct kvm_apic_map * arch/x86/kvm/x86.c:11062:15: sparse: sparse: incompatible types in comparison expression (different address spaces): arch/x86/kvm/x86.c:11062:15: sparse: struct kvm_pmu_event_filter [noderef] __rcu * arch/x86/kvm/x86.c:11062:15: sparse: struct kvm_pmu_event_filter * arch/x86/kvm/x86.c:4134:42: sparse: sparse: self-comparison always evaluates to false arch/x86/kvm/x86.c: note: in included file (through include/linux/notifier.h, include/linux/memory_hotplug.h, include/linux/mmzone.h, ...): include/linux/srcu.h:182:9: sparse: sparse: context imbalance in 'vcpu_enter_guest' - unexpected unlock vim +/kvm_post_set_cr0 +893 arch/x86/kvm/x86.c 892 > 893 void kvm_post_set_cr0(struct kvm_vcpu *vcpu, unsigned long old_cr0, unsigned long cr0) 894 { 895 unsigned long update_bits = X86_CR0_PG | X86_CR0_WP; 896 897 if ((cr0 ^ old_cr0) & X86_CR0_PG) { 898 kvm_clear_async_pf_completion_queue(vcpu); 899 kvm_async_pf_hash_reset(vcpu); 900 } 901 902 if ((cr0 ^ old_cr0) & update_bits) 903 kvm_mmu_reset_context(vcpu); 904 905 if (((cr0 ^ old_cr0) & X86_CR0_CD) && 906 kvm_arch_has_noncoherent_dma(vcpu->kvm) && 907 !kvm_check_has_quirk(vcpu->kvm, KVM_X86_QUIRK_CD_NW_CLEARED)) 908 kvm_zap_gfn_range(vcpu->kvm, 0, ~0ULL); 909 } 910 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1341/1341] mm/sparse.o: warning: objtool: missing symbol for section .init.text
by kernel test robot 21 Dec '24

21 Dec '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 02951ceaa6d546dfa0f741f52f6d47e0fb0ac7b4 commit: 2a3cb8baef71e4dad4a6ec17f5f0db9e05f46a01 [1341/1341] mm/sparse: delete old sparse_init and enable new one config: x86_64-buildonly-randconfig-006-20241220 (https://download.01.org/0day-ci/archive/20241221/202412210532.I31r9MaS-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/20241221/202412210532.I31r9MaS-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/202412210532.I31r9MaS-lkp@intel.com/ All warnings (new ones prefixed by >>): mm/sparse.c: In function 'sparse_init_nid': mm/sparse.c:199:27: warning: comparison of unsigned expression in '>= 0' is always true [-Wtype-limits] 199 | ((section_nr >= 0) && \ | ^~ mm/sparse.c:461:9: note: in expansion of macro 'for_each_present_section_nr' 461 | for_each_present_section_nr(pnum_begin, pnum) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/sparse.c:199:27: warning: comparison of unsigned expression in '>= 0' is always true [-Wtype-limits] 199 | ((section_nr >= 0) && \ | ^~ mm/sparse.c:480:9: note: in expansion of macro 'for_each_present_section_nr' 480 | for_each_present_section_nr(pnum_begin, pnum) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/sparse.c: In function 'sparse_init': mm/sparse.c:199:27: warning: comparison of unsigned expression in '>= 0' is always true [-Wtype-limits] 199 | ((section_nr >= 0) && \ | ^~ mm/sparse.c:503:9: note: in expansion of macro 'for_each_present_section_nr' 503 | for_each_present_section_nr(pnum_begin + 1, pnum_end) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ >> mm/sparse.o: warning: objtool: missing symbol for section .init.text -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1341/1341] include/linux/kern_levels.h:5:25: warning: format '%p' expects argument of type 'void *', but argument 38 has type 'int'
by kernel test robot 21 Dec '24

21 Dec '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 02951ceaa6d546dfa0f741f52f6d47e0fb0ac7b4 commit: 2d2fe6b40444bd8f84f674930ac5f98a6314702e [1341/1341] ascend: mm: add an owner for mm_struct config: x86_64-randconfig-r052-20241221 (https://download.01.org/0day-ci/archive/20241221/202412210351.AFkLgZJH-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/20241221/202412210351.AFkLgZJH-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/202412210351.AFkLgZJH-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from include/linux/printk.h:7, from include/linux/kernel.h:14, from mm/debug.c:9: mm/debug.c: In function 'dump_mm': >> include/linux/kern_levels.h:5:25: warning: format '%p' expects argument of type 'void *', but argument 38 has type 'int' [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~~~~~ include/linux/kern_levels.h:8:25: note: in expansion of macro 'KERN_SOH' 8 | #define KERN_EMERG KERN_SOH "0" /* system is unusable */ | ^~~~~~~~ include/linux/printk.h:342:16: note: in expansion of macro 'KERN_EMERG' 342 | printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~ mm/debug.c:117:9: note: in expansion of macro 'pr_emerg' 117 | pr_emerg("mm %px mmap %px seqnum %llu task_size %lu\n" | ^~~~~~~~ >> include/linux/kern_levels.h:5:25: warning: format '%d' expects argument of type 'int', but argument 39 has type 'long unsigned int' [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~~~~~ include/linux/kern_levels.h:8:25: note: in expansion of macro 'KERN_SOH' 8 | #define KERN_EMERG KERN_SOH "0" /* system is unusable */ | ^~~~~~~~ include/linux/printk.h:342:16: note: in expansion of macro 'KERN_EMERG' 342 | printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~ mm/debug.c:117:9: note: in expansion of macro 'pr_emerg' 117 | pr_emerg("mm %px mmap %px seqnum %llu task_size %lu\n" | ^~~~~~~~ >> include/linux/kern_levels.h:5:25: warning: format '%lx' expects argument of type 'long unsigned int', but argument 40 has type 'const long unsigned int *' [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~~~~~ include/linux/kern_levels.h:8:25: note: in expansion of macro 'KERN_SOH' 8 | #define KERN_EMERG KERN_SOH "0" /* system is unusable */ | ^~~~~~~~ include/linux/printk.h:342:16: note: in expansion of macro 'KERN_EMERG' 342 | printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~ mm/debug.c:117:9: note: in expansion of macro 'pr_emerg' 117 | pr_emerg("mm %px mmap %px seqnum %llu task_size %lu\n" | ^~~~~~~~ >> include/linux/kern_levels.h:5:25: warning: format '%p' expects a matching 'void *' argument [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~~~~~ include/linux/kern_levels.h:8:25: note: in expansion of macro 'KERN_SOH' 8 | #define KERN_EMERG KERN_SOH "0" /* system is unusable */ | ^~~~~~~~ include/linux/printk.h:342:16: note: in expansion of macro 'KERN_EMERG' 342 | printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~ mm/debug.c:117:9: note: in expansion of macro 'pr_emerg' 117 | pr_emerg("mm %px mmap %px seqnum %llu task_size %lu\n" | ^~~~~~~~ vim +5 include/linux/kern_levels.h 314ba3520e513a7 Joe Perches 2012-07-30 4 04d2c8c83d0e3ac Joe Perches 2012-07-30 @5 #define KERN_SOH "\001" /* ASCII Start Of Header */ 04d2c8c83d0e3ac Joe Perches 2012-07-30 6 #define KERN_SOH_ASCII '\001' 04d2c8c83d0e3ac Joe Perches 2012-07-30 7 :::::: The code at line 5 was first introduced by commit :::::: 04d2c8c83d0e3ac5f78aeede51babb3236200112 printk: convert the format for KERN_<LEVEL> to a 2 byte pattern :::::: TO: Joe Perches <joe(a)perches.com> :::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1341/1341] include/linux/uaccess.h:112:17: warning: 'spallocinfo' may be used uninitialized
by kernel test robot 21 Dec '24

21 Dec '24
Hi Ding, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 02951ceaa6d546dfa0f741f52f6d47e0fb0ac7b4 commit: 9469d1759c2905dcef49df7e6240ad5c32b66296 [1341/1341] ascend: share_pool: enable svm to use share pool memory config: arm64-randconfig-002-20241220 (https://download.01.org/0day-ci/archive/20241221/202412210226.N1hHrIDJ-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241221/202412210226.N1hHrIDJ-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/202412210226.N1hHrIDJ-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 >>): drivers/char/svm.c:249:21: warning: no previous prototype for 'svm_find_mem_reg_node' [-Wmissing-prototypes] 249 | struct device_node *svm_find_mem_reg_node(struct device *dev, const char *compat) | ^~~~~~~~~~~~~~~~~~~~~ drivers/char/svm.c:419:6: warning: no previous prototype for 'sysrq_sched_debug_show_export' [-Wmissing-prototypes] 419 | void sysrq_sched_debug_show_export(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/char/svm.c:1429:5: warning: no previous prototype for 'svm_get_pasid' [-Wmissing-prototypes] 1429 | int svm_get_pasid(pid_t vpid, int dev_id __maybe_unused) | ^~~~~~~~~~~~~ drivers/char/svm.c:1502:5: warning: no previous prototype for '__svm_get_mpam' [-Wmissing-prototypes] 1502 | int __svm_get_mpam(struct svm_mpam *mpam) | ^~~~~~~~~~~~~~ In file included from arch/arm64/include/asm/atomic.h:34, from include/linux/atomic.h:7, from include/asm-generic/bitops/atomic.h:5, from arch/arm64/include/asm/bitops.h:37, from include/linux/bitops.h:19, from include/linux/kernel.h:11, from include/asm-generic/bug.h:18, from arch/arm64/include/asm/bug.h:37, from arch/arm64/include/asm/memory.h:27, from arch/arm64/include/asm/esr.h:21, from drivers/char/svm.c:10: In function '__cmpxchg_case_mb_4', inlined from '__cmpxchg_mb' at arch/arm64/include/asm/cmpxchg.h:143:1, inlined from 'svm_proc_load_flag' at drivers/char/svm.c:1967:12: arch/arm64/include/asm/atomic_lse.h:492:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'atomic_t[1]' [-Warray-bounds=] 492 | asm volatile( \ | ^~~ arch/arm64/include/asm/atomic_lse.h:523:1: note: in expansion of macro '__CMPXCHG_CASE' 523 | __CMPXCHG_CASE(w, , mb_4, al, "memory") | ^~~~~~~~~~~~~~ drivers/char/svm.c: In function 'svm_proc_load_flag': drivers/char/svm.c:1958:25: note: object 'l2buf_load_flag' of size 4 1958 | static atomic_t l2buf_load_flag = ATOMIC_INIT(0); | ^~~~~~~~~~~~~~~ In function '__cmpxchg_case_mb_4', inlined from '__cmpxchg_mb' at arch/arm64/include/asm/cmpxchg.h:143:1, inlined from 'svm_proc_load_flag' at drivers/char/svm.c:1967:12: arch/arm64/include/asm/atomic_lse.h:492:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'atomic_t[1]' [-Warray-bounds=] 492 | asm volatile( \ | ^~~ arch/arm64/include/asm/atomic_lse.h:523:1: note: in expansion of macro '__CMPXCHG_CASE' 523 | __CMPXCHG_CASE(w, , mb_4, al, "memory") | ^~~~~~~~~~~~~~ drivers/char/svm.c: In function 'svm_proc_load_flag': drivers/char/svm.c:1958:25: note: object 'l2buf_load_flag' of size 4 1958 | static atomic_t l2buf_load_flag = ATOMIC_INIT(0); | ^~~~~~~~~~~~~~~ In file included from drivers/char/svm.c:29: In function '_copy_from_user', inlined from 'copy_from_user' at include/linux/uaccess.h:144:7, inlined from 'svm_sp_alloc_mem' at drivers/char/svm.c:2144:8: >> include/linux/uaccess.h:112:17: warning: 'spallocinfo' may be used uninitialized [-Wmaybe-uninitialized] 112 | kasan_check_write(to, n); | ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/compiler.h:251, from arch/arm64/include/asm/memory.h:24: include/linux/kasan-checks.h: In function 'svm_sp_alloc_mem': include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here 7 | void kasan_check_write(const volatile void *p, unsigned int size); | ^~~~~~~~~~~~~~~~~ drivers/char/svm.c:2135:24: note: 'spallocinfo' declared here 2135 | struct spalloc spallocinfo; | ^~~~~~~~~~~ In function '_copy_from_user', inlined from 'copy_from_user' at include/linux/uaccess.h:144:7, inlined from 'svm_get_phy_memory_info' at drivers/char/svm.c:1805:6: include/linux/uaccess.h:112:17: warning: 'para' may be used uninitialized [-Wmaybe-uninitialized] 112 | kasan_check_write(to, n); | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kasan-checks.h: In function 'svm_get_phy_memory_info': include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here 7 | void kasan_check_write(const volatile void *p, unsigned int size); | ^~~~~~~~~~~~~~~~~ drivers/char/svm.c:1800:33: note: 'para' declared here 1800 | struct phymeminfo_ioctl para; | ^~~~ In function '_copy_from_user', inlined from 'copy_from_user' at include/linux/uaccess.h:144:7, inlined from 'svm_remap_proc' at drivers/char/svm.c:1863:8: include/linux/uaccess.h:112:17: warning: 'pmem' may be used uninitialized [-Wmaybe-uninitialized] 112 | kasan_check_write(to, n); | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kasan-checks.h: In function 'svm_remap_proc': include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here 7 | void kasan_check_write(const volatile void *p, unsigned int size); | ^~~~~~~~~~~~~~~~~ drivers/char/svm.c:1849:29: note: 'pmem' declared here 1849 | struct svm_proc_mem pmem; | ^~~~ In function '_copy_from_user', inlined from 'copy_from_user' at include/linux/uaccess.h:144:7, inlined from 'svm_ioctl' at drivers/char/svm.c:2217:9: include/linux/uaccess.h:112:17: warning: 'params' may be used uninitialized [-Wmaybe-uninitialized] 112 | kasan_check_write(to, n); | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kasan-checks.h: In function 'svm_ioctl': include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here 7 | void kasan_check_write(const volatile void *p, unsigned int size); | ^~~~~~~~~~~~~~~~~ drivers/char/svm.c:2209:33: note: 'params' declared here 2209 | struct svm_bind_process params; | ^~~~~~ In function '_copy_from_user', inlined from 'copy_from_user' at include/linux/uaccess.h:144:7, inlined from 'svm_sp_free_mem' at drivers/char/svm.c:2179:8, inlined from 'svm_ioctl' at drivers/char/svm.c:2280:9: >> include/linux/uaccess.h:112:17: warning: 'spallocinfo' may be used uninitialized [-Wmaybe-uninitialized] 112 | kasan_check_write(to, n); | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kasan-checks.h: In function 'svm_ioctl': include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here 7 | void kasan_check_write(const volatile void *p, unsigned int size); | ^~~~~~~~~~~~~~~~~ drivers/char/svm.c:2172:24: note: 'spallocinfo' declared here 2172 | struct spalloc spallocinfo; | ^~~~~~~~~~~ vim +/spallocinfo +112 include/linux/uaccess.h d597580d373774 Al Viro 2017-03-20 104 d597580d373774 Al Viro 2017-03-20 105 #ifdef INLINE_COPY_FROM_USER d597580d373774 Al Viro 2017-03-20 106 static inline unsigned long d597580d373774 Al Viro 2017-03-20 107 _copy_from_user(void *to, const void __user *from, unsigned long n) d597580d373774 Al Viro 2017-03-20 108 { d597580d373774 Al Viro 2017-03-20 109 unsigned long res = n; 9c5f6908de03a4 Al Viro 2017-06-29 110 might_fault(); 4983cb67a383a7 Linus Torvalds 2019-02-14 111 if (likely(access_ok(from, n))) { 9c5f6908de03a4 Al Viro 2017-06-29 @112 kasan_check_write(to, n); d597580d373774 Al Viro 2017-03-20 113 res = raw_copy_from_user(to, from, n); 9c5f6908de03a4 Al Viro 2017-06-29 114 } d597580d373774 Al Viro 2017-03-20 115 if (unlikely(res)) d597580d373774 Al Viro 2017-03-20 116 memset(to + (n - res), 0, res); d597580d373774 Al Viro 2017-03-20 117 return res; d597580d373774 Al Viro 2017-03-20 118 } d597580d373774 Al Viro 2017-03-20 119 #else d597580d373774 Al Viro 2017-03-20 120 extern unsigned long d597580d373774 Al Viro 2017-03-20 121 _copy_from_user(void *, const void __user *, unsigned long); d597580d373774 Al Viro 2017-03-20 122 #endif d597580d373774 Al Viro 2017-03-20 123 :::::: The code at line 112 was first introduced by commit :::::: 9c5f6908de03a4f52ba7364b11fcd6116225480c copy_{from,to}_user(): move kasan checks and might_fault() out-of-line :::::: TO: Al Viro <viro(a)zeniv.linux.org.uk> :::::: CC: Al Viro <viro(a)zeniv.linux.org.uk> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 267
  • 268
  • 269
  • 270
  • 271
  • 272
  • 273
  • ...
  • 1829
  • Older →

HyperKitty Powered by HyperKitty