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

  • 46 participants
  • 19073 discussions
[PATCH openEuler-1.0-LTS 0/2] Fix CVE-2025-38058
by Long Li 30 Jun '25

30 Jun '25
This patch set fix CVE-2025-38058. Al Viro (2): do_umount(): add missing barrier before refcount checks in sync case __legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock fs/namespace.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) -- 2.39.2
2 3
0 0
[PATCH OLK-6.6] bpf: Avoid __bpf_prog_ret0_warn when jit fails
by Pu Lehui 30 Jun '25

30 Jun '25
From: KaFai Wan <mannkafai(a)gmail.com> mainline inclusion from mainline-v6.16-rc1 commit 86bc9c742426a16b52a10ef61f5b721aecca2344 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ICIMYR Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- syzkaller reported an issue: WARNING: CPU: 3 PID: 217 at kernel/bpf/core.c:2357 __bpf_prog_ret0_warn+0xa/0x20 kernel/bpf/core.c:2357 Modules linked in: CPU: 3 UID: 0 PID: 217 Comm: kworker/u32:6 Not tainted 6.15.0-rc4-syzkaller-00040-g8bac8898fe39 RIP: 0010:__bpf_prog_ret0_warn+0xa/0x20 kernel/bpf/core.c:2357 Call Trace: <TASK> bpf_dispatcher_nop_func include/linux/bpf.h:1316 [inline] __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run include/linux/filter.h:725 [inline] cls_bpf_classify+0x74a/0x1110 net/sched/cls_bpf.c:105 ... When creating bpf program, 'fp->jit_requested' depends on bpf_jit_enable. This issue is triggered because of CONFIG_BPF_JIT_ALWAYS_ON is not set and bpf_jit_enable is set to 1, causing the arch to attempt JIT the prog, but jit failed due to FAULT_INJECTION. As a result, incorrectly treats the program as valid, when the program runs it calls `__bpf_prog_ret0_warn` and triggers the WARN_ON_ONCE(1). Reported-by: syzbot+0903f6d7f285e41cdf10(a)syzkaller.appspotmail.com Closes: https://lore.kernel.org/bpf/6816e34e.a70a0220.254cdc.002c.GAE@google.com Fixes: fa9dd599b4da ("bpf: get rid of pure_initcall dependency to enable jits") Signed-off-by: KaFai Wan <mannkafai(a)gmail.com> Link: https://lore.kernel.org/r/20250526133358.2594176-1-mannkafai@gmail.com Signed-off-by: Alexei Starovoitov <ast(a)kernel.org> Signed-off-by: Pu Lehui <pulehui(a)huawei.com> --- kernel/bpf/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c index e968b07fd6b4..2ecaf891a167 100644 --- a/kernel/bpf/core.c +++ b/kernel/bpf/core.c @@ -2360,7 +2360,7 @@ struct bpf_prog *bpf_prog_select_runtime(struct bpf_prog *fp, int *err) /* In case of BPF to BPF calls, verifier did all the prep * work with regards to JITing, etc. */ - bool jit_needed = false; + bool jit_needed = fp->jit_requested; if (fp->bpf_func) goto finalize; -- 2.34.1
2 1
0 0
[openeuler:openEuler-1.0-LTS 1673/1673] fs/btrfs/transaction.o: warning: objtool: start_transaction()+0x3bd: unreachable instruction
by kernel test robot 30 Jun '25

