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 -----
  • November
  • October
  • September
  • August
  • 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

  • 37 participants
  • 21129 discussions
[openeuler:openEuler-1.0-LTS 1930/1930] drivers/video/fbdev/core/sysfillrect.c:291:51: sparse: sparse: cast removes address space '<asn:2>' of expression
by kernel test robot 05 Nov '25

05 Nov '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: ef0390f1259df6b9ca86aa41a598fd07c29ba602 commit: 7389066b79d5dc829e15de2509e43a66bf24e296 [1930/1930] fbdev: Fix out-of-bounds issue in sys_fillrect() config: arm64-randconfig-r134-20251105 (https://download.01.org/0day-ci/archive/20251105/202511051110.kqecU8nf-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251105/202511051110.kqecU8nf-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/202511051110.kqecU8nf-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/video/fbdev/core/sysfillrect.c:291:51: sparse: sparse: cast removes address space '<asn:2>' of expression drivers/video/fbdev/core/sysfillrect.c:329:32: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long word @@ got restricted __le64 [usertype] @@ drivers/video/fbdev/core/sysfillrect.c:329:32: sparse: expected unsigned long word drivers/video/fbdev/core/sysfillrect.c:329:32: sparse: got restricted __le64 [usertype] drivers/video/fbdev/core/sysfillrect.c:329:32: sparse: sparse: cast to restricted __le64 vim +291 drivers/video/fbdev/core/sysfillrect.c 242 243 void sys_fillrect(struct fb_info *p, const struct fb_fillrect *rect) 244 { 245 unsigned long pat, pat2, fg; 246 unsigned long width = rect->width, height = rect->height; 247 int bits = BITS_PER_LONG, bytes = bits >> 3; 248 u32 bpp = p->var.bits_per_pixel; 249 unsigned long *dst; 250 int dst_idx, left; 251 long dst_offset; 252 253 if (p->state != FBINFO_STATE_RUNNING) 254 return; 255 256 if (p->fix.visual == FB_VISUAL_TRUECOLOR || 257 p->fix.visual == FB_VISUAL_DIRECTCOLOR ) 258 fg = ((u32 *) (p->pseudo_palette))[rect->color]; 259 else 260 fg = rect->color; 261 262 pat = pixel_to_pat( bpp, fg); 263 264 dst = (unsigned long *)((unsigned long)p->screen_base & ~(bytes-1)); 265 dst_idx = ((unsigned long)p->screen_base & (bytes - 1))*8; 266 dst_idx += rect->dy*p->fix.line_length*8+rect->dx*bpp; 267 /* FIXME For now we support 1-32 bpp only */ 268 left = bits % bpp; 269 if (p->fbops->fb_sync) 270 p->fbops->fb_sync(p); 271 if (!left) { 272 void (*fill_op32)(struct fb_info *p, unsigned long *dst, 273 int dst_idx, unsigned long pat, unsigned n, 274 int bits) = NULL; 275 276 switch (rect->rop) { 277 case ROP_XOR: 278 fill_op32 = bitfill_aligned_rev; 279 break; 280 case ROP_COPY: 281 fill_op32 = bitfill_aligned; 282 break; 283 default: 284 printk( KERN_ERR "cfb_fillrect(): unknown rop, " 285 "defaulting to ROP_COPY\n"); 286 fill_op32 = bitfill_aligned; 287 break; 288 } 289 while (height--) { 290 dst += dst_idx >> (ffs(bits) - 1); > 291 dst_offset = (long)dst - (long)p->screen_base; 292 if (dst_offset < 0 || dst_offset >= p->fix.smem_len) { 293 pr_err("dst offset out of bound: dst_offset(%ld)", dst_offset); 294 return; 295 } 296 dst_idx &= (bits - 1); 297 fill_op32(p, dst, dst_idx, pat, width*bpp, bits); 298 dst_idx += p->fix.line_length*8; 299 } 300 } else { 301 int right, r; 302 void (*fill_op)(struct fb_info *p, unsigned long *dst, 303 int dst_idx, unsigned long pat, int left, 304 int right, unsigned n, int bits) = NULL; 305 #ifdef __LITTLE_ENDIAN 306 right = left; 307 left = bpp - right; 308 #else 309 right = bpp - left; 310 #endif 311 switch (rect->rop) { 312 case ROP_XOR: 313 fill_op = bitfill_unaligned_rev; 314 break; 315 case ROP_COPY: 316 fill_op = bitfill_unaligned; 317 break; 318 default: 319 printk(KERN_ERR "sys_fillrect(): unknown rop, " 320 "defaulting to ROP_COPY\n"); 321 fill_op = bitfill_unaligned; 322 break; 323 } 324 while (height--) { 325 dst += dst_idx / bits; 326 dst_idx &= (bits - 1); 327 r = dst_idx % bpp; 328 /* rotate pattern to the correct start position */ 329 pat2 = le_long_to_cpu(rolx(cpu_to_le_long(pat), r, bpp)); 330 fill_op(p, dst, dst_idx, pat2, left, right, 331 width*bpp, bits); 332 dst_idx += p->fix.line_length*8; 333 } 334 } 335 } 336 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3099/3099] mm/shmem.o: warning: objtool: .init.text: unexpected end of section
by kernel test robot 05 Nov '25

