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

  • 52 participants
  • 19139 discussions
[PATCH openEuler-22.03-LTS-SP1] [Backport] usb: gadget: f_ncm: fix potential NULL ptr deref in ncm_bitrate()
by Wang Hai 13 Sep '24

13 Sep '24
From: Maciej Żenczykowski <maze(a)google.com> stable inclusion from stable-v5.10.165 commit e92c70059178da751e5af7de02384b7dfadb5ec7 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IALIDP CVE: CVE-2023-52894 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- commit c6ec929595c7443250b2a4faea988c62019d5cd2 upstream. In Google internal bug 265639009 we've received an (as yet) unreproducible crash report from an aarch64 GKI 5.10.149-android13 running device. AFAICT the source code is at: https://android.googlesource.com/kernel/common/+/refs/tags/ASB-2022-12-05_1… The call stack is: ncm_close() -> ncm_notify() -> ncm_do_notify() with the crash at: ncm_do_notify+0x98/0x270 Code: 79000d0b b9000a6c f940012a f9400269 (b9405d4b) Which I believe disassembles to (I don't know ARM assembly, but it looks sane enough to me...): // halfword (16-bit) store presumably to event->wLength (at offset 6 of struct usb_cdc_notification) 0B 0D 00 79 strh w11, [x8, #6] // word (32-bit) store presumably to req->Length (at offset 8 of struct usb_request) 6C 0A 00 B9 str w12, [x19, #8] // x10 (NULL) was read here from offset 0 of valid pointer x9 // IMHO we're reading 'cdev->gadget' and getting NULL // gadget is indeed at offset 0 of struct usb_composite_dev 2A 01 40 F9 ldr x10, [x9] // loading req->buf pointer, which is at offset 0 of struct usb_request 69 02 40 F9 ldr x9, [x19] // x10 is null, crash, appears to be attempt to read cdev->gadget->max_speed 4B 5D 40 B9 ldr w11, [x10, #0x5c] which seems to line up with ncm_do_notify() case NCM_NOTIFY_SPEED code fragment: event->wLength = cpu_to_le16(8); req->length = NCM_STATUS_BYTECOUNT; /* SPEED_CHANGE data is up/down speeds in bits/sec */ data = req->buf + sizeof *event; data[0] = cpu_to_le32(ncm_bitrate(cdev->gadget)); My analysis of registers and NULL ptr deref crash offset (Unable to handle kernel NULL pointer dereference at virtual address 000000000000005c) heavily suggests that the crash is due to 'cdev->gadget' being NULL when executing: data[0] = cpu_to_le32(ncm_bitrate(cdev->gadget)); which calls: ncm_bitrate(NULL) which then calls: gadget_is_superspeed(NULL) which reads ((struct usb_gadget *)NULL)->max_speed and hits a panic. AFAICT, if I'm counting right, the offset of max_speed is indeed 0x5C. (remember there's a GKI KABI reservation of 16 bytes in struct work_struct) It's not at all clear to me how this is all supposed to work... but returning 0 seems much better than panic-ing... Cc: Felipe Balbi <balbi(a)kernel.org> Cc: Lorenzo Colitti <lorenzo(a)google.com> Cc: Carlos Llamas <cmllamas(a)google.com> Cc: stable(a)vger.kernel.org Signed-off-by: Maciej Żenczykowski <maze(a)google.com> Cc: stable <stable(a)kernel.org> Link: https://lore.kernel.org/r/20230117131839.1138208-1-maze@google.com Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: Wang Hai <wanghai38(a)huawei.com> --- drivers/usb/gadget/function/f_ncm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/function/f_ncm.c b/drivers/usb/gadget/function/f_ncm.c index 855127249f24..f56147489835 100644 --- a/drivers/usb/gadget/function/f_ncm.c +++ b/drivers/usb/gadget/function/f_ncm.c @@ -85,7 +85,9 @@ static inline struct f_ncm *func_to_ncm(struct usb_function *f) /* peak (theoretical) bulk transfer rate in bits-per-second */ static inline unsigned ncm_bitrate(struct usb_gadget *g) { - if (gadget_is_superspeed(g) && g->speed >= USB_SPEED_SUPER_PLUS) + if (!g) + return 0; + else if (gadget_is_superspeed(g) && g->speed >= USB_SPEED_SUPER_PLUS) return 4250000000U; else if (gadget_is_superspeed(g) && g->speed == USB_SPEED_SUPER) return 3750000000U; -- 2.17.1
2 1
0 0
[PATCH OLK-6.6] KVM:arm64:Add a kvm module param to get current enabled GIC version
by Zhiqiang Ni 13 Sep '24