30 Jun '25
Hi Filipe, First bad commit (maybe != root cause): tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: a9d08fabefcfd9cb8ebe45f8b79a321c0f349d40 commit: 2582bb7bd5a9278555265a99a94a8416e5eb7d3c [1673/1673] Btrfs: fix deadlock between fiemap and transaction commits config: x86_64-buildonly-randconfig-002-20250628 (https://download.01.org/0day-ci/archive/20250630/202506300834.dp152UeL-lkp@…) compiler: clang version 20.1.7 (https://github.com/llvm/llvm-project 6146a88f60492b520a36f8f8f3231e15f3cc6082) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250630/202506300834.dp152UeL-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/202506300834.dp152UeL-lkp@intel.com/ All warnings (new ones prefixed by >>): >> fs/btrfs/transaction.o: warning: objtool: start_transaction()+0x3bd: unreachable instruction -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2411/2411] arch/x86/kvm/../../../virt/kvm/eventfd.c:719: warning: cannot understand function prototype: 'struct eventfd_shadow '
by kernel test robot 30 Jun '25

30 Jun '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: c02455c4cce8052f74fc11c09e9073c01c7f33a4 commit: 2dcf53278783921137dbb4eb4628f2c96cac65e2 [2411/2411] eventfd:Introduce the eventfd batch processing interface config: x86_64-buildonly-randconfig-2001-20250626 (https://download.01.org/0day-ci/archive/20250629/202506291906.a435dLWR-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/20250629/202506291906.a435dLWR-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/202506291906.a435dLWR-lkp@intel.com/ All warnings (new ones prefixed by >>): >> arch/x86/kvm/../../../virt/kvm/eventfd.c:719: warning: cannot understand function prototype: 'struct eventfd_shadow ' >> arch/x86/kvm/../../../virt/kvm/eventfd.c:1102: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * If an exception occurs, arch/x86/kvm/../../../virt/kvm/eventfd.c:1131: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * If the temporarily stored eventfd cannot be successfully updated arch/x86/kvm/../../../virt/kvm/eventfd.c:1176: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Copy the current buses, Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for ACPI_HOTPLUG_IGNORE_OSC Depends on [n]: ACPI [=y] && ACPI_HOTPLUG_CPU [=n] Selected by [y]: - X86 [=y] && ACPI [=y] && HOTPLUG_CPU [=y] vim +719 arch/x86/kvm/../../../virt/kvm/eventfd.c 713 714 /** 715 * eventfd_shadow 716 * Save the eventfd pointer and operation. 717 * To protect Kabi, these members are placed here 718 */ > 719 struct eventfd_shadow { 720 struct list_head node; 721 struct _ioeventfd *eventfd; 722 /* Indicate the operations required for this eventfd */ 723 u8 flag; 724 }; 725 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2411/2411] mm/mempolicy.c:1115:32: warning: variable 'vma' set but not used
by kernel test robot 29 Jun '25

29 Jun '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: c02455c4cce8052f74fc11c09e9073c01c7f33a4 commit: dba69db9a5fc7c2c9c0cda0f32bb3b5f3d73ef93 [2411/2411] mm/damon/vaddr: Add demotion interface for migrating cold pages to target nodemask config: x86_64-buildonly-randconfig-2001-20250626 (https://download.01.org/0day-ci/archive/20250629/202506291741.f76J7DJD-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/20250629/202506291741.f76J7DJD-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/202506291741.f76J7DJD-lkp@intel.com/ All warnings (new ones prefixed by >>): mm/mempolicy.c: In function 'migrate_area_to_node': >> mm/mempolicy.c:1115:32: warning: variable 'vma' set but not used [-Wunused-but-set-variable] 1115 | struct vm_area_struct *vma; | ^~~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for ACPI_HOTPLUG_IGNORE_OSC Depends on [n]: ACPI [=y] && ACPI_HOTPLUG_CPU [=n] Selected by [y]: - X86 [=y] && ACPI [=y] && HOTPLUG_CPU [=y] vim +/vma +1115 mm/mempolicy.c 1106 1107 /* 1108 * Migrate area pages from one node to a target node. 1109 * Returns error or the number of pages not migrated. 1110 */ 1111 static int migrate_area_to_node(struct mm_struct *mm, int source, int dest, 1112 unsigned long start, unsigned long end, int flags) 1113 { 1114 nodemask_t nmask; > 1115 struct vm_area_struct *vma; 1116 LIST_HEAD(pagelist); 1117 int err = 0; 1118 struct migration_target_control mtc = { 1119 .nid = dest, 1120 .gfp_mask = GFP_HIGHUSER_MOVABLE | __GFP_THISNODE, 1121 }; 1122 1123 nodes_clear(nmask); 1124 node_set(source, nmask); 1125 1126 /* 1127 * This does not "check" the range but isolates all pages that 1128 * need migration. Between passing in the full user address 1129 * space range and MPOL_MF_DISCONTIG_OK, this call can not fail. 1130 */ 1131 vma = find_vma(mm, 0); 1132 VM_BUG_ON(!(flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL))); 1133 queue_pages_range(mm, start, end, &nmask, 1134 flags | MPOL_MF_DISCONTIG_OK, &pagelist, false); 1135 1136 if (!list_empty(&pagelist)) { 1137 err = migrate_pages(&pagelist, alloc_migration_target, NULL, 1138 (unsigned long)&mtc, MIGRATE_SYNC, MR_DAMON_DEMOTION, NULL); 1139 if (err) 1140 putback_movable_pages(&pagelist); 1141 } 1142 1143 return err; 1144 } 1145 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2985/2985] drivers/acpi/cppc_acpi.c:1530: warning: Function parameter or member 'auto_act_window' not described in 'cppc_set_auto_act_window'
by kernel test robot 29 Jun '25

29 Jun '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: c245365237da527fb423d85e7ec54648113f843d commit: 6d474065f368e21b77526a5c30f5a1aed017142a [2985/2985] ACPI: CPPC: Add three register ABIs config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20250629/202506291741.NhBzViuH-lkp@…) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) rustc: rustc 1.58.0 (02072b482 2022-01-11) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250629/202506291741.NhBzViuH-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/202506291741.NhBzViuH-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/acpi/cppc_acpi.c:450: warning: Function parameter or member 'cpc_pptr' not described in '__acpi_get_psd_map' drivers/acpi/cppc_acpi.c:700: warning: Function parameter or member 'pcc_ss_id' not described in 'pcc_data_alloc' >> drivers/acpi/cppc_acpi.c:1530: warning: Function parameter or member 'auto_act_window' not described in 'cppc_set_auto_act_window' >> drivers/acpi/cppc_acpi.c:1530: warning: Excess function parameter 'enable' description in 'cppc_set_auto_act_window' >> drivers/acpi/cppc_acpi.c:1541: warning: Function parameter or member 'cpunum' not described in 'cppc_get_auto_act_window' >> drivers/acpi/cppc_acpi.c:1541: warning: Function parameter or member 'auto_act_window' not described in 'cppc_get_auto_act_window' >> drivers/acpi/cppc_acpi.c:1541: warning: Excess function parameter 'cpu' description in 'cppc_get_auto_act_window' >> drivers/acpi/cppc_acpi.c:1541: warning: Excess function parameter 'enable' description in 'cppc_get_auto_act_window' >> drivers/acpi/cppc_acpi.c:1552: warning: Function parameter or member 'auto_sel' not described in 'cppc_get_auto_sel' >> drivers/acpi/cppc_acpi.c:1552: warning: Excess function parameter 'enable' description in 'cppc_get_auto_sel' >> drivers/acpi/cppc_acpi.c:1575: warning: Function parameter or member 'epp_val' not described in 'cppc_set_epp' >> drivers/acpi/cppc_acpi.c:1575: warning: Excess function parameter 'enable' description in 'cppc_set_epp' drivers/acpi/cppc_acpi.c:1716: warning: Function parameter or member 'cpu_num' not described in 'cppc_get_transition_latency' vim +1530 drivers/acpi/cppc_acpi.c 1523 1524 /** 1525 * cppc_set_auto_act_window - Write autonomous act window register. 1526 * @cpu : CPU to which to write register. 1527 * @enable : the desired value of autonomous act window register to be updated. 1528 */ 1529 int cppc_set_auto_act_window(int cpu, u64 auto_act_window) > 1530 { 1531 return cppc_set_reg(cpu, AUTO_ACT_WINDOW, auto_act_window); 1532 } 1533 EXPORT_SYMBOL_GPL(cppc_set_auto_act_window); 1534 1535 /** 1536 * cppc_get_auto_act_window - Read autonomous act window register. 1537 * @cpu : CPU to which to write register. 1538 * @enable : the desired value of autonomous act window register to be updated. 1539 */ 1540 int cppc_get_auto_act_window(int cpunum, u64 *auto_act_window) > 1541 { 1542 return cppc_get_reg(cpunum, AUTO_ACT_WINDOW, auto_act_window); 1543 } 1544 EXPORT_SYMBOL_GPL(cppc_get_auto_act_window); 1545 1546 /** 1547 * cppc_get_auto_sel - Read autonomous selection register. 1548 * @cpunum : CPU to which to write register. 1549 * @enable : the desired value of autonomous selection resiter to be updated. 1550 */ 1551 int cppc_get_auto_sel(int cpunum, u64 *auto_sel) > 1552 { 1553 return cppc_get_reg(cpunum, AUTO_SEL_ENABLE, auto_sel); 1554 } 1555 EXPORT_SYMBOL_GPL(cppc_get_auto_sel); 1556 1557 1558 /** 1559 * cppc_set_auto_sel - Write autonomous selection register. 1560 * @cpu : CPU to which to write register. 1561 * @enable : the desired value of autonomous selection resiter to be updated. 1562 */ 1563 int cppc_set_auto_sel(int cpu, bool enable) 1564 { 1565 return cppc_set_reg(cpu, AUTO_SEL_ENABLE, enable); 1566 } 1567 EXPORT_SYMBOL_GPL(cppc_set_auto_sel); 1568 1569 /** 1570 * cppc_set_epp - Write energe perf register. 1571 * @cpu : CPU to which to write register. 1572 * @enable : the desired value of energe perf register to be updated. 1573 */ 1574 int cppc_set_epp(int cpu, u64 epp_val) > 1575 { 1576 return cppc_set_reg(cpu, ENERGY_PERF, epp_val); 1577 } 1578 EXPORT_SYMBOL_GPL(cppc_set_epp); 1579 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2411/2411] drivers/crypto/ccp/hygon/vpsp.c:589:6: warning: no previous prototype for 'vpsp_set_default_vid_permission'
by kernel test robot 29 Jun '25

29 Jun '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: c02455c4cce8052f74fc11c09e9073c01c7f33a4 commit: e2861aaa47961017ada7f66de11104bbf3b85eb1 [2411/2411] crypto: ccp: move vpsp-related functions to vpsp.c config: x86_64-buildonly-randconfig-2001-20250626 (https://download.01.org/0day-ci/archive/20250629/202506291537.ZBDFCNhr-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/20250629/202506291537.ZBDFCNhr-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/202506291537.ZBDFCNhr-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/crypto/ccp/hygon/vpsp.c:589:6: warning: no previous prototype for 'vpsp_set_default_vid_permission' [-Wmissing-prototypes] 589 | void vpsp_set_default_vid_permission(uint32_t is_allow) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/crypto/ccp/hygon/vpsp.c:1055:5: warning: no previous prototype for 'vpsp_do_cmd' [-Wmissing-prototypes] 1055 | int vpsp_do_cmd(int cmd, phys_addr_t phy_addr, int *psp_ret) | ^~~~~~~~~~~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for ACPI_HOTPLUG_IGNORE_OSC Depends on [n]: ACPI [=y] && ACPI_HOTPLUG_CPU [=n] Selected by [y]: - X86 [=y] && ACPI [=y] && HOTPLUG_CPU [=y] vim +/vpsp_set_default_vid_permission +589 drivers/crypto/ccp/hygon/vpsp.c 582 583 /** 584 * When 'allow_default_vid' is set to 1, 585 * QEMU is allowed to use 'vid 0' by default 586 * in the absence of a valid 'vid' setting. 587 */ 588 uint32_t allow_default_vid = 1; > 589 void vpsp_set_default_vid_permission(uint32_t is_allow) 590 { 591 allow_default_vid = is_allow; 592 } 593 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2985/2985] drivers/net/ipvlan/ipvlan_main.c:431:19: warning: variable 'old_prog' set but not used
by kernel test robot 29 Jun '25

29 Jun '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: c245365237da527fb423d85e7ec54648113f843d commit: 373ce97bdbb6378acf984656798aff4bb706a447 [2985/2985] ipvlan: support use xdp native mode config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20250629/202506291521.HeG05IiC-lkp@…) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) rustc: rustc 1.58.0 (02072b482 2022-01-11) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250629/202506291521.HeG05IiC-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/202506291521.HeG05IiC-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/net/ipvlan/ipvlan_main.c:431:19: warning: variable 'old_prog' set but not used [-Wunused-but-set-variable] 431 | struct bpf_prog *old_prog; | ^ 1 warning generated. vim +/old_prog +431 drivers/net/ipvlan/ipvlan_main.c 426 427 static int ipvlan_xdp_set(struct net_device *dev, struct bpf_prog *prog, 428 struct netlink_ext_ack *extack) 429 { 430 struct ipvl_dev *priv = netdev_priv(dev); > 431 struct bpf_prog *old_prog; 432 433 old_prog = rtnl_dereference(priv->xdp_prog); 434 rcu_assign_pointer(priv->xdp_prog, prog); 435 return 0; 436 } 437 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH OLK-6.6] LeapIOraid: add device and support fw log
by haodongdong 29 Jun '25

29 Jun '25
LeapIO inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/ICIKQI ------------------------------------------ add device and support fw log Signed-off-by: haodongdong <doubled(a)leap-io.com> --- drivers/scsi/leapioraid/leapioraid_app.c | 28 +++++++ drivers/scsi/leapioraid/leapioraid_func.c | 79 +++++++------------ drivers/scsi/leapioraid/leapioraid_func.h | 6 +- drivers/scsi/leapioraid/leapioraid_os.c | 2 + .../scsi/leapioraid/leapioraid_transport.c | 8 +- 5 files changed, 69 insertions(+), 54 deletions(-) diff --git a/drivers/scsi/leapioraid/leapioraid_app.c b/drivers/scsi/leapioraid/leapioraid_app.c index 6e7f6bf877782..039b4d8ffd027 100644 --- a/drivers/scsi/leapioraid/leapioraid_app.c +++ b/drivers/scsi/leapioraid/leapioraid_app.c @@ -2188,6 +2188,33 @@ const struct attribute_group *leapioraid_dev_groups[] = { NULL }; +static int my_mmap(struct file *filp, struct vm_area_struct *vma) +{ + struct LEAPIORAID_ADAPTER *ioc; + unsigned long pfn; + unsigned long length = vma->vm_end - vma->vm_start; + + ioc = list_first_entry(&leapioraid_ioc_list, + struct LEAPIORAID_ADAPTER, list); + if (length > (SYS_LOG_BUF_SIZE + SYS_LOG_BUF_RESERVE)) { + pr_err("Requested mapping size is too large\n"); + return -EINVAL; + } + if (ioc->log_buffer == NULL) { + pr_err("no log buffer\n"); + return -EINVAL; + } + + pfn = virt_to_phys(ioc->log_buffer) >> PAGE_SHIFT; + + if (remap_pfn_range(vma, vma->vm_start, pfn, length, vma->vm_page_prot)) { + pr_err("Failed to map memory to user space\n"); + return -EAGAIN; + } + + return 0; +} + static const struct file_operations leapioraid_ctl_fops = { .owner = THIS_MODULE, @@ -2197,6 +2224,7 @@ file_operations leapioraid_ctl_fops = { #ifdef CONFIG_COMPAT .compat_ioctl = leapioraid_ctl_ioctl_compat, #endif + .mmap = my_mmap, }; static struct miscdevice leapioraid_ctl_dev = { diff --git a/drivers/scsi/leapioraid/leapioraid_func.c b/drivers/scsi/leapioraid/leapioraid_func.c index 97e0f893ab4c5..19fe5e96a9add 100644 --- a/drivers/scsi/leapioraid/leapioraid_func.c +++ b/drivers/scsi/leapioraid/leapioraid_func.c @@ -315,66 +315,38 @@ leapioraid_udp_exit(void) sock_release(sock); } -static int -leapioraid_send_udp_pkg(void *buf, U32 datasize) +struct info { - int ret; - struct kvec vec; - - vec.iov_len = datasize; - vec.iov_base = buf; - ret = kernel_sendmsg(sock, &msg, &vec, 1, vec.iov_len); - if (ret <= 0) { - pr_err_ratelimited("Sending UDP packet failed: errorno = %d", - ret); - return 0; - } else { - return ret; - } -} + u32 user_position; + u32 ioc_position; +}; +int cooo; static void leapioraid_base_pcie_log_work(struct work_struct *work) { struct LEAPIORAID_ADAPTER *ioc = - container_of(work, struct LEAPIORAID_ADAPTER, pcie_log_work.work); + container_of(work, + struct LEAPIORAID_ADAPTER, pcie_log_work.work); unsigned long flags; - u32 host_logbuf_position, ioc_logbuf_position; - u32 datasize, offset, send_sz, actual_send_sz; - - while (true) { - host_logbuf_position = - ioc->base_readl(&ioc->chip->HostLogBufPosition, 0); - ioc_logbuf_position = - ioc->base_readl(&ioc->chip->IocLogBufPosition, 0); - datasize = ioc_logbuf_position - host_logbuf_position; - offset = host_logbuf_position % SYS_LOG_BUF_SIZE; - if (datasize == 0) { - goto rearm_timer; - } else if (datasize > SYS_LOG_BUF_SIZE) { - pr_err("log thread error:data size overflow\n"); - return; - } + struct info *infom = (struct info *)(ioc->log_buffer + SYS_LOG_BUF_SIZE); - if (offset + datasize > SYS_LOG_BUF_SIZE) - send_sz = SYS_LOG_BUF_SIZE - offset; - else - send_sz = datasize; + if (cooo == 0) { + infom->user_position = + ioc->base_readl(&ioc->chip->HostLogBufPosition, 0); + infom->ioc_position = + ioc->base_readl(&ioc->chip->IocLogBufPosition, 0); + cooo++; + } - if (send_sz > MAX_UPD_PAYLOAD_SZ) - send_sz = MAX_UPD_PAYLOAD_SZ; + writel(infom->user_position, &ioc->chip->HostLogBufPosition); + infom->ioc_position = ioc->base_readl(&ioc->chip->IocLogBufPosition, 0); - actual_send_sz = - leapioraid_send_udp_pkg(ioc->log_buffer + offset, send_sz); - host_logbuf_position += actual_send_sz; - writel(host_logbuf_position, &ioc->chip->HostLogBufPosition); - } -rearm_timer: spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags); if (ioc->pcie_log_work_q) queue_delayed_work(ioc->pcie_log_work_q, - &ioc->pcie_log_work, - msecs_to_jiffies(LEAPIORAID_LOG_POLLING_INTERVAL)); + &ioc->pcie_log_work, + msecs_to_jiffies(LEAPIORAID_LOG_POLLING_INTERVAL)); spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags); } @@ -4786,9 +4758,18 @@ leapioraid_base_trace_log_init(struct LEAPIORAID_ADAPTER *ioc) pr_info("%s %s\n", ioc->name, __func__)); if (ioc->log_buffer == NULL) { ioc->log_buffer = - dma_alloc_coherent(&ioc->pdev->dev, SYS_LOG_BUF_SIZE, - &ioc->log_buffer_dma, GFP_KERNEL); + dma_alloc_coherent(&ioc->pdev->dev, + (SYS_LOG_BUF_SIZE + SYS_LOG_BUF_RESERVE), + &ioc->log_buffer_dma, GFP_KERNEL); + if (!ioc->log_buffer) { + pr_err("%s: Failed to allocate log_buffer at %s:%d/%s()!\n", + ioc->name, __FILE__, __LINE__, __func__); + return -ENOMEM; + } + } + memset(ioc->log_buffer, 0, (SYS_LOG_BUF_SIZE + SYS_LOG_BUF_RESERVE)); + memset(&mpi_request, 0, sizeof(struct LeapioraidIOCLogReq_t)); mpi_request.Function = LEAPIORAID_FUNC_LOG_INIT; mpi_request.BufAddr = ioc->log_buffer_dma; diff --git a/drivers/scsi/leapioraid/leapioraid_func.h b/drivers/scsi/leapioraid/leapioraid_func.h index 76babcb40766c..a4beb1412d666 100644 --- a/drivers/scsi/leapioraid/leapioraid_func.h +++ b/drivers/scsi/leapioraid/leapioraid_func.h @@ -61,7 +61,9 @@ #define fallthrough #endif -#define SYS_LOG_BUF_SIZE (0x20000) +#define SYS_LOG_BUF_SIZE (0x200000) //2M +#define SYS_LOG_BUF_RESERVE (0x1000) //256 + #define MAX_UPD_PAYLOAD_SZ (0x4000) #define LEAPIORAID_DRIVER_NAME "LeapIoRaid" @@ -76,6 +78,8 @@ #define LEAPIORAID_VENDOR_ID (0xD405) #define LEAPIORAID_DEVICE_ID_1 (0x1000) #define LEAPIORAID_DEVICE_ID_2 (0x1001) +#define LEAPIORAID_HBA (0x8200) +#define LEAPIORAID_RAID (0x8201) #define LEAPIORAID_MAX_PHYS_SEGMENTS SG_CHUNK_SIZE diff --git a/drivers/scsi/leapioraid/leapioraid_os.c b/drivers/scsi/leapioraid/leapioraid_os.c index 368a3c859a04b..bb3ef15dec0a2 100644 --- a/drivers/scsi/leapioraid/leapioraid_os.c +++ b/drivers/scsi/leapioraid/leapioraid_os.c @@ -9685,6 +9685,8 @@ static const struct pci_device_id leapioraid_pci_table[] = { { 0x1556, 0x1111, PCI_ANY_ID, PCI_ANY_ID }, { LEAPIORAID_VENDOR_ID, LEAPIORAID_DEVICE_ID_1, PCI_ANY_ID, PCI_ANY_ID }, { LEAPIORAID_VENDOR_ID, LEAPIORAID_DEVICE_ID_2, PCI_ANY_ID, PCI_ANY_ID }, + { LEAPIORAID_VENDOR_ID, LEAPIORAID_HBA, PCI_ANY_ID, PCI_ANY_ID }, + { LEAPIORAID_VENDOR_ID, LEAPIORAID_RAID, PCI_ANY_ID, PCI_ANY_ID }, { 0 } }; diff --git a/drivers/scsi/leapioraid/leapioraid_transport.c b/drivers/scsi/leapioraid/leapioraid_transport.c index e7ff263a8b6e7..edddd56128a19 100644 --- a/drivers/scsi/leapioraid/leapioraid_transport.c +++ b/drivers/scsi/leapioraid/leapioraid_transport.c @@ -852,8 +852,8 @@ leapioraid_transport_port_remove(struct LEAPIORAID_ADAPTER *ioc, list_for_each_entry_safe(leapioraid_phy, next_phy, &leapioraid_port->phy_list, port_siblings) { if ((ioc->logging_level & LEAPIORAID_DEBUG_TRANSPORT)) - dev_info(&leapioraid_port->port->dev, - "remove: sas_addr(0x%016llx), phy(%d)\n", + pr_info("%s %s: remove: sas_addr(0x%016llx), phy(%d)\n", + ioc->name, __func__, (unsigned long long) leapioraid_port->remote_identify.sas_address, leapioraid_phy->phy_id); @@ -869,8 +869,8 @@ leapioraid_transport_port_remove(struct LEAPIORAID_ADAPTER *ioc, ioc->name, __func__, (unsigned long long)sas_address); #else if ((ioc->logging_level & LEAPIORAID_DEBUG_TRANSPORT)) - dev_info(&leapioraid_port->rphy->dev, - "remove: sas_addr(0x%016llx)\n", + pr_info("%s %s: remove: sas_addr(0x%016llx)\n", + ioc->name, __func__, (unsigned long long)sas_address); if (!ioc->remove_host) sas_rphy_delete(leapioraid_port->rphy); -- 2.25.1
2 1
0 0
[openeuler:OLK-6.6 2411/2411] drivers/crypto/ccp/hygon/psp-dev.c:25:10: warning: no previous prototype for 'atomic64_exchange'
by kernel test robot 29 Jun '25

29 Jun '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: c02455c4cce8052f74fc11c09e9073c01c7f33a4 commit: fe08767e3a083e73a72f08432bc6fbd864fa7179 [2411/2411] drivers/crypto/ccp: concurrent psp access support between user and kernel space config: x86_64-buildonly-randconfig-2001-20250626 (https://download.01.org/0day-ci/archive/20250629/202506291256.D2SqWOXZ-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/20250629/202506291256.D2SqWOXZ-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/202506291256.D2SqWOXZ-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/crypto/ccp/hygon/psp-dev.c:25:10: warning: no previous prototype for 'atomic64_exchange' [-Wmissing-prototypes] 25 | uint64_t atomic64_exchange(uint64_t *dst, uint64_t val) | ^~~~~~~~~~~~~~~~~ >> drivers/crypto/ccp/hygon/psp-dev.c:30:5: warning: no previous prototype for 'psp_mutex_init' [-Wmissing-prototypes] 30 | int psp_mutex_init(struct psp_mutex *mutex) | ^~~~~~~~~~~~~~ drivers/crypto/ccp/hygon/psp-dev.c:38:5: warning: no previous prototype for 'psp_mutex_trylock' [-Wmissing-prototypes] 38 | int psp_mutex_trylock(struct psp_mutex *mutex) | ^~~~~~~~~~~~~~~~~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for ACPI_HOTPLUG_IGNORE_OSC Depends on [n]: ACPI [=y] && ACPI_HOTPLUG_CPU [=n] Selected by [y]: - X86 [=y] && ACPI [=y] && HOTPLUG_CPU [=y] vim +/atomic64_exchange +25 drivers/crypto/ccp/hygon/psp-dev.c 24 > 25 uint64_t atomic64_exchange(uint64_t *dst, uint64_t val) 26 { 27 return xchg(dst, val); 28 } 29 > 30 int psp_mutex_init(struct psp_mutex *mutex) 31 { 32 if (!mutex) 33 return -1; 34 mutex->locked = 0; 35 return 0; 36 } 37 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • ...
  • 1908
  • Older →

HyperKitty Powered by HyperKitty