05 Nov '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: f1418110051edb8e47923b009bbd051f7c06ad1a commit: 8be4868c4f23d36ca7409bcd5492fb554933bb64 [3099/3099] mm: shmem: override mTHP shmem default with a kernel parameter config: loongarch-randconfig-002-20251104 (https://download.01.org/0day-ci/archive/20251105/202511051154.EI2nBnB9-lkp@…) compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project d2625a438020ad35330cda29c3def102c1687b1b) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251105/202511051154.EI2nBnB9-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/202511051154.EI2nBnB9-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from mm/shmem.c:28: In file included from include/linux/ramfs.h:5: In file included from include/linux/fs_parser.h:11: In file included from include/linux/fs_context.h:14: In file included from include/linux/security.h:33: In file included from include/linux/mm.h:2253: include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ mm/shmem.c:1654:24: warning: default initialization of an object of type 'struct vm_area_struct' with const member leaves the object uninitialized [-Wdefault-const-init-field-unsafe] 1654 | struct vm_area_struct pvma; | ^ include/linux/mm_types.h:629:20: note: member 'vm_flags' declared 'const' here 629 | const vm_flags_t vm_flags; | ^ mm/shmem.c:1802:24: warning: default initialization of an object of type 'struct vm_area_struct' with const member leaves the object uninitialized [-Wdefault-const-init-field-unsafe] 1802 | struct vm_area_struct pvma; | ^ include/linux/mm_types.h:629:20: note: member 'vm_flags' declared 'const' here 629 | const vm_flags_t vm_flags; | ^ 3 warnings generated. mm/shmem.o: warning: objtool: shmem_enabled_store() falls through to next function thpsize_shmem_enabled_show() >> mm/shmem.o: warning: objtool: .init.text: unexpected end of section -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH openEuler-1.0-LTS] net: usbnet: Fix WARNING in usbnet_start_xmit/usb_submit_urb
by Fanhua Li 05 Nov '25

05 Nov '25
From: Alan Stern <stern(a)rowland.harvard.edu> stable inclusion from stable-v4.19.291 commit 53c250ea57cf03af41339234b9855ae284f9db91 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/ID0UAL CVE: CVE-2023-53548 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- commit 5e1627cb43ddf1b24b92eb26f8d958a3f5676ccb upstream. The syzbot fuzzer identified a problem in the usbnet driver: usb 1-1: BOGUS urb xfer, pipe 3 != type 1 WARNING: CPU: 0 PID: 754 at drivers/usb/core/urb.c:504 usb_submit_urb+0xed6/0x1880 drivers/usb/core/urb.c:504 Modules linked in: CPU: 0 PID: 754 Comm: kworker/0:2 Not tainted 6.4.0-rc7-syzkaller-00014-g692b7dc87ca6 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 Workqueue: mld mld_ifc_work RIP: 0010:usb_submit_urb+0xed6/0x1880 drivers/usb/core/urb.c:504 Code: 7c 24 18 e8 2c b4 5b fb 48 8b 7c 24 18 e8 42 07 f0 fe 41 89 d8 44 89 e1 4c 89 ea 48 89 c6 48 c7 c7 a0 c9 fc 8a e8 5a 6f 23 fb <0f> 0b e9 58 f8 ff ff e8 fe b3 5b fb 48 81 c5 c0 05 00 00 e9 84 f7 RSP: 0018:ffffc9000463f568 EFLAGS: 00010086 RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000 RDX: ffff88801eb28000 RSI: ffffffff814c03b7 RDI: 0000000000000001 RBP: ffff8881443b7190 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000003 R13: ffff88802a77cb18 R14: 0000000000000003 R15: ffff888018262500 FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000556a99c15a18 CR3: 0000000028c71000 CR4: 0000000000350ef0 Call Trace: <TASK> usbnet_start_xmit+0xfe5/0x2190 drivers/net/usb/usbnet.c:1453 __netdev_start_xmit include/linux/netdevice.h:4918 [inline] netdev_start_xmit include/linux/netdevice.h:4932 [inline] xmit_one net/core/dev.c:3578 [inline] dev_hard_start_xmit+0x187/0x700 net/core/dev.c:3594 ... This bug is caused by the fact that usbnet trusts the bulk endpoint addresses its probe routine receives in the driver_info structure, and it does not check to see that these endpoints actually exist and have the expected type and directions. The fix is simply to add such a check. Reported-and-tested-by: syzbot+63ee658b9a100ffadbe2(a)syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-usb/000000000000a56e9105d0cec021@google.com/ Signed-off-by: Alan Stern <stern(a)rowland.harvard.edu> CC: Oliver Neukum <oneukum(a)suse.com> Link: https://lore.kernel.org/r/ea152b6d-44df-4f8a-95c6-4db51143dcc1@rowland.harv… Signed-off-by: Jakub Kicinski <kuba(a)kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: Fanhua Li <lifanhua5(a)huawei.com> --- drivers/net/usb/usbnet.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 1316f5b0c0d7e..cb27b076e4710 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1762,6 +1762,10 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) } else if (!info->in || !info->out) status = usbnet_get_endpoints (dev, udev); else { + u8 ep_addrs[3] = { + info->in + USB_DIR_IN, info->out + USB_DIR_OUT, 0 + }; + dev->in = usb_rcvbulkpipe (xdev, info->in); dev->out = usb_sndbulkpipe (xdev, info->out); if (!(info->flags & FLAG_NO_SETINT)) @@ -1771,6 +1775,8 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) else status = 0; + if (status == 0 && !usb_check_bulk_endpoints(udev, ep_addrs)) + status = -EINVAL; } if (status >= 0 && dev->status) status = init_status (dev, udev); -- 2.43.0
2 1
0 0
[openeuler:OLK-6.6 3098/3098] kernel/bpf-rvi/common_kfuncs.c:143:26: warning: no previous prototype for 'bpf_kstat_softirqs_cpu'
by kernel test robot 05 Nov '25