13 Sep '24
From: Yanan Wang <wangyanan55(a)huawei.com> virt inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IAR5EZ CVE: NA Using GICv4.1 is not a 100% win in all scenarios, sometimes we need to use different GIC version in different usecases. Given that there is not a straight forward way to check the GIC version that system is using (e.g., kernel messages may be overriden with time elapses), let's add a module param in KVM such that userspace can check the GIC version simply by reading /sys/module/kvm/parameters/gic_version. Signed-off-by: Yanan Wang <wangyanan55(a)huawei.com> Signed-off-by: Zhiqiang Ni <nizhiqiang1(a)huawei.com> --- arch/arm64/kvm/vgic/vgic-v3.c | 37 +++++++++++++++++++++++++++++++++++ arch/arm64/kvm/vgic/vgic.h | 8 ++++++++ 2 files changed, 45 insertions(+) diff --git a/arch/arm64/kvm/vgic/vgic-v3.c b/arch/arm64/kvm/vgic/vgic-v3.c index dab599e857b5..3af4046b0e6d 100644 --- a/arch/arm64/kvm/vgic/vgic-v3.c +++ b/arch/arm64/kvm/vgic/vgic-v3.c @@ -20,6 +20,37 @@ static bool common_trap; static bool dir_trap; static bool gicv4_enable; +enum gic_version global_gic_version = UNKNOWN_GIC_VERSION; +static const char * const gic_version_str[] = { + "GICv2", + "GICv3", + "GICv4", + "GICv4.1", + "unknown" +}; + +static int get_gic_version(char *buffer, const struct kernel_param *kp); +static const struct kernel_param_ops gic_version_ops = { + .get = get_gic_version, +}; + +static const char *gic_version; +module_param_cb(gic_version, &gic_version_ops, &gic_version, S_IRUGO); +MODULE_PARM_DESC(gic_version, "Version of current enabled GIC"); + +static int get_gic_version(char *buffer, const struct kernel_param *kp) +{ + int index = global_gic_version; + + if (index < 0 || index >= ARRAY_SIZE(gic_version_str)) { + kvm_err("Invalid GIC version enum %d\n", index); + return -EINVAL; + } + gic_version = gic_version_str[index]; + + return param_get_charp(buffer, kp); +} + void vgic_v3_set_underflow(struct kvm_vcpu *vcpu) { struct vgic_v3_cpu_if *cpuif = &vcpu->arch.vgic_cpu.vgic_v3; @@ -654,6 +685,7 @@ int vgic_v3_probe(const struct gic_kvm_info *info) kvm_vgic_global_state.nr_lr = (ich_vtr_el2 & 0xf) + 1; kvm_vgic_global_state.can_emulate_gicv2 = false; kvm_vgic_global_state.ich_vtr_el2 = ich_vtr_el2; + global_gic_version = GICV3; /* GICv4 support? */ if (info->has_v4) { @@ -663,6 +695,11 @@ int vgic_v3_probe(const struct gic_kvm_info *info) kvm_vgic_global_state.has_gicv4_1 ? ".1" : "", gicv4_enable ? "en" : "dis"); + if (kvm_vgic_global_state.has_gicv4_1) + global_gic_version = GICV4_1; + else if (kvm_vgic_global_state.has_gicv4) + global_gic_version = GICV4; + #ifdef CONFIG_VIRT_VTIMER_IRQ_BYPASS kvm_vgic_global_state.has_direct_vtimer = info->has_vtimer && gicv4_enable; if (kvm_vgic_global_state.has_direct_vtimer) diff --git a/arch/arm64/kvm/vgic/vgic.h b/arch/arm64/kvm/vgic/vgic.h index 5135c690839e..539909a681d7 100644 --- a/arch/arm64/kvm/vgic/vgic.h +++ b/arch/arm64/kvm/vgic/vgic.h @@ -157,6 +157,14 @@ static inline bool vgic_direct_sgi_or_ppi(struct vgic_irq *irq) #endif } +enum gic_version { + GICV2, + GICV3, + GICV4, + GICV4_1, + UNKNOWN_GIC_VERSION +}; + /* * This struct provides an intermediate representation of the fields contained * in the GICH_VMCR and ICH_VMCR registers, such that code exporting the GIC -- 2.43.0
2 1
0 0
[PATCH OLK-6.6] KVM:arm64:Add a kvm parameter to control guest wfi trapping
by Zhiqiang Ni 13 Sep '24