05 Nov '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: faa195bad3afed3c326917fb4cd36e0bd311220c commit: e553ff4b5e1eed196ab68b4efd4a189c45396667 [3098/3098] bpf-rvi: Add kstat_ & kcpustat_ kfuncs config: x86_64-randconfig-001-20251104 (https://download.01.org/0day-ci/archive/20251105/202511050941.wo8YZedF-lkp@…) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251105/202511050941.wo8YZedF-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/202511050941.wo8YZedF-lkp@intel.com/ All warnings (new ones prefixed by >>): kernel/bpf-rvi/common_kfuncs.c:25:32: warning: no previous prototype for 'bpf_mem_cgroup_from_task' [-Wmissing-prototypes] 25 | __bpf_kfunc struct mem_cgroup *bpf_mem_cgroup_from_task(struct task_struct *p) | ^~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:34:35: warning: no previous prototype for 'bpf_task_active_pid_ns' [-Wmissing-prototypes] 34 | __bpf_kfunc struct pid_namespace *bpf_task_active_pid_ns(struct task_struct *task) | ^~~~~~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:39:17: warning: no previous prototype for 'bpf_pidns_nr_tasks' [-Wmissing-prototypes] 39 | __bpf_kfunc u64 bpf_pidns_nr_tasks(struct pid_namespace *ns) | ^~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:53:17: warning: no previous prototype for 'bpf_pidns_last_pid' [-Wmissing-prototypes] 53 | __bpf_kfunc u32 bpf_pidns_last_pid(struct pid_namespace *ns) | ^~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:82:18: warning: no previous prototype for 'bpf_si_memswinfo' [-Wmissing-prototypes] 82 | __bpf_kfunc void bpf_si_memswinfo(struct bpf_sysinfo *bsi) | ^~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:92:27: warning: no previous prototype for 'bpf_page_counter_read' [-Wmissing-prototypes] 92 | __bpf_kfunc unsigned long bpf_page_counter_read(struct page_counter *counter) | ^~~~~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:102:18: warning: no previous prototype for 'bpf_seq_file_append' [-Wmissing-prototypes] 102 | __bpf_kfunc void bpf_seq_file_append(struct seq_file *dst, struct seq_file *src) | ^~~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:116:18: warning: no previous prototype for 'bpf_get_boottime_timens' [-Wmissing-prototypes] 116 | __bpf_kfunc void bpf_get_boottime_timens(struct task_struct *tsk, struct timespec64 *boottime) | ^~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:122:27: warning: no previous prototype for 'bpf_get_total_forks' [-Wmissing-prototypes] 122 | __bpf_kfunc unsigned long bpf_get_total_forks(void) | ^~~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:127:26: warning: no previous prototype for 'bpf_nr_running' [-Wmissing-prototypes] 127 | __bpf_kfunc unsigned int bpf_nr_running(void) | ^~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:132:32: warning: no previous prototype for 'bpf_nr_context_switches' [-Wmissing-prototypes] 132 | __bpf_kfunc unsigned long long bpf_nr_context_switches(void) | ^~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:137:26: warning: no previous prototype for 'bpf_nr_iowait' [-Wmissing-prototypes] 137 | __bpf_kfunc unsigned int bpf_nr_iowait(void) | ^~~~~~~~~~~~~ >> kernel/bpf-rvi/common_kfuncs.c:143:26: warning: no previous prototype for 'bpf_kstat_softirqs_cpu' [-Wmissing-prototypes] 143 | __bpf_kfunc unsigned int bpf_kstat_softirqs_cpu(unsigned int irq, int cpu) | ^~~~~~~~~~~~~~~~~~~~~~ >> kernel/bpf-rvi/common_kfuncs.c:148:27: warning: no previous prototype for 'bpf_kstat_cpu_irqs_sum' [-Wmissing-prototypes] 148 | __bpf_kfunc unsigned long bpf_kstat_cpu_irqs_sum(unsigned int cpu) | ^~~~~~~~~~~~~~~~~~~~~~ >> kernel/bpf-rvi/common_kfuncs.c:153:18: warning: no previous prototype for 'bpf_kcpustat_cpu_fetch' [-Wmissing-prototypes] 153 | __bpf_kfunc void bpf_kcpustat_cpu_fetch(struct kernel_cpustat *dst, int cpu) | ^~~~~~~~~~~~~~~~~~~~~~ vim +/bpf_kstat_softirqs_cpu +143 kernel/bpf-rvi/common_kfuncs.c 126 > 127 __bpf_kfunc unsigned int bpf_nr_running(void) 128 { 129 return nr_running(); 130 } 131 > 132 __bpf_kfunc unsigned long long bpf_nr_context_switches(void) 133 { 134 return nr_context_switches(); 135 } 136 > 137 __bpf_kfunc unsigned int bpf_nr_iowait(void) 138 { 139 return nr_iowait(); 140 } 141 142 /* Kernel statistics for CPU accounting */ > 143 __bpf_kfunc unsigned int bpf_kstat_softirqs_cpu(unsigned int irq, int cpu) 144 { 145 return kstat_softirqs_cpu(irq, cpu); 146 } 147 > 148 __bpf_kfunc unsigned long bpf_kstat_cpu_irqs_sum(unsigned int cpu) 149 { 150 return kstat_cpu_irqs_sum(cpu); 151 } 152 > 153 __bpf_kfunc void bpf_kcpustat_cpu_fetch(struct kernel_cpustat *dst, int cpu) 154 { 155 kcpustat_cpu_fetch(dst, cpu); 156 } 157 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH OLK-5.10] net/oenetcls: Add mode 2 for rps numa affinity
by Yue Haibing 05 Nov '25