13 Sep '24
virt inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IAQV1W CVE: NA -------------------------------- Currently, on GICv4+ system if a vCPU is only runnable process on a pCPU and we are using direct injection of interrupts, the guest WFI trapping will be turn off. So in host view, the vcpu process's CPU util is almost 100%, which may confuse someone. Let's add a kvm parameter to control guest wfi trapping. Signed-off-by: Zhiqiang Ni <nizhiqiang1(a)huawei.com> --- arch/arm64/include/asm/kvm_emulate.h | 3 ++ arch/arm64/include/asm/kvm_host.h | 2 ++ arch/arm64/kvm/arm.c | 49 ++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+) diff --git a/arch/arm64/include/asm/kvm_emulate.h b/arch/arm64/include/asm/kvm_emulate.h index 2293caab9..6992d010b 100644 --- a/arch/arm64/include/asm/kvm_emulate.h +++ b/arch/arm64/include/asm/kvm_emulate.h @@ -119,6 +119,9 @@ static inline void vcpu_clear_wfx_traps(struct kvm_vcpu *vcpu) vcpu->arch.hcr_el2 &= ~HCR_TWI; else vcpu->arch.hcr_el2 |= HCR_TWI; + + if (force_wfi_trap) + vcpu->arch.hcr_el2 |= HCR_TWI; } static inline void vcpu_set_wfx_traps(struct kvm_vcpu *vcpu) diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index ac8115098..5ba983f71 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -54,6 +54,7 @@ #define KVM_REQ_SUSPEND KVM_ARCH_REQ(6) #define KVM_REQ_RESYNC_PMU_EL0 KVM_ARCH_REQ(7) #define KVM_REQ_RELOAD_TLBI_DVMBM KVM_ARCH_REQ(8) +#define KVM_REQ_RELOAD_WFI_TRAPS KVM_ARCH_REQ(9) #define KVM_DIRTY_LOG_MANUAL_CAPS (KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE | \ KVM_DIRTY_LOG_INITIALLY_SET) @@ -1244,6 +1245,7 @@ extern unsigned int twedel; void kvm_arm_vcpu_power_off(struct kvm_vcpu *vcpu); bool kvm_arm_vcpu_stopped(struct kvm_vcpu *vcpu); +extern bool force_wfi_trap; extern bool kvm_ncsnp_support; extern bool kvm_dvmbm_support; diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index fe3add87e..22560263f 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -82,6 +82,48 @@ unsigned int twedel; module_param(twedel, uint, 0644); #endif +static int vcpu_req_reload_wfi_traps(const char *val, const struct kernel_param *kp); + +static const struct kernel_param_ops force_wfi_trap_ops = { + .set = vcpu_req_reload_wfi_traps, + .get = param_get_bool, +}; + +bool force_wfi_trap = false; +module_param_cb(force_wfi_trap, &force_wfi_trap_ops, &force_wfi_trap, S_IRUGO | S_IWUSR); + +static int vcpu_req_reload_wfi_traps(const char *val, const struct kernel_param *kp) +{ + struct kvm *kvm; + bool oldvalue; + int err; + + oldvalue = force_wfi_trap; + err = param_set_bool(val, kp); + if (err) + return err; + + if (oldvalue == force_wfi_trap) + return err; + + /* + * If set the force_wfi_trap from 1 to 0, no need to kick vcpus here. + * The HCR_TWI flag will be cleared in kvm_arch_vcpu_load(). + */ + if (force_wfi_trap == 0) + return 0; + + /* + * We need to kick vcpus out of guest mode here to reload + * wfx trapping config when re-enter guest mode. + */ + mutex_lock(&kvm_lock); + list_for_each_entry(kvm, &vm_list, vm_list) + kvm_make_all_cpus_request(kvm, KVM_REQ_RELOAD_WFI_TRAPS); + mutex_unlock(&kvm_lock); + return err; +} + int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu) { return kvm_vcpu_exiting_guest_mode(vcpu) == IN_GUEST_MODE; @@ -958,6 +1000,13 @@ static int check_vcpu_requests(struct kvm_vcpu *vcpu) if (kvm_check_request(KVM_REQ_RELOAD_TLBI_DVMBM, vcpu)) kvm_hisi_reload_lsudvmbm(vcpu->kvm); + + if (kvm_check_request(KVM_REQ_RELOAD_WFI_TRAPS, vcpu)) { + if (single_task_running()) + vcpu_clear_wfx_traps(vcpu); + else + vcpu_set_wfx_traps(vcpu); + } } return 1; -- 2.43.0
2 1
0 0
[openeuler:openEuler-1.0-LTS] BUILD REGRESSION c46f803e3465bd0ca66716804a4d3e20f586ac0d
by kernel test robot 13 Sep '24

13 Sep '24
tree/branch: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS branch HEAD: c46f803e3465bd0ca66716804a4d3e20f586ac0d !11525 v2 usb: gadget: core: Check for unset descriptor Error/Warning (recently discovered and may have been fixed): drivers/iommu/arm-smmu-v3.c:223:55: error: 'CONFIG_CMA_ALIGNMENT' undeclared (first use in this function); did you mean 'CONFIG_CMDLINE'? include/linux/kernel.h:875:9: error: first argument to '__builtin_choose_expr' not a constant kernel/sched/core.c:5976:9: error: implicit declaration of function 'init_auto_affinity'; did you mean 'irq_set_affinity'? [-Werror=implicit-function-declaration] Error/Warning ids grouped by kconfigs: recent_errors |-- arm64-allmodconfig | |-- block-blk-io-hierarchy-iodump.c:warning:no-previous-prototype-for-__bio_stage_hierarchy_start | `-- include-linux-thread_info.h:warning:b-may-be-used-uninitialized |-- arm64-randconfig-001-20240913 | `-- arch-arm64-include-asm-irqflags.h:warning:flags-may-be-used-uninitialized |-- arm64-randconfig-004-20240913 | |-- drivers-iommu-arm-smmu-v3.c:error:CONFIG_CMA_ALIGNMENT-undeclared-(first-use-in-this-function) | |-- drivers-tty-serial-sc16is7xx.c:warning:label-err_i2c-defined-but-not-used | |-- include-linux-kernel.h:error:first-argument-to-__builtin_choose_expr-not-a-constant | `-- kernel-sched-core.c:error:implicit-declaration-of-function-init_auto_affinity |-- x86_64-allyesconfig | `-- block-blk-io-hierarchy-iodump.c:warning:no-previous-prototype-for-function-__bio_stage_hierarchy_start `-- x86_64-randconfig-001-20240913 `-- kernel-sched-core.c:error:implicit-declaration-of-function-init_auto_affinity elapsed time: 995m configs tested: 20 configs skipped: 139 tested configs: arm64 allmodconfig gcc-14.1.0 arm64 allnoconfig gcc-14.1.0 arm64 randconfig-001-20240913 gcc-14.1.0 arm64 randconfig-002-20240913 gcc-14.1.0 arm64 randconfig-003-20240913 gcc-14.1.0 arm64 randconfig-004-20240913 gcc-14.1.0 x86_64 allnoconfig clang-18 x86_64 allyesconfig clang-18 x86_64 buildonly-randconfig-001-20240913 clang-18 x86_64 buildonly-randconfig-002-20240913 gcc-12 x86_64 buildonly-randconfig-003-20240913 clang-18 x86_64 buildonly-randconfig-004-20240913 clang-18 x86_64 buildonly-randconfig-005-20240913 gcc-12 x86_64 buildonly-randconfig-006-20240913 clang-18 x86_64 defconfig gcc-11 x86_64 randconfig-001-20240913 gcc-12 x86_64 randconfig-002-20240913 clang-18 x86_64 randconfig-003-20240913 gcc-12 x86_64 randconfig-004-20240913 clang-18 x86_64 rhel-8.3-rust clang-18 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 20703/23707] kernel/sched/core.c:5976:9: error: implicit declaration of function 'init_auto_affinity'; did you mean 'irq_set_affinity'?
by kernel test robot 13 Sep '24