05 Nov '25
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/ICBFCS -------------------------------- Add numa affinity RPS to balance softirq for vm. Signed-off-by: Yue Haibing <yuehaibing(a)huawei.com> --- net/oenetcls/oenetcls.h | 2 ++ net/oenetcls/oenetcls_flow.c | 30 +++++++++++++++++++ net/oenetcls/oenetcls_main.c | 56 +++++++++++++++++++++++++++++++----- 3 files changed, 81 insertions(+), 7 deletions(-) diff --git a/net/oenetcls/oenetcls.h b/net/oenetcls/oenetcls.h index f2726582db91..81f752590f9f 100644 --- a/net/oenetcls/oenetcls.h +++ b/net/oenetcls/oenetcls.h @@ -131,6 +131,8 @@ struct cfg_param { extern int match_ip_flag; extern int debug; +extern int mode; +extern int rcpu_probability; extern int oecls_netdev_num; extern int oecls_numa_num; diff --git a/net/oenetcls/oenetcls_flow.c b/net/oenetcls/oenetcls_flow.c index 62bad2408966..9b2d08d99418 100644 --- a/net/oenetcls/oenetcls_flow.c +++ b/net/oenetcls/oenetcls_flow.c @@ -171,6 +171,17 @@ static void set_oecls_cpu(struct net_device *dev, struct sk_buff *skb, rflow->cpu = next_cpu; } +static bool oecls_do_hash(void) +{ + if (rcpu_probability <= 0) + return false; + + if (rcpu_probability >= 100) + return true; + + return prandom_u32() % 100 < rcpu_probability; +} + static int get_cpu_in_mask(int tcpu, u32 hash) { const struct cpumask *mask; @@ -219,6 +230,25 @@ static void __oecls_set_cpu(struct sk_buff *skb, struct net_device *ndev, if ((val ^ hash) & ~oecls_cpu_mask) return; + if (mode == 2) { + if (!oecls_do_hash()) { + *rcpu = last_recv_cpu; + return; + } + if (last_recv_cpu != cpu) + return; + newcpu = get_cpu_in_mask(last_recv_cpu, hash); + if (newcpu < 0) + newcpu = cpu; + if (newcpu == cpu) { + newcpu = cpumask_first(cpumask_of_node(cpu_to_node(cpu))); + newcpu = newcpu + (cpu + 1) % (nr_cpu_ids / oecls_numa_num); + } + oecls_debug("last_recv_cpu:%d irq_cpu:%d newcpu:%d\n", last_recv_cpu, cpu, newcpu); + *rcpu = newcpu; + return; + } + newcpu = get_cpu_in_mask(last_recv_cpu, hash); if (newcpu >= 0) *rcpu = newcpu; diff --git a/net/oenetcls/oenetcls_main.c b/net/oenetcls/oenetcls_main.c index ec37e38d7f48..04922368bb73 100644 --- a/net/oenetcls/oenetcls_main.c +++ b/net/oenetcls/oenetcls_main.c @@ -19,7 +19,7 @@ int debug; module_param(debug, int, 0644); MODULE_PARM_DESC(debug, "debug switch"); -static int mode; +int mode; module_param(mode, int, 0444); MODULE_PARM_DESC(mode, "mode, default 0"); @@ -43,13 +43,17 @@ static int check_cap = 1; module_param(check_cap, int, 0444); MODULE_PARM_DESC(check_cap, "check_cap, default 1"); +int rcpu_probability = -1; +module_param(rcpu_probability, int, 0444); +MODULE_PARM_DESC(rcpu_probability, "rcpu select policy probability, default -1"); + static char irqname[64] = "comp"; module_param_string(irqname, irqname, sizeof(irqname), 0644); MODULE_PARM_DESC(irqname, "nic irq name string, default comp"); static bool check_params(void) { - if (mode != 0 && mode != 1) + if (mode != 0 && mode != 1 && mode != 2) return false; if (strlen(ifname) == 0) @@ -376,7 +380,7 @@ static struct oecls_netdev_info *alloc_oecls_netdev_info(void) static bool check_irq_name(const char *irq_name, struct oecls_netdev_info *oecls_dev) { if (!strstr(irq_name, "TxRx") && !strstr(irq_name, "comp") && !strstr(irq_name, "rx") && - strlen(irqname) > 0 && !strstr(irq_name, irqname)) + !strstr(irq_name, "virtio0-input") && strlen(irqname) > 0 && !strstr(irq_name, irqname)) return false; if (strstr(irq_name, oecls_dev->dev_name)) @@ -519,10 +523,12 @@ static int init_single_oecls_dev(char *if_name, unsigned int length) goto out; } - ret = oecls_filter_enable(dev_name, &old_state); - if (ret) { - oecls_error("dev [%s] not support ntuple! ret=%d\n", dev_name, ret); - goto out; + if (mode != 2) { + ret = oecls_filter_enable(dev_name, &old_state); + if (ret) { + oecls_error("dev [%s] not support ntuple! ret=%d\n", dev_name, ret); + goto out; + } } oecls_dev = alloc_oecls_netdev_info(); @@ -1017,6 +1023,39 @@ static void set_netdev_xps_queue(bool enable) } } +static void fixup_rcpu_load(void) +{ + char *start = appname, *end; + char *task_name = "redis-proxy"; + + if (!strlen(appname)) + return; + + // support appname: app1#app2#appN + while (*start != '\0') { + end = strchr(start, '#'); + if (end == start) { + start++; + continue; + } + + if (!end) { + if (!strncmp(task_name, start, strlen(start))) { + rcpu_probability = 100; + return; + } + break; + } + + if (!strncmp(task_name, start, end - start)) { + rcpu_probability = 100; + return; + } + start = end + 1; + } + rcpu_probability = 65; +} + static __init int oecls_init(void) { struct oecls_numa_info *numa_info; @@ -1048,6 +1087,9 @@ static __init int oecls_init(void) set_netdev_xps_queue(true); #endif + if (mode == 2 && rcpu_probability < 0) + fixup_rcpu_load(); + if (mode == 0) err = oecls_ntuple_res_init(); else -- 2.34.1
2 1
0 0
[PATCH OLK-6.6] smb: client: fix wrong index reference in smb2_compound_op()
by Yifan Qiao 05 Nov '25

05 Nov '25
From: Sang-Heon Jeon <ekffu200098(a)gmail.com> stable inclusion from stable-v6.6.109 commit ba7bcfd52c66dd1c2dfa5142aca7e4a70b62dfa5 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/ID228Z CVE: CVE-2025-39975 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit fbe2dc6a9c7318f7263f5e4d50f6272b931c5756 ] In smb2_compound_op(), the loop that processes each command's response uses wrong indices when accessing response bufferes. This incorrect indexing leads to improper handling of command results. Also, if incorrectly computed index is greather than or equal to MAX_COMPOUND, it can cause out-of-bounds accesses. Fixes: 3681c74d342d ("smb: client: handle lack of EA support in smb2_query_path_info()") # 6.14 Reviewed-by: Paulo Alcantara (Red Hat) <pc(a)manguebit.org> Signed-off-by: Sang-Heon Jeon <ekffu200098(a)gmail.com> Signed-off-by: Steve French <stfrench(a)microsoft.com> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Yifan Qiao <qiaoyifan4(a)huawei.com> --- fs/smb/client/smb2inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/smb/client/smb2inode.c b/fs/smb/client/smb2inode.c index 0cc80f472432..79641d1ee867 100644 --- a/fs/smb/client/smb2inode.c +++ b/fs/smb/client/smb2inode.c @@ -641,7 +641,7 @@ static int smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon, tmp_rc = rc; for (i = 0; i < num_cmds; i++) { - char *buf = rsp_iov[i + i].iov_base; + char *buf = rsp_iov[i + 1].iov_base; if (buf && resp_buftype[i + 1] != CIFS_NO_BUFFER) rc = server->ops->map_error(buf, false); -- 2.39.2
2 1
0 0
[openeuler:OLK-6.6 3098/3098] kernel/bpf-rvi/common_kfuncs.c:127:26: warning: no previous prototype for 'bpf_nr_running'
by kernel test robot 05 Nov '25

05 Nov '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: faa195bad3afed3c326917fb4cd36e0bd311220c commit: 34f90dce941b028e02a0336711907b220e3c5765 [3098/3098] bpf-rvi: Add cpu runqueue related kfuncs config: x86_64-randconfig-001-20251104 (https://download.01.org/0day-ci/archive/20251105/202511050754.SzG0bccj-lkp@…) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251105/202511050754.SzG0bccj-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/202511050754.SzG0bccj-lkp@intel.com/ All warnings (new ones prefixed by >>): kernel/bpf-rvi/common_kfuncs.c:25:32: warning: no previous prototype for 'bpf_mem_cgroup_from_task' [-Wmissing-prototypes] 25 | __bpf_kfunc struct mem_cgroup *bpf_mem_cgroup_from_task(struct task_struct *p) | ^~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:34:35: warning: no previous prototype for 'bpf_task_active_pid_ns' [-Wmissing-prototypes] 34 | __bpf_kfunc struct pid_namespace *bpf_task_active_pid_ns(struct task_struct *task) | ^~~~~~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:39:17: warning: no previous prototype for 'bpf_pidns_nr_tasks' [-Wmissing-prototypes] 39 | __bpf_kfunc u64 bpf_pidns_nr_tasks(struct pid_namespace *ns) | ^~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:53:17: warning: no previous prototype for 'bpf_pidns_last_pid' [-Wmissing-prototypes] 53 | __bpf_kfunc u32 bpf_pidns_last_pid(struct pid_namespace *ns) | ^~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:82:18: warning: no previous prototype for 'bpf_si_memswinfo' [-Wmissing-prototypes] 82 | __bpf_kfunc void bpf_si_memswinfo(struct bpf_sysinfo *bsi) | ^~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:92:27: warning: no previous prototype for 'bpf_page_counter_read' [-Wmissing-prototypes] 92 | __bpf_kfunc unsigned long bpf_page_counter_read(struct page_counter *counter) | ^~~~~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:102:18: warning: no previous prototype for 'bpf_seq_file_append' [-Wmissing-prototypes] 102 | __bpf_kfunc void bpf_seq_file_append(struct seq_file *dst, struct seq_file *src) | ^~~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:116:18: warning: no previous prototype for 'bpf_get_boottime_timens' [-Wmissing-prototypes] 116 | __bpf_kfunc void bpf_get_boottime_timens(struct task_struct *tsk, struct timespec64 *boottime) | ^~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:122:27: warning: no previous prototype for 'bpf_get_total_forks' [-Wmissing-prototypes] 122 | __bpf_kfunc unsigned long bpf_get_total_forks(void) | ^~~~~~~~~~~~~~~~~~~ >> kernel/bpf-rvi/common_kfuncs.c:127:26: warning: no previous prototype for 'bpf_nr_running' [-Wmissing-prototypes] 127 | __bpf_kfunc unsigned int bpf_nr_running(void) | ^~~~~~~~~~~~~~ >> kernel/bpf-rvi/common_kfuncs.c:132:32: warning: no previous prototype for 'bpf_nr_context_switches' [-Wmissing-prototypes] 132 | __bpf_kfunc unsigned long long bpf_nr_context_switches(void) | ^~~~~~~~~~~~~~~~~~~~~~~ >> kernel/bpf-rvi/common_kfuncs.c:137:26: warning: no previous prototype for 'bpf_nr_iowait' [-Wmissing-prototypes] 137 | __bpf_kfunc unsigned int bpf_nr_iowait(void) | ^~~~~~~~~~~~~ vim +/bpf_nr_running +127 kernel/bpf-rvi/common_kfuncs.c 96 97 /* 98 * Stat related kfuncs 99 */ 100 101 /* Moving src's content to the end of dst. Reference: seq_vprintf. */ > 102 __bpf_kfunc void bpf_seq_file_append(struct seq_file *dst, struct seq_file *src) 103 { 104 /* 105 * ->count: length of content 106 * ->size: available buffer space 107 * i.e. seq_printf(dst, "%s", src->buf) 108 */ 109 if (dst->count < dst->size) 110 if (src->count < dst->size - dst->count) { 111 memmove(dst->buf + dst->count, src->buf, src->count); 112 dst->count += src->count; 113 } 114 } 115 > 116 __bpf_kfunc void bpf_get_boottime_timens(struct task_struct *tsk, struct timespec64 *boottime) 117 { 118 getboottime64(boottime); 119 *boottime = timespec64_sub(*boottime, tsk->nsproxy->time_ns->offsets.boottime); 120 } 121 > 122 __bpf_kfunc unsigned long bpf_get_total_forks(void) 123 { 124 return total_forks; 125 } 126 > 127 __bpf_kfunc unsigned int bpf_nr_running(void) 128 { 129 return nr_running(); 130 } 131 > 132 __bpf_kfunc unsigned long long bpf_nr_context_switches(void) 133 { 134 return nr_context_switches(); 135 } 136 > 137 __bpf_kfunc unsigned int bpf_nr_iowait(void) 138 { 139 return nr_iowait(); 140 } 141 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3098/3098] fs/proc/stat.c:234:18: warning: no previous prototype for 'bpf_show_all_irqs'
by kernel test robot 05 Nov '25

05 Nov '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: faa195bad3afed3c326917fb4cd36e0bd311220c commit: 19895b9974c36318281e4e18131a2cfb43543ffd [3098/3098] bpf-rvi: Add stat-related misc kfuncs config: x86_64-randconfig-001-20251104 (https://download.01.org/0day-ci/archive/20251105/202511050607.O3tCEeVJ-lkp@…) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251105/202511050607.O3tCEeVJ-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/202511050607.O3tCEeVJ-lkp@intel.com/ All warnings (new ones prefixed by >>): fs/proc/stat.c:224:17: warning: no previous prototype for 'bpf_get_idle_time' [-Wmissing-prototypes] 224 | __bpf_kfunc u64 bpf_get_idle_time(struct kernel_cpustat *kcs, int cpu) | ^~~~~~~~~~~~~~~~~ fs/proc/stat.c:229:17: warning: no previous prototype for 'bpf_get_iowait_time' [-Wmissing-prototypes] 229 | __bpf_kfunc u64 bpf_get_iowait_time(struct kernel_cpustat *kcs, int cpu) | ^~~~~~~~~~~~~~~~~~~ >> fs/proc/stat.c:234:18: warning: no previous prototype for 'bpf_show_all_irqs' [-Wmissing-prototypes] 234 | __bpf_kfunc void bpf_show_all_irqs(struct seq_file *p) | ^~~~~~~~~~~~~~~~~ -- kernel/bpf-rvi/common_kfuncs.c:24:32: warning: no previous prototype for 'bpf_mem_cgroup_from_task' [-Wmissing-prototypes] 24 | __bpf_kfunc struct mem_cgroup *bpf_mem_cgroup_from_task(struct task_struct *p) | ^~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:33:35: warning: no previous prototype for 'bpf_task_active_pid_ns' [-Wmissing-prototypes] 33 | __bpf_kfunc struct pid_namespace *bpf_task_active_pid_ns(struct task_struct *task) | ^~~~~~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:38:17: warning: no previous prototype for 'bpf_pidns_nr_tasks' [-Wmissing-prototypes] 38 | __bpf_kfunc u64 bpf_pidns_nr_tasks(struct pid_namespace *ns) | ^~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:52:17: warning: no previous prototype for 'bpf_pidns_last_pid' [-Wmissing-prototypes] 52 | __bpf_kfunc u32 bpf_pidns_last_pid(struct pid_namespace *ns) | ^~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:81:18: warning: no previous prototype for 'bpf_si_memswinfo' [-Wmissing-prototypes] 81 | __bpf_kfunc void bpf_si_memswinfo(struct bpf_sysinfo *bsi) | ^~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:91:27: warning: no previous prototype for 'bpf_page_counter_read' [-Wmissing-prototypes] 91 | __bpf_kfunc unsigned long bpf_page_counter_read(struct page_counter *counter) | ^~~~~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:101:18: warning: no previous prototype for 'bpf_seq_file_append' [-Wmissing-prototypes] 101 | __bpf_kfunc void bpf_seq_file_append(struct seq_file *dst, struct seq_file *src) | ^~~~~~~~~~~~~~~~~~~ >> kernel/bpf-rvi/common_kfuncs.c:115:18: warning: no previous prototype for 'bpf_get_boottime_timens' [-Wmissing-prototypes] 115 | __bpf_kfunc void bpf_get_boottime_timens(struct task_struct *tsk, struct timespec64 *boottime) | ^~~~~~~~~~~~~~~~~~~~~~~ >> kernel/bpf-rvi/common_kfuncs.c:121:27: warning: no previous prototype for 'bpf_get_total_forks' [-Wmissing-prototypes] 121 | __bpf_kfunc unsigned long bpf_get_total_forks(void) | ^~~~~~~~~~~~~~~~~~~ vim +/bpf_show_all_irqs +234 fs/proc/stat.c 222 223 #ifdef CONFIG_BPF_RVI > 224 __bpf_kfunc u64 bpf_get_idle_time(struct kernel_cpustat *kcs, int cpu) 225 { 226 return get_idle_time(kcs, cpu); 227 } 228 229 __bpf_kfunc u64 bpf_get_iowait_time(struct kernel_cpustat *kcs, int cpu) 230 { 231 return get_iowait_time(kcs, cpu); 232 } 233 > 234 __bpf_kfunc void bpf_show_all_irqs(struct seq_file *p) 235 { 236 show_all_irqs(p); 237 } 238 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3098/3098] kernel/bpf-rvi/common_kfuncs.c:97:18: warning: no previous prototype for 'bpf_seq_file_append'
by kernel test robot 05 Nov '25

05 Nov '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: faa195bad3afed3c326917fb4cd36e0bd311220c commit: 1afa15e45da121993a15941b08fef5e3d58f40e5 [3098/3098] bpf-rvi: Add bpf_seq_file_append() kfunc config: x86_64-randconfig-001-20251104 (https://download.01.org/0day-ci/archive/20251105/202511050410.2c1BvP2L-lkp@…) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251105/202511050410.2c1BvP2L-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/202511050410.2c1BvP2L-lkp@intel.com/ All warnings (new ones prefixed by >>): kernel/bpf-rvi/common_kfuncs.c:20:32: warning: no previous prototype for 'bpf_mem_cgroup_from_task' [-Wmissing-prototypes] 20 | __bpf_kfunc struct mem_cgroup *bpf_mem_cgroup_from_task(struct task_struct *p) | ^~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:29:35: warning: no previous prototype for 'bpf_task_active_pid_ns' [-Wmissing-prototypes] 29 | __bpf_kfunc struct pid_namespace *bpf_task_active_pid_ns(struct task_struct *task) | ^~~~~~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:34:17: warning: no previous prototype for 'bpf_pidns_nr_tasks' [-Wmissing-prototypes] 34 | __bpf_kfunc u64 bpf_pidns_nr_tasks(struct pid_namespace *ns) | ^~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:48:17: warning: no previous prototype for 'bpf_pidns_last_pid' [-Wmissing-prototypes] 48 | __bpf_kfunc u32 bpf_pidns_last_pid(struct pid_namespace *ns) | ^~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:77:18: warning: no previous prototype for 'bpf_si_memswinfo' [-Wmissing-prototypes] 77 | __bpf_kfunc void bpf_si_memswinfo(struct bpf_sysinfo *bsi) | ^~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:87:27: warning: no previous prototype for 'bpf_page_counter_read' [-Wmissing-prototypes] 87 | __bpf_kfunc unsigned long bpf_page_counter_read(struct page_counter *counter) | ^~~~~~~~~~~~~~~~~~~~~ >> kernel/bpf-rvi/common_kfuncs.c:97:18: warning: no previous prototype for 'bpf_seq_file_append' [-Wmissing-prototypes] 97 | __bpf_kfunc void bpf_seq_file_append(struct seq_file *dst, struct seq_file *src) | ^~~~~~~~~~~~~~~~~~~ vim +/bpf_seq_file_append +97 kernel/bpf-rvi/common_kfuncs.c 91 92 /* 93 * Stat related kfuncs 94 */ 95 96 /* Moving src's content to the end of dst. Reference: seq_vprintf. */ > 97 __bpf_kfunc void bpf_seq_file_append(struct seq_file *dst, struct seq_file *src) 98 { 99 /* 100 * ->count: length of content 101 * ->size: available buffer space 102 * i.e. seq_printf(dst, "%s", src->buf) 103 */ 104 if (dst->count < dst->size) 105 if (src->count < dst->size - dst->count) { 106 memmove(dst->buf + dst->count, src->buf, src->count); 107 dst->count += src->count; 108 } 109 } 110 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3098/3098] kernel/bpf-rvi/common_kfuncs.c:86:27: warning: no previous prototype for 'bpf_page_counter_read'
by kernel test robot 05 Nov '25