13 Sep '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: c46f803e3465bd0ca66716804a4d3e20f586ac0d commit: 713cfd2684fa5ea08b144d92b9858b932c0f1705 [20703/23707] sched: Introduce smart grid scheduling strategy for cfs config: arm64-randconfig-004-20240913 (https://download.01.org/0day-ci/archive/20240913/202409131450.IS4ToWpC-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240913/202409131450.IS4ToWpC-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/202409131450.IS4ToWpC-lkp@intel.com/ All errors (new ones prefixed by >>): kernel/sched/core.c:1587:6: warning: no previous prototype for 'sched_set_stop_task' [-Wmissing-prototypes] 1587 | void sched_set_stop_task(int cpu, struct task_struct *stop) | ^~~~~~~~~~~~~~~~~~~ kernel/sched/core.c:3771:35: warning: no previous prototype for 'preempt_schedule_irq' [-Wmissing-prototypes] 3771 | asmlinkage __visible void __sched preempt_schedule_irq(void) | ^~~~~~~~~~~~~~~~~~~~ kernel/sched/core.c: In function 'sched_cpu_activate': kernel/sched/core.c:5845:9: error: implicit declaration of function 'tg_update_affinity_domains' [-Werror=implicit-function-declaration] 5845 | tg_update_affinity_domains(cpu, 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/core.c: In function 'sched_init_smp': >> kernel/sched/core.c:5976:9: error: implicit declaration of function 'init_auto_affinity'; did you mean 'irq_set_affinity'? [-Werror=implicit-function-declaration] 5976 | init_auto_affinity(&root_task_group); | ^~~~~~~~~~~~~~~~~~ | irq_set_affinity kernel/sched/core.c:5976:29: error: 'root_task_group' undeclared (first use in this function); did you mean 'task_group'? 5976 | init_auto_affinity(&root_task_group); | ^~~~~~~~~~~~~~~ | task_group kernel/sched/core.c:5976:29: note: each undeclared identifier is reported only once for each function it appears in kernel/sched/core.c: In function 'sched_init': kernel/sched/core.c:6029:39: warning: variable 'ptr' set but not used [-Wunused-but-set-variable] 6029 | unsigned long alloc_size = 0, ptr; | ^~~ In file included from include/linux/migrate.h:6, from kernel/sched/sched.h:52, from kernel/sched/core.c:8: include/linux/mempolicy.h: At top level: include/linux/mempolicy.h:329:13: warning: '__do_mbind' defined but not used [-Wunused-function] 329 | static long __do_mbind(unsigned long start, unsigned long len, | ^~~~~~~~~~ cc1: some warnings being treated as errors -- In file included from include/linux/list.h:9, from include/linux/resource_ext.h:17, from include/linux/acpi.h:26, from drivers/iommu/arm-smmu-v3.c:23: drivers/iommu/arm-smmu-v3.c: In function 'arm_smmu_device_hw_probe': >> drivers/iommu/arm-smmu-v3.c:223:55: error: 'CONFIG_CMA_ALIGNMENT' undeclared (first use in this function); did you mean 'CONFIG_CMDLINE'? 223 | #define Q_MAX_SZ_SHIFT (PAGE_SHIFT + CONFIG_CMA_ALIGNMENT) | ^~~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:851:36: note: in definition of macro '__typecheck' 851 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) | ^ include/linux/kernel.h:875:31: note: in expansion of macro '__safe_cmp' 875 | __builtin_choose_expr(__safe_cmp(x, y), \ | ^~~~~~~~~~ include/linux/kernel.h:943:33: note: in expansion of macro '__careful_cmp' 943 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) | ^~~~~~~~~~~~~ drivers/iommu/arm-smmu-v3.c:4024:40: note: in expansion of macro 'min_t' 4024 | smmu->cmdq.q.llq.max_n_shift = min_t(u32, CMDQ_MAX_SZ_SHIFT, | ^~~~~ drivers/iommu/arm-smmu-v3.c:296:42: note: in expansion of macro 'Q_MAX_SZ_SHIFT' 296 | #define CMDQ_MAX_SZ_SHIFT (Q_MAX_SZ_SHIFT - CMDQ_ENT_SZ_SHIFT) | ^~~~~~~~~~~~~~ drivers/iommu/arm-smmu-v3.c:4024:51: note: in expansion of macro 'CMDQ_MAX_SZ_SHIFT' 4024 | smmu->cmdq.q.llq.max_n_shift = min_t(u32, CMDQ_MAX_SZ_SHIFT, | ^~~~~~~~~~~~~~~~~ drivers/iommu/arm-smmu-v3.c:223:55: note: each undeclared identifier is reported only once for each function it appears in 223 | #define Q_MAX_SZ_SHIFT (PAGE_SHIFT + CONFIG_CMA_ALIGNMENT) | ^~~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:851:36: note: in definition of macro '__typecheck' 851 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) | ^ include/linux/kernel.h:875:31: note: in expansion of macro '__safe_cmp' 875 | __builtin_choose_expr(__safe_cmp(x, y), \ | ^~~~~~~~~~ include/linux/kernel.h:943:33: note: in expansion of macro '__careful_cmp' 943 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) | ^~~~~~~~~~~~~ drivers/iommu/arm-smmu-v3.c:4024:40: note: in expansion of macro 'min_t' 4024 | smmu->cmdq.q.llq.max_n_shift = min_t(u32, CMDQ_MAX_SZ_SHIFT, | ^~~~~ drivers/iommu/arm-smmu-v3.c:296:42: note: in expansion of macro 'Q_MAX_SZ_SHIFT' 296 | #define CMDQ_MAX_SZ_SHIFT (Q_MAX_SZ_SHIFT - CMDQ_ENT_SZ_SHIFT) | ^~~~~~~~~~~~~~ drivers/iommu/arm-smmu-v3.c:4024:51: note: in expansion of macro 'CMDQ_MAX_SZ_SHIFT' 4024 | smmu->cmdq.q.llq.max_n_shift = min_t(u32, CMDQ_MAX_SZ_SHIFT, | ^~~~~~~~~~~~~~~~~ >> include/linux/kernel.h:875:9: error: first argument to '__builtin_choose_expr' not a constant 875 | __builtin_choose_expr(__safe_cmp(x, y), \ | ^~~~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:943:33: note: in expansion of macro '__careful_cmp' 943 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) | ^~~~~~~~~~~~~ drivers/iommu/arm-smmu-v3.c:4024:40: note: in expansion of macro 'min_t' 4024 | smmu->cmdq.q.llq.max_n_shift = min_t(u32, CMDQ_MAX_SZ_SHIFT, | ^~~~~ >> include/linux/kernel.h:875:9: error: first argument to '__builtin_choose_expr' not a constant 875 | __builtin_choose_expr(__safe_cmp(x, y), \ | ^~~~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:943:33: note: in expansion of macro '__careful_cmp' 943 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) | ^~~~~~~~~~~~~ drivers/iommu/arm-smmu-v3.c:4038:40: note: in expansion of macro 'min_t' 4038 | smmu->evtq.q.llq.max_n_shift = min_t(u32, EVTQ_MAX_SZ_SHIFT, | ^~~~~ >> include/linux/kernel.h:875:9: error: first argument to '__builtin_choose_expr' not a constant 875 | __builtin_choose_expr(__safe_cmp(x, y), \ | ^~~~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:943:33: note: in expansion of macro '__careful_cmp' 943 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) | ^~~~~~~~~~~~~ drivers/iommu/arm-smmu-v3.c:4040:40: note: in expansion of macro 'min_t' 4040 | smmu->priq.q.llq.max_n_shift = min_t(u32, PRIQ_MAX_SZ_SHIFT, | ^~~~~ drivers/iommu/arm-smmu-v3.c: At top level: drivers/iommu/arm-smmu-v3.c:4343:5: warning: no previous prototype for 'arm_smmu_set_dev_mpam' [-Wmissing-prototypes] 4343 | int arm_smmu_set_dev_mpam(struct device *dev, int ssid, int partid, int pmg, | ^~~~~~~~~~~~~~~~~~~~~ drivers/iommu/arm-smmu-v3.c:4385:5: warning: no previous prototype for 'arm_smmu_get_dev_mpam' [-Wmissing-prototypes] 4385 | int arm_smmu_get_dev_mpam(struct device *dev, int ssid, int *partid, int *pmg, | ^~~~~~~~~~~~~~~~~~~~~ drivers/iommu/arm-smmu-v3.c:4399:5: warning: no previous prototype for 'arm_smmu_set_dev_user_mpam_en' [-Wmissing-prototypes] 4399 | int arm_smmu_set_dev_user_mpam_en(struct device *dev, int user_mpam_en) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iommu/arm-smmu-v3.c:4417:5: warning: no previous prototype for 'arm_smmu_get_dev_user_mpam_en' [-Wmissing-prototypes] 4417 | int arm_smmu_get_dev_user_mpam_en(struct device *dev, int *user_mpam_en) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +5976 kernel/sched/core.c 5949 5950 void __init sched_init_smp(void) 5951 { 5952 sched_init_numa(); 5953 5954 /* 5955 * There's no userspace yet to cause hotplug operations; hence all the 5956 * CPU masks are stable and all blatant races in the below code cannot 5957 * happen. The hotplug lock is nevertheless taken to satisfy lockdep, 5958 * but there won't be any contention on it. 5959 */ 5960 cpus_read_lock(); 5961 mutex_lock(&sched_domains_mutex); 5962 sched_init_domains(cpu_active_mask); 5963 mutex_unlock(&sched_domains_mutex); 5964 cpus_read_unlock(); 5965 5966 /* Move init over to a non-isolated CPU */ 5967 if (set_cpus_allowed_ptr(current, housekeeping_cpumask(HK_FLAG_DOMAIN)) < 0) 5968 BUG(); 5969 sched_init_granularity(); 5970 5971 init_sched_rt_class(); 5972 init_sched_dl_class(); 5973 5974 sched_smp_initialized = true; 5975 > 5976 init_auto_affinity(&root_task_group); 5977 } 5978 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1359/13930] mm/share_pool.c:1226:14: error: call to undeclared function 'huge_ptep_get'; ISO C99 and later do not support implicit function declarations
by kernel test robot 13 Sep '24

13 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 13706c950ff941dc015e16f76812077f9861e378 commit: 549b1f40b56511536196f7522ffa4d7b3da42337 [1359/13930] mm/sharepool: Implement mg_sp_make_share_u2k() config: arm64-randconfig-001-20240913 (https://download.01.org/0day-ci/archive/20240913/202409131346.fyTGKf2l-lkp@…) compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240913/202409131346.fyTGKf2l-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/202409131346.fyTGKf2l-lkp@intel.com/ All errors (new ones prefixed by >>): >> mm/share_pool.c:1226:14: error: call to undeclared function 'huge_ptep_get'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] pte_t pte = huge_ptep_get(ptep); ^ >> mm/share_pool.c:1226:8: error: initializing 'pte_t' with an expression of incompatible type 'int' pte_t pte = huge_ptep_get(ptep); ^ ~~~~~~~~~~~~~~~~~~~ 2 errors generated. vim +/huge_ptep_get +1226 mm/share_pool.c 1221 1222 static int sp_hugetlb_entry(pte_t *ptep, unsigned long hmask, 1223 unsigned long addr, unsigned long next, 1224 struct mm_walk *walk) 1225 { > 1226 pte_t pte = huge_ptep_get(ptep); 1227 struct page *page = pte_page(pte); 1228 struct sp_walk_data *sp_walk_data; 1229 1230 if (unlikely(!pte_present(pte))) { 1231 pr_debug("the page of addr %lx unexpectedly not in RAM\n", (unsigned long)addr); 1232 return -EFAULT; 1233 } 1234 1235 sp_walk_data = walk->private; 1236 get_page(page); 1237 sp_walk_data->pages[sp_walk_data->page_count++] = page; 1238 return 0; 1239 } 1240 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 19394/30000] drivers/ub/urma/uburma/uburma_cmd.c:144:6: warning: no previous prototype for 'uburma_jfs_event_cb'
by kernel test robot 13 Sep '24

13 Sep '24
Hi Yizhen, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 5a1d9701155c6908c76c68951170f10279685143 commit: dd9641804ad19402838975c28003465d0b42042a [19394/30000] ub: uburma add cmd create/delete jfs implementation. config: arm64-randconfig-004-20240912 (https://download.01.org/0day-ci/archive/20240913/202409131316.GLZstznv-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240913/202409131316.GLZstznv-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/202409131316.GLZstznv-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/ub/urma/uburma/uburma_cmd.c:144:6: warning: no previous prototype for 'uburma_jfs_event_cb' [-Wmissing-prototypes] 144 | void uburma_jfs_event_cb(struct ubcore_event *event, struct ubcore_ucontext *ctx) | ^~~~~~~~~~~~~~~~~~~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PGP_KEY_PARSER Depends on [n]: CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=y] && ASYMMETRIC_PUBLIC_KEY_SUBTYPE [=n] Selected by [y]: - PGP_PRELOAD [=y] && CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=y] vim +/uburma_jfs_event_cb +144 drivers/ub/urma/uburma/uburma_cmd.c 143 > 144 void uburma_jfs_event_cb(struct ubcore_event *event, struct ubcore_ucontext *ctx) 145 { 146 struct uburma_jfs_uobj *jfs_uobj; 147 148 if (event->element.jfs == NULL) 149 return; 150 151 jfs_uobj = (struct uburma_jfs_uobj *)event->element.jfs->jfs_cfg.jfs_context; 152 uburma_write_async_event(ctx, event->element.jfs->urma_jfs, event->event_type, 153 &jfs_uobj->async_event_list, &jfs_uobj->async_events_reported); 154 } 155 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 19146/30000] security/integrity/ima/ima_main.c:440:29: error: too few arguments to function call, expected 8, have 7
by kernel test robot 13 Sep '24

13 Sep '24
Hi Zhou, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 5a1d9701155c6908c76c68951170f10279685143 commit: e94df9b790f7ed9025c9321f16a77044f66b14a5 [19146/30000] ima: Add macros to isolate the IMA digest list config: x86_64-buildonly-randconfig-004-20240913 (https://download.01.org/0day-ci/archive/20240913/202409131250.EMUg1KnI-lkp@…) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240913/202409131250.EMUg1KnI-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/202409131250.EMUg1KnI-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from security/integrity/ima/ima_main.c:30: security/integrity/ima/ima.h:381:16: warning: declaration of 'struct ima_digest' will not be visible outside of this function [-Wvisibility] 381 | struct ima_digest *found_digest) | ^ >> security/integrity/ima/ima_main.c:440:29: error: too few arguments to function call, expected 8, have 7 433 | rc = ima_appraise_measurement(func, iint, file, | ~~~~~~~~~~~~~~~~~~~~~~~~ 434 | pathname, xattr_value, 435 | #ifdef CONFIG_IMA_DIGEST_LIST 436 | xattr_len, modsig, 437 | ima_digest_allow(found_digest, 438 | IMA_APPRAISE)); 439 | #else 440 | xattr_len, modsig); | ^ security/integrity/ima/ima.h:373:19: note: 'ima_appraise_measurement' declared here 373 | static inline int ima_appraise_measurement(enum ima_hooks func, | ^ ~~~~~~~~~~~~~~~~~~~~ 374 | struct integrity_iint_cache *iint, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 375 | struct file *file, | ~~~~~~~~~~~~~~~~~~ 376 | const unsigned char *filename, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 377 | struct evm_ima_xattr_data *xattr_value, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 378 | int xattr_len, | ~~~~~~~~~~~~~~ 379 | #ifndef CONFIG_IMA_DIGEST_LIST | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 380 | const struct modsig *modsig, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 381 | struct ima_digest *found_digest) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning and 1 error generated. vim +440 security/integrity/ima/ima_main.c 427 428 if (rc == 0 && (action & IMA_APPRAISE_SUBMASK)) { 429 rc = ima_check_blacklist(iint, modsig, pcr); 430 if (rc != -EPERM) { 431 inode_lock(inode); 432 433 rc = ima_appraise_measurement(func, iint, file, 434 pathname, xattr_value, 435 #ifdef CONFIG_IMA_DIGEST_LIST 436 xattr_len, modsig, 437 ima_digest_allow(found_digest, 438 IMA_APPRAISE)); 439 #else > 440 xattr_len, modsig); 441 #endif 442 inode_unlock(inode); 443 } 444 if (!rc) 445 rc = mmap_violation_check(func, file, &pathbuf, 446 &pathname, filename); 447 } 448 if (action & IMA_AUDIT) 449 ima_audit_measurement(iint, pathname); 450 451 if ((file->f_flags & O_DIRECT) && (iint->flags & IMA_PERMIT_DIRECTIO)) 452 rc = 0; 453 out_locked: 454 if ((mask & MAY_WRITE) && test_bit(IMA_DIGSIG, &iint->atomic_flags) && 455 !(iint->flags & IMA_NEW_FILE)) 456 rc = -EACCES; 457 mutex_unlock(&iint->mutex); 458 kfree(xattr_value); 459 ima_free_modsig(modsig); 460 out: 461 if (pathbuf) 462 __putname(pathbuf); 463 if (must_appraise) { 464 if (rc && (ima_appraise & IMA_APPRAISE_ENFORCE)) 465 return -EACCES; 466 if (file->f_mode & FMODE_WRITE) 467 set_bit(IMA_UPDATE_XATTR, &iint->atomic_flags); 468 } 469 return 0; 470 } 471 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH openEuler-22.03-LTS-SP1 0/2] Fix CVE-2023-52915
by Ye Bin 13 Sep '24

13 Sep '24
Hans Verkuil (1): media: dvb-usb-v2: af9035: fix missing unlock Zhang Shurong (1): media: dvb-usb-v2: af9035: Fix null-ptr-deref in af9035_i2c_master_xfer drivers/media/usb/dvb-usb-v2/af9035.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) -- 2.34.1
2 3
0 0
[PATCH openEuler-1.0-LTS v2 0/2] Fix CVE-2023-52915
by Ye Bin 13 Sep '24

13 Sep '24
Hans Verkuil (1): media: dvb-usb-v2: af9035: fix missing unlock Zhang Shurong (1): media: dvb-usb-v2: af9035: Fix null-ptr-deref in af9035_i2c_master_xfer drivers/media/usb/dvb-usb-v2/af9035.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) -- 2.34.1
2 3
0 0
  • ← Newer
  • 1
  • ...
  • 658
  • 659
  • 660
  • 661
  • 662
  • 663
  • 664
  • ...
  • 1914
  • Older →

HyperKitty Powered by HyperKitty