05 Nov '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: faa195bad3afed3c326917fb4cd36e0bd311220c commit: 5e4cec4acb12a17b26d4d2ae4c29eb29b017f854 [3098/3098] bpf-rvi: Add bpf_page_counter_read() kfunc config: x86_64-randconfig-001-20251104 (https://download.01.org/0day-ci/archive/20251105/202511050235.5PdxK5fh-lkp@…) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251105/202511050235.5PdxK5fh-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/202511050235.5PdxK5fh-lkp@intel.com/ All warnings (new ones prefixed by >>): kernel/bpf-rvi/common_kfuncs.c:19:32: warning: no previous prototype for 'bpf_mem_cgroup_from_task' [-Wmissing-prototypes] 19 | __bpf_kfunc struct mem_cgroup *bpf_mem_cgroup_from_task(struct task_struct *p) | ^~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:28:35: warning: no previous prototype for 'bpf_task_active_pid_ns' [-Wmissing-prototypes] 28 | __bpf_kfunc struct pid_namespace *bpf_task_active_pid_ns(struct task_struct *task) | ^~~~~~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:33:17: warning: no previous prototype for 'bpf_pidns_nr_tasks' [-Wmissing-prototypes] 33 | __bpf_kfunc u64 bpf_pidns_nr_tasks(struct pid_namespace *ns) | ^~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:47:17: warning: no previous prototype for 'bpf_pidns_last_pid' [-Wmissing-prototypes] 47 | __bpf_kfunc u32 bpf_pidns_last_pid(struct pid_namespace *ns) | ^~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:76:18: warning: no previous prototype for 'bpf_si_memswinfo' [-Wmissing-prototypes] 76 | __bpf_kfunc void bpf_si_memswinfo(struct bpf_sysinfo *bsi) | ^~~~~~~~~~~~~~~~ >> kernel/bpf-rvi/common_kfuncs.c:86:27: warning: no previous prototype for 'bpf_page_counter_read' [-Wmissing-prototypes] 86 | __bpf_kfunc unsigned long bpf_page_counter_read(struct page_counter *counter) | ^~~~~~~~~~~~~~~~~~~~~ vim +/bpf_page_counter_read +86 kernel/bpf-rvi/common_kfuncs.c 32 > 33 __bpf_kfunc u64 bpf_pidns_nr_tasks(struct pid_namespace *ns) 34 { 35 struct pid_iter iter = {}; 36 u32 nr_running = 0, nr_threads = 0; 37 38 for_each_task_in_pidns(iter, ns) { 39 nr_threads++; 40 if (task_is_running(iter.task)) 41 nr_running++; 42 } 43 44 return (u64)nr_running << 32 | nr_threads; 45 } 46 47 __bpf_kfunc u32 bpf_pidns_last_pid(struct pid_namespace *ns) 48 { 49 return idr_get_cursor(&ns->idr) - 1; 50 } 51 52 /* 53 * Swaps related kfuncs 54 */ 55 56 /* 57 * no padding member "_f" compared to struct sysinfo, because sizeof(_f) 58 * maybe zero and not supported by bpf_verifier. 59 */ 60 struct bpf_sysinfo { 61 __kernel_long_t uptime; /* Seconds since boot */ 62 __kernel_ulong_t loads[3]; /* 1, 5, and 15 minute load averages */ 63 __kernel_ulong_t totalram; /* Total usable main memory size */ 64 __kernel_ulong_t freeram; /* Available memory size */ 65 __kernel_ulong_t sharedram; /* Amount of shared memory */ 66 __kernel_ulong_t bufferram; /* Memory used by buffers */ 67 __kernel_ulong_t totalswap; /* Total swap space size */ 68 __kernel_ulong_t freeswap; /* swap space still available */ 69 __u16 procs; /* Number of current processes */ 70 __u16 pad; /* Explicit padding for m68k */ 71 __kernel_ulong_t totalhigh; /* Total high memory size */ 72 __kernel_ulong_t freehigh; /* Available high memory size */ 73 __u32 mem_unit; /* Memory unit size in bytes */ 74 }; 75 76 __bpf_kfunc void bpf_si_memswinfo(struct bpf_sysinfo *bsi) 77 { 78 struct sysinfo *si = (struct sysinfo *)bsi; 79 80 if (si) { 81 si_meminfo(si); 82 si_swapinfo(si); 83 } 84 } 85 > 86 __bpf_kfunc unsigned long bpf_page_counter_read(struct page_counter *counter) 87 { 88 return page_counter_read(counter); 89 } 90 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • ...
  • 2113
  • Older →

HyperKitty Powered by HyperKitty