mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

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

Kernel

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

  • 47 participants
  • 18241 discussions
[PATCH OLK-6.6] nfs: fix the loss of superblock's initialized flags
by Li Lingfeng 16 Dec '24

16 Dec '24
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IB42W1 -------------------------------- Commit 573573887e0b ("nfs: pass flags to second superblock") directly assigns fc->sb_flags to dentry->d_sb->s_flags, which will cause the loss of the initialized flags in dentry->d_sb->s_flags. Fix it by just passing SB_RDONLY from fc->sb_flags to dentry->d_sb->s_flags. Fixes: 573573887e0b ("nfs: pass flags to second superblock") Signed-off-by: Li Lingfeng <lilingfeng3(a)huawei.com> --- fs/nfs/nfs4super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/nfs4super.c b/fs/nfs/nfs4super.c index bb13894ad152..e87f878178f3 100644 --- a/fs/nfs/nfs4super.c +++ b/fs/nfs/nfs4super.c @@ -209,7 +209,7 @@ static int do_nfs4_mount(struct nfs_server *server, if (IS_ERR(dentry)) return PTR_ERR(dentry); - dentry->d_sb->s_flags = fc->sb_flags; + dentry->d_sb->s_flags |= (fc->sb_flags & SB_RDONLY); fc->root = dentry; return 0; } -- 2.31.1
2 1
0 0
[PATCH OLK-6.6] Revert "mmc: dw_mmc: Fix IDMAC operation with pages bigger than 4K"
by Yi Yang 16 Dec '24

16 Dec '24
From: Aurelien Jarno <aurelien(a)aurel32.net> stable inclusion from stable-v6.6.63 commit 56de724c58c07a7ca3aac027cfd2ccb184ed9e4e category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IB9574 CVE: CVE-2024-53127 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- commit 1635e407a4a64d08a8517ac59ca14ad4fc785e75 upstream. The commit 8396c793ffdf ("mmc: dw_mmc: Fix IDMAC operation with pages bigger than 4K") increased the max_req_size, even for 4K pages, causing various issues: - Panic booting the kernel/rootfs from an SD card on Rockchip RK3566 - Panic booting the kernel/rootfs from an SD card on StarFive JH7100 - "swiotlb buffer is full" and data corruption on StarFive JH7110 At this stage no fix have been found, so it's probably better to just revert the change. This reverts commit 8396c793ffdf28bb8aee7cfe0891080f8cab7890. Cc: stable(a)vger.kernel.org Cc: Sam Protsenko <semen.protsenko(a)linaro.org> Fixes: 8396c793ffdf ("mmc: dw_mmc: Fix IDMAC operation with pages bigger than 4K") Closes: https://lore.kernel.org/linux-mmc/614692b4-1dbe-31b8-a34d-cb6db1909bb7@w6rz… Closes: https://lore.kernel.org/linux-mmc/CAC8uq=Ppnmv98mpa1CrWLawWoPnu5abtU69v-=G-… Signed-off-by: Aurelien Jarno <aurelien(a)aurel32.net> Message-ID: <20241110114700.622372-1-aurelien(a)aurel32.net> Signed-off-by: Ulf Hansson <ulf.hansson(a)linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: Yi Yang <yiyang13(a)huawei.com> --- drivers/mmc/host/dw_mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 2f0bc79ef856..02bee7afab37 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -2952,8 +2952,8 @@ static int dw_mci_init_slot(struct dw_mci *host) if (host->use_dma == TRANS_MODE_IDMAC) { mmc->max_segs = host->ring_size; mmc->max_blk_size = 65535; - mmc->max_req_size = DW_MCI_DESC_DATA_LENGTH * host->ring_size; - mmc->max_seg_size = mmc->max_req_size; + mmc->max_seg_size = 0x1000; + mmc->max_req_size = mmc->max_seg_size * host->ring_size; mmc->max_blk_count = mmc->max_req_size / 512; } else if (host->use_dma == TRANS_MODE_EDMAC) { mmc->max_segs = 64; -- 2.25.1
2 1
0 0
[openeuler:openEuler-1.0-LTS 1327/1327] mm/vmscan.c:3257:28: error: implicit declaration of function 'kernel_swap_enabled'; did you mean 'kernfs_ns_enabled'?
by kernel test robot 16 Dec '24

16 Dec '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 098a595b2caf96f57cda68f082b4dc0019d7814d commit: 44983705e56ab22fda801d66e2a6bd0d1be7ca0b [1327/1327] etmem: add original kernel swap enabled options config: arm64-allnoconfig (https://download.01.org/0day-ci/archive/20241216/202412161514.E1aRqHqY-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241216/202412161514.E1aRqHqY-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/202412161514.E1aRqHqY-lkp@intel.com/ All errors (new ones prefixed by >>): mm/vmscan.c: In function 'kernel_swap_check': >> mm/vmscan.c:3257:28: error: implicit declaration of function 'kernel_swap_enabled'; did you mean 'kernfs_ns_enabled'? [-Werror=implicit-function-declaration] 3257 | if (sc != NULL && !kernel_swap_enabled()) | ^~~~~~~~~~~~~~~~~~~ | kernfs_ns_enabled cc1: some warnings being treated as errors vim +3257 mm/vmscan.c 3250 3251 /* 3252 * Check if original kernel swap is enabled 3253 * turn off kernel swap,but leave page cache reclaim on 3254 */ 3255 static inline void kernel_swap_check(struct scan_control *sc) 3256 { > 3257 if (sc != NULL && !kernel_swap_enabled()) 3258 sc->may_swap = 0; 3259 } 3260 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1327/1327] mm/vmscan.c:3257:21: error: implicit declaration of function 'kernel_swap_enabled'
by kernel test robot 16 Dec '24

16 Dec '24
Hi liubo, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 098a595b2caf96f57cda68f082b4dc0019d7814d commit: 44983705e56ab22fda801d66e2a6bd0d1be7ca0b [1327/1327] etmem: add original kernel swap enabled options config: x86_64-buildonly-randconfig-005-20241216 (https://download.01.org/0day-ci/archive/20241216/202412161417.Nk6TMs2D-lkp@…) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241216/202412161417.Nk6TMs2D-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/202412161417.Nk6TMs2D-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from mm/vmscan.c:23: include/linux/pagemap.h:425:21: warning: cast from 'int (*)(struct file *, struct page *)' to 'filler_t *' (aka 'int (*)(void *, struct page *)') converts to incompatible function type [-Wcast-function-type-strict] 425 | filler_t *filler = (filler_t *)mapping->a_ops->readpage; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from mm/vmscan.c:33: include/linux/mm_inline.h:32:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 32 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages); | ~~~~~~~~~~~ ^ ~~~ include/linux/mm_inline.h:34:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 34 | NR_ZONE_LRU_BASE + lru, nr_pages); | ~~~~~~~~~~~~~~~~ ^ ~~~ mm/vmscan.c:350:64: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 350 | lru_size = node_page_state(lruvec_pgdat(lruvec), NR_LRU_BASE + lru); | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:240:60: note: expanded from macro 'node_page_state' 240 | #define node_page_state(node, item) global_node_page_state(item) | ^~~~ mm/vmscan.c:363:29: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 363 | NR_ZONE_LRU_BASE + lru); | ~~~~~~~~~~~~~~~~ ^ ~~~ mm/vmscan.c:1776:4: warning: arithmetic between different enumeration types ('enum vm_event_item' and 'enum zone_type') [-Wenum-enum-conversion] 1776 | __count_zid_vm_events(PGSCAN_SKIP, zid, nr_skipped[zid]); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:127:34: note: expanded from macro '__count_zid_vm_events' 127 | __count_vm_events(item##_NORMAL - ZONE_NORMAL + zid, delta) | ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~ mm/vmscan.c:2734:17: warning: variable 'node_lru_pages' set but not used [-Wunused-but-set-variable] 2734 | unsigned long node_lru_pages = 0; | ^ mm/vmscan.c:3066:3: warning: arithmetic between different enumeration types ('enum vm_event_item' and 'enum zone_type') [-Wenum-enum-conversion] 3066 | __count_zid_vm_events(ALLOCSTALL, sc->reclaim_idx, 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:127:34: note: expanded from macro '__count_zid_vm_events' 127 | __count_vm_events(item##_NORMAL - ZONE_NORMAL + zid, delta) | ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~ >> mm/vmscan.c:3257:21: error: implicit declaration of function 'kernel_swap_enabled' [-Werror,-Wimplicit-function-declaration] 3257 | if (sc != NULL && !kernel_swap_enabled()) | ^ mm/vmscan.c:3257:21: note: did you mean 'kernfs_ns_enabled'? include/linux/kernfs.h:309:20: note: 'kernfs_ns_enabled' declared here 309 | static inline bool kernfs_ns_enabled(struct kernfs_node *kn) | ^ 8 warnings and 1 error generated. vim +/kernel_swap_enabled +3257 mm/vmscan.c 3250 3251 /* 3252 * Check if original kernel swap is enabled 3253 * turn off kernel swap,but leave page cache reclaim on 3254 */ 3255 static inline void kernel_swap_check(struct scan_control *sc) 3256 { > 3257 if (sc != NULL && !kernel_swap_enabled()) 3258 sc->may_swap = 0; 3259 } 3260 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH OLK-5.10] watchdog/perf: properly initialize the turbo mode timestamp and rearm counter
by Luo Gengkun 16 Dec '24

16 Dec '24
From: Thomas Gleixner <tglx(a)linutronix.de> stable inclusion from stable-v5.10.224 commit 19f108b3d1cafab159078a26ac93a64cab47258b category: bugfix bugzilla: 189268 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- commit f944ffcbc2e1c759764850261670586ddf3bdabb upstream. For systems on which the performance counter can expire early due to turbo modes the watchdog handler has a safety net in place which validates that since the last watchdog event there has at least 4/5th of the watchdog period elapsed. This works reliably only after the first watchdog event because the per CPU variable which holds the timestamp of the last event is never initialized. So a first spurious event will validate against a timestamp of 0 which results in a delta which is likely to be way over the 4/5 threshold of the period. As this might happen before the first watchdog hrtimer event increments the watchdog counter, this can lead to false positives. Fix this by initializing the timestamp before enabling the hardware event. Reset the rearm counter as well, as that might be non zero after the watchdog was disabled and reenabled. Link: https://lkml.kernel.org/r/87frsfu15a.ffs@tglx Fixes: 7edaeb6841df ("kernel/watchdog: Prevent false positives with turbo modes") Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de> Cc: Arjan van de Ven <arjan(a)linux.intel.com> Cc: Peter Zijlstra <peterz(a)infradead.org> Cc: <stable(a)vger.kernel.org> Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Conflicts: kernel/watchdog_hld.c [Fix context conflicts] Signed-off-by: Luo Gengkun <luogengkun2(a)huawei.com> --- kernel/watchdog_hld.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/kernel/watchdog_hld.c b/kernel/watchdog_hld.c index cb7053a6ba49..e4f158f56eda 100644 --- a/kernel/watchdog_hld.c +++ b/kernel/watchdog_hld.c @@ -290,11 +290,15 @@ void refresh_hld_last_timestamp(void) __this_cpu_write(last_timestamp, now); } -#else -static inline bool watchdog_check_timestamp(void) + +static void watchdog_init_timestamp(void) { - return true; + __this_cpu_write(nmi_rearmed, 0); + __this_cpu_write(last_timestamp, ktime_get_mono_fast_ns()); } +#else +static inline bool watchdog_check_timestamp(void) { return true; } +static inline void watchdog_init_timestamp(void) { } #endif void watchdog_hardlockup_check(struct pt_regs *regs) @@ -416,6 +420,7 @@ void hardlockup_detector_perf_enable(void) if (!atomic_fetch_inc(&watchdog_cpus)) pr_info("Enabled. Permanently consumes one hw-PMU counter.\n"); + watchdog_init_timestamp(); perf_event_enable(this_cpu_read(watchdog_ev)); } -- 2.34.1
2 1
0 0
[openeuler:openEuler-1.0-LTS 1327/1327] mm/memory.c:1546:24: error: implicit declaration of function 'hugetlb_insert_hugepage_pte_by_pa'; did you mean 'hugetlb_insert__hugepage_pte_by_pa'?
by kernel test robot 16 Dec '24

16 Dec '24
Hi Weilong, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 098a595b2caf96f57cda68f082b4dc0019d7814d commit: 18f49509eef01d1ee6ed81899298994f2f88dd2a [1327/1327] ascend: share_pool: Use remap_pfn_range to share kva to uva config: arm64-allnoconfig (https://download.01.org/0day-ci/archive/20241216/202412161346.WAg6a7B0-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241216/202412161346.WAg6a7B0-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/202412161346.WAg6a7B0-lkp@intel.com/ All errors (new ones prefixed by >>): mm/memory.c: In function 'vm_insert_page': >> mm/memory.c:1546:24: error: implicit declaration of function 'hugetlb_insert_hugepage_pte_by_pa'; did you mean 'hugetlb_insert__hugepage_pte_by_pa'? [-Werror=implicit-function-declaration] 1546 | return hugetlb_insert_hugepage_pte_by_pa(vma->vm_mm, addr, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | hugetlb_insert__hugepage_pte_by_pa In file included from arch/arm64/include/asm/atomic.h:36, from include/linux/atomic.h:7, from include/asm-generic/bitops/atomic.h:5, from arch/arm64/include/asm/bitops.h:37, from include/linux/bitops.h:19, from include/linux/kernel.h:11, from include/linux/list.h:9, from include/linux/smp.h:12, from include/linux/kernel_stat.h:5, from mm/memory.c:41: In function '__cmpxchg_case_acq_4', inlined from '__cmpxchg_acq' at arch/arm64/include/asm/cmpxchg.h:141:1, inlined from 'queued_spin_lock' at include/asm-generic/qspinlock.h:85:8, inlined from 'do_raw_spin_lock' at include/linux/spinlock.h:180:2, inlined from '__raw_spin_lock' at include/linux/spinlock_api_smp.h:143:2, inlined from 'spin_lock' at include/linux/spinlock.h:329:2, inlined from 'copy_one_pte' at mm/memory.c:731:5, inlined from 'copy_pte_range' at mm/memory.c:869:15: arch/arm64/include/asm/atomic_ll_sc.h:259:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'spinlock_t[1]' {aka 'struct spinlock[1]'} [-Warray-bounds=] 259 | asm volatile( \ | ^~~ arch/arm64/include/asm/atomic_ll_sc.h:283:1: note: in expansion of macro '__CMPXCHG_CASE' 283 | __CMPXCHG_CASE(w, , acq_4, , a, , "memory") | ^~~~~~~~~~~~~~ In file included from mm/memory.c:46: include/linux/sched/task.h: In function 'copy_pte_range': include/linux/sched/task.h:23:19: note: object 'mmlist_lock' of size 4 23 | extern spinlock_t mmlist_lock; | ^~~~~~~~~~~ In function '__cmpxchg_case_acq_4', inlined from '__cmpxchg_acq' at arch/arm64/include/asm/cmpxchg.h:141:1, inlined from 'queued_spin_lock' at include/asm-generic/qspinlock.h:85:8, inlined from 'do_raw_spin_lock' at include/linux/spinlock.h:180:2, inlined from '__raw_spin_lock' at include/linux/spinlock_api_smp.h:143:2, inlined from 'spin_lock' at include/linux/spinlock.h:329:2, inlined from 'copy_one_pte' at mm/memory.c:731:5, inlined from 'copy_pte_range' at mm/memory.c:869:15: arch/arm64/include/asm/atomic_ll_sc.h:259:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'spinlock_t[1]' {aka 'struct spinlock[1]'} [-Warray-bounds=] 259 | asm volatile( \ | ^~~ arch/arm64/include/asm/atomic_ll_sc.h:283:1: note: in expansion of macro '__CMPXCHG_CASE' 283 | __CMPXCHG_CASE(w, , acq_4, , a, , "memory") | ^~~~~~~~~~~~~~ include/linux/sched/task.h: In function 'copy_pte_range': include/linux/sched/task.h:23:19: note: object 'mmlist_lock' of size 4 23 | extern spinlock_t mmlist_lock; | ^~~~~~~~~~~ cc1: some warnings being treated as errors vim +1546 mm/memory.c 1504 1505 /** 1506 * vm_insert_page - insert single page into user vma 1507 * @vma: user vma to map to 1508 * @addr: target user address of this page 1509 * @page: source kernel page 1510 * 1511 * This allows drivers to insert individual pages they've allocated 1512 * into a user vma. 1513 * 1514 * The page has to be a nice clean _individual_ kernel allocation. 1515 * If you allocate a compound page, you need to have marked it as 1516 * such (__GFP_COMP), or manually just split the page up yourself 1517 * (see split_page()). 1518 * 1519 * NOTE! Traditionally this was done with "remap_pfn_range()" which 1520 * took an arbitrary page protection parameter. This doesn't allow 1521 * that. Your vma protection will have to be set up correctly, which 1522 * means that if you want a shared writable mapping, you'd better 1523 * ask for a shared writable mapping! 1524 * 1525 * The page does not need to be reserved. 1526 * 1527 * Usually this function is called from f_op->mmap() handler 1528 * under mm->mmap_sem write-lock, so it can change vma->vm_flags. 1529 * Caller must set VM_MIXEDMAP on vma if it wants to call this 1530 * function from other places, for example from page-fault handler. 1531 */ 1532 int vm_insert_page(struct vm_area_struct *vma, unsigned long addr, 1533 struct page *page) 1534 { 1535 if (addr < vma->vm_start || addr >= vma->vm_end) 1536 return -EFAULT; 1537 if (!page_count(page)) 1538 return -EINVAL; 1539 if (!(vma->vm_flags & VM_MIXEDMAP)) { 1540 BUG_ON(down_read_trylock(&vma->vm_mm->mmap_sem)); 1541 BUG_ON(vma->vm_flags & VM_PFNMAP); 1542 vma->vm_flags |= VM_MIXEDMAP; 1543 } 1544 1545 if (sp_check_hugepage(page)) > 1546 return hugetlb_insert_hugepage_pte_by_pa(vma->vm_mm, addr, 1547 vma->vm_page_prot, page_to_phys(page)); 1548 else 1549 return insert_page(vma, addr, page, vma->vm_page_prot); 1550 } 1551 EXPORT_SYMBOL(vm_insert_page); 1552 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2583/2583] drivers/misc/virt_plat_dev.c:37:43: warning: initialization of 'struct irq_domain *' from 'int' makes pointer from integer without a cast
by kernel test robot 16 Dec '24

16 Dec '24
Hi wanghaibin, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: dd14d8eb16732508135cd386c09cc747615571f7 commit: e4c0f18287a89cbdf34dffd6ac672d89e8add238 [2583/2583] virt_plat_dev: Register the virt platform device driver config: arm64-randconfig-003-20241216 (https://download.01.org/0day-ci/archive/20241216/202412161357.rpwPDaPz-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241216/202412161357.rpwPDaPz-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/202412161357.rpwPDaPz-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/misc/virt_plat_dev.c: In function 'virt_device_probe': drivers/misc/virt_plat_dev.c:37:43: error: implicit declaration of function 'vp_get_irq_domain'; did you mean 'dev_get_msi_domain'? [-Werror=implicit-function-declaration] 37 | struct irq_domain *vp_irqdomain = vp_get_irq_domain(); | ^~~~~~~~~~~~~~~~~ | dev_get_msi_domain >> drivers/misc/virt_plat_dev.c:37:43: warning: initialization of 'struct irq_domain *' from 'int' makes pointer from integer without a cast [-Wint-conversion] cc1: some warnings being treated as errors vim +37 drivers/misc/virt_plat_dev.c 31 32 static int virt_device_probe(struct platform_device *pdev) 33 { 34 struct msi_desc *desc; 35 unsigned int *drvdata = dev_get_drvdata(&pdev->dev); 36 unsigned int nvec = *drvdata; > 37 struct irq_domain *vp_irqdomain = vp_get_irq_domain(); 38 int ret; 39 40 if (!vp_irqdomain) 41 return -ENXIO; 42 43 virtdev_info("Allocate platform msi irqs nvecs: %d\n", nvec); 44 dev_set_msi_domain(&pdev->dev, vp_irqdomain); 45 46 ret = platform_msi_domain_alloc_irqs(&pdev->dev, nvec, 47 virt_write_msi_msg); 48 if (ret) { 49 pr_err("Allocate platform msi irqs failed %d\n", ret); 50 goto error; 51 } 52 53 virtdev_info("Allocate platform msi irqs succeed\n"); 54 for_each_msi_entry(desc, &pdev->dev) { 55 virtdev_info("Request irq %d\n", desc->irq); 56 ret = request_irq(desc->irq, virt_irq_handle, 0, 57 "virt_dev_host", pdev); 58 if (ret) { 59 pr_err("Request irq %d failed %d\n", desc->irq, ret); 60 goto error_free_irqs; 61 } 62 } 63 64 virtdev_info("Init virtual platform device driver successfully.\n"); 65 return 0; 66 67 error_free_irqs: 68 for_each_msi_entry(desc, &pdev->dev) 69 free_irq(desc->irq, pdev); 70 71 platform_msi_domain_free_irqs(&pdev->dev); 72 error: 73 return ret; 74 } 75 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH OLK-5.10] gpiolib: fix memory use-after-free in gpiochip_setup_dev()
by He Yujie 16 Dec '24

16 Dec '24
hulk inclusion category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IB8UN5 -------------------------------- Commit aa1e2bfdc899 attempt to fix a CVE problem, but the patch conflicted with current version. When the patch is adapted, an error is introduced in the function of gpiochip_add_data_with_key. After the gdev is released, the gdev is still accessed, resulting in use-after-free. The value of gdev->ngpio is assigned from gc->ngpio and is not changed during the processing of function. Therefore, this patch changes gdev->ngpio to gc->ngpio to solve the above use-after-free problem. Fixes: aa1e2bfdc899 ("gpiolib: fix memory leak in gpiochip_setup_dev()") Signed-off-by: He Yujie <coka.heyujie(a)huawei.com> --- drivers/gpio/gpiolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index ae000b513bc1..9e717cf180d4 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -795,7 +795,7 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, err_print_message: /* failures here can mean systems won't boot... */ pr_err("%s: GPIOs %d..%d (%s) failed to register, %d\n", __func__, - base, base + gdev->ngpio - 1, + base, base + (int)gc->ngpio - 1, gc->label ? : "generic", ret); return ret; } -- 2.34.1
2 1
0 0
[PATCH openEuler-1.0-LTS] nilfs2: fix null-ptr-deref in block_touch_buffer tracepoint
by He Yujie 16 Dec '24

16 Dec '24
From: Ryusuke Konishi <konishi.ryusuke(a)gmail.com> stable inclusion from stable-v4.19.325 commit 085556bf8c70e2629e02e79268dac3016a08b8bf category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IB956P CVE: CVE-2024-53131 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- commit cd45e963e44b0f10d90b9e6c0e8b4f47f3c92471 upstream. Patch series "nilfs2: fix null-ptr-deref bugs on block tracepoints". This series fixes null pointer dereference bugs that occur when using nilfs2 and two block-related tracepoints. This patch (of 2): It has been reported that when using "block:block_touch_buffer" tracepoint, touch_buffer() called from __nilfs_get_folio_block() causes a NULL pointer dereference, or a general protection fault when KASAN is enabled. This happens because since the tracepoint was added in touch_buffer(), it references the dev_t member bh->b_bdev->bd_dev regardless of whether the buffer head has a pointer to a block_device structure. In the current implementation, the block_device structure is set after the function returns to the caller. Here, touch_buffer() is used to mark the folio/page that owns the buffer head as accessed, but the common search helper for folio/page used by the caller function was optimized to mark the folio/page as accessed when it was reimplemented a long time ago, eliminating the need to call touch_buffer() here in the first place. So this solves the issue by eliminating the touch_buffer() call itself. Link: https://lkml.kernel.org/r/20241106160811.3316-1-konishi.ryusuke@gmail.com Link: https://lkml.kernel.org/r/20241106160811.3316-2-konishi.ryusuke@gmail.com Fixes: 5305cb830834 ("block: add block_{touch|dirty}_buffer tracepoint") Signed-off-by: Ryusuke Konishi <konishi.ryusuke(a)gmail.com> Reported-by: Ubisectech Sirius <bugreport(a)valiantsec.com> Closes: https://lkml.kernel.org/r/86bd3013-887e-4e38-960f-ca45c657f032.bugreport@va… Reported-by: syzbot+9982fb8d18eba905abe2(a)syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=9982fb8d18eba905abe2 Tested-by: syzbot+9982fb8d18eba905abe2(a)syzkaller.appspotmail.com Cc: Tejun Heo <tj(a)kernel.org> Cc: <stable(a)vger.kernel.org> Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: He Yujie <coka.heyujie(a)huawei.com> --- fs/nilfs2/page.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c index 360808b39b6d..cc3308d1c61d 100644 --- a/fs/nilfs2/page.c +++ b/fs/nilfs2/page.c @@ -39,7 +39,6 @@ __nilfs_get_page_block(struct page *page, unsigned long block, pgoff_t index, first_block = (unsigned long)index << (PAGE_SHIFT - blkbits); bh = nilfs_page_get_nth_block(page, block - first_block); - touch_buffer(bh); wait_on_buffer(bh); return bh; } -- 2.34.1
2 1
0 0
[openeuler:OLK-5.10 2566/2566] drivers/net/ethernet/mucse/rnp/rnp_common.h:298:7: warning: variable 'has_mac' set but not used
by kernel test robot 15 Dec '24

15 Dec '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 6c3413fbf8c430b89f5d23f465e10e99ea145199 commit: e53494b741272933726616122ea77143d9742631 [2566/2566] drivers: initial support for rnp drivers from Mucse Technology config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20241215/202412151215.kRAdh5LL-lkp@…) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241215/202412151215.kRAdh5LL-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/202412151215.kRAdh5LL-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from drivers/net/ethernet/mucse/rnp/rnp_main.c:7: In file included from include/linux/pci.h:1499: In file included from include/linux/dmapool.h:14: In file included from include/linux/scatterlist.h:8: In file included from include/linux/mm.h:1579: include/linux/vmstat.h:417:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 417 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 418 | item]; | ~~~~ include/linux/vmstat.h:424:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 424 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 425 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:431:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 431 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:436:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 436 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 437 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:445:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 445 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 446 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/net/ethernet/mucse/rnp/rnp_main.c:34: In file included from drivers/net/ethernet/mucse/rnp/rnp_tc_u32_parse.h:6: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21: >> drivers/net/ethernet/mucse/rnp/rnp_common.h:298:7: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_common.h:298:16: warning: variable 'has_trans' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_common.h:299:6: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_common.h:299:16: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_main.c:174:6: warning: no previous prototype for function 'rnp_unmap_and_free_tx_resource' [-Wmissing-prototypes] 174 | void rnp_unmap_and_free_tx_resource(struct rnp_ring *ring, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:174:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 174 | void rnp_unmap_and_free_tx_resource(struct rnp_ring *ring, | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:669:5: warning: no previous prototype for function 'rnp_rx_ring_reinit' [-Wmissing-prototypes] 669 | int rnp_rx_ring_reinit(struct rnp_adapter *adapter, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:669:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 669 | int rnp_rx_ring_reinit(struct rnp_adapter *adapter, | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:1777:7: warning: variable 'xdp_xmit' set but not used [-Wunused-but-set-variable] 1777 | bool xdp_xmit = false; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_main.c:2012:6: warning: no previous prototype for function 'rnp_write_eitr_rx' [-Wmissing-prototypes] 2012 | void rnp_write_eitr_rx(struct rnp_q_vector *q_vector) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:2012:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2012 | void rnp_write_eitr_rx(struct rnp_q_vector *q_vector) | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:2818:6: warning: variable 'rxctrl' set but not used [-Wunused-but-set-variable] 2818 | u32 rxctrl = 0, dma_axi_ctl; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_main.c:3152:6: warning: no previous prototype for function 'rnp_vlan_stags_flag' [-Wmissing-prototypes] 3152 | void rnp_vlan_stags_flag(struct rnp_adapter *adapter) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:3152:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 3152 | void rnp_vlan_stags_flag(struct rnp_adapter *adapter) | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:3558:5: warning: no previous prototype for function 'rnp_xmit_nop_frame_ring' [-Wmissing-prototypes] 3558 | int rnp_xmit_nop_frame_ring(struct rnp_adapter *adapter, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:3558:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 3558 | int rnp_xmit_nop_frame_ring(struct rnp_adapter *adapter, | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:4811:6: warning: no previous prototype for function 'rnp_service_timer' [-Wmissing-prototypes] 4811 | void rnp_service_timer(struct timer_list *t) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:4811:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 4811 | void rnp_service_timer(struct timer_list *t) | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:4919:6: warning: no previous prototype for function 'rnp_service_task' [-Wmissing-prototypes] 4919 | void rnp_service_task(struct work_struct *work) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:4919:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 4919 | void rnp_service_task(struct work_struct *work) | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:5941:5: warning: no previous prototype for function 'rnp_delete_knode' [-Wmissing-prototypes] 5941 | int rnp_delete_knode(struct net_device *dev, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:5941:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 5941 | int rnp_delete_knode(struct net_device *dev, | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:6030:5: warning: no previous prototype for function 'rnp_config_knode' [-Wmissing-prototypes] 6030 | int rnp_config_knode(struct net_device *dev, __be16 protocol, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:6030:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6030 | int rnp_config_knode(struct net_device *dev, __be16 protocol, | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:6089:5: warning: no previous prototype for function 'rnp_setup_tc_cls_u32' [-Wmissing-prototypes] 6089 | int rnp_setup_tc_cls_u32(struct net_device *dev, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:6089:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6089 | int rnp_setup_tc_cls_u32(struct net_device *dev, | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:6166:6: warning: no previous prototype for function 'rnp_do_reset' [-Wmissing-prototypes] 6166 | void rnp_do_reset(struct net_device *netdev) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:6166:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6166 | void rnp_do_reset(struct net_device *netdev) | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:6387:6: warning: no previous prototype for function 'rnp_clear_udp_tunnel_port' [-Wmissing-prototypes] 6387 | void rnp_clear_udp_tunnel_port(struct rnp_adapter *adapter) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:6387:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6387 | void rnp_clear_udp_tunnel_port(struct rnp_adapter *adapter) | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:6507:6: warning: no previous prototype for function 'rnp_assign_netdev_ops' [-Wmissing-prototypes] 6507 | void rnp_assign_netdev_ops(struct net_device *dev) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:6507:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6507 | void rnp_assign_netdev_ops(struct net_device *dev) | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_main.c:6683:5: warning: no previous prototype for function 'rnp_can_rpu_start' [-Wmissing-prototypes] 6683 | int rnp_can_rpu_start(struct rnp_adapter *adapter) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:6683:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6683 | int rnp_can_rpu_start(struct rnp_adapter *adapter) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:6536:29: warning: unused function 'rnp_tso_features' [-Wunused-function] 6536 | static inline unsigned long rnp_tso_features(struct rnp_hw *hw) | ^~~~~~~~~~~~~~~~ 26 warnings generated. -- >> drivers/net/ethernet/mucse/rnp/rnp_main.c:157: warning: Function parameter or member 'rnp_queue' not described in 'rnp_set_ring_vector' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:157: warning: Function parameter or member 'rnp_msix_vector' not described in 'rnp_set_ring_vector' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:157: warning: Excess function parameter 'queue' description in 'rnp_set_ring_vector' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:157: warning: Excess function parameter 'msix_vector' description in 'rnp_set_ring_vector' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:287: warning: Function parameter or member 'napi_budget' not described in 'rnp_clean_tx_irq' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:671: warning: Function parameter or member 'adapter' not described in 'rnp_rx_ring_reinit' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:1130: warning: Excess function parameter 'skb' description in 'rnp_is_non_eop' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:2563: warning: Function parameter or member 'adapter' not described in 'rnp_tx_maxrate_own' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:2563: warning: Excess function parameter 'netdev' description in 'rnp_tx_maxrate_own' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:2563: warning: Excess function parameter 'maxrate' description in 'rnp_tx_maxrate_own' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:3748: warning: Function parameter or member 'txqueue' not described in 'rnp_tx_timeout' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:3857: warning: Function parameter or member 'adapter' not described in 'rnp_setup_tx_resources' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:3950: warning: Function parameter or member 'adapter' not described in 'rnp_setup_rx_resources' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:4612: warning: Excess function parameter 'link_speed' description in 'rnp_watchdog_update_link' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:4812: warning: Function parameter or member 't' not described in 'rnp_service_timer' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:4812: warning: Excess function parameter 'data' description in 'rnp_service_timer' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:5872: warning: Function parameter or member 'dev' not described in 'rnp_setup_tc' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:5872: warning: Excess function parameter 'netdev' description in 'rnp_setup_tc' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:6526: warning: Function parameter or member 'adapter' not described in 'rnp_wol_supported' >> drivers/net/ethernet/mucse/rnp/rnp_main.c:6526: warning: Function parameter or member 'subdevice_id' not described in 'rnp_wol_supported' drivers/net/ethernet/mucse/rnp/rnp_main.c:6526: warning: Excess function parameter 'hw' description in 'rnp_wol_supported' drivers/net/ethernet/mucse/rnp/rnp_main.c:6526: warning: Excess function parameter 'subdev_id' description in 'rnp_wol_supported' drivers/net/ethernet/mucse/rnp/rnp_main.c:7099: warning: Function parameter or member 'id' not described in 'rnp_probe' drivers/net/ethernet/mucse/rnp/rnp_main.c:7099: warning: Excess function parameter 'ent' description in 'rnp_probe' -- In file included from drivers/net/ethernet/mucse/rnp/rnp_common.c:4: In file included from include/linux/pci.h:1499: In file included from include/linux/dmapool.h:14: In file included from include/linux/scatterlist.h:8: In file included from include/linux/mm.h:1579: include/linux/vmstat.h:417:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 417 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 418 | item]; | ~~~~ include/linux/vmstat.h:424:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 424 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 425 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:431:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 431 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:436:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 436 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 437 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:445:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 445 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 446 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/net/ethernet/mucse/rnp/rnp_common.c:10: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21: >> drivers/net/ethernet/mucse/rnp/rnp_common.h:298:7: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_common.h:298:16: warning: variable 'has_trans' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_common.h:299:6: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_common.h:299:16: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ 9 warnings generated. -- In file included from drivers/net/ethernet/mucse/rnp/rnp_lib.c:4: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:9: In file included from include/linux/pci.h:1499: In file included from include/linux/dmapool.h:14: In file included from include/linux/scatterlist.h:8: In file included from include/linux/mm.h:1579: include/linux/vmstat.h:417:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 417 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 418 | item]; | ~~~~ include/linux/vmstat.h:424:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 424 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 425 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:431:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 431 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:436:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 436 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 437 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:445:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 445 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 446 | NR_VM_NUMA_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/net/ethernet/mucse/rnp/rnp_lib.c:4: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21: >> drivers/net/ethernet/mucse/rnp/rnp_common.h:298:7: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_common.h:298:16: warning: variable 'has_trans' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_common.h:299:6: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_common.h:299:16: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ >> drivers/net/ethernet/mucse/rnp/rnp_lib.c:439:5: warning: no previous prototype for function 'rnp_acquire_msix_vectors' [-Wmissing-prototypes] 439 | int rnp_acquire_msix_vectors(struct rnp_adapter *adapter, int vectors) | ^ drivers/net/ethernet/mucse/rnp/rnp_lib.c:439:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 439 | int rnp_acquire_msix_vectors(struct rnp_adapter *adapter, int vectors) | ^ | static >> drivers/net/ethernet/mucse/rnp/rnp_lib.c:985:6: warning: no previous prototype for function 'rnp_print_ring_info' [-Wmissing-prototypes] 985 | void rnp_print_ring_info(struct rnp_adapter *adapter) | ^ drivers/net/ethernet/mucse/rnp/rnp_lib.c:985:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 985 | void rnp_print_ring_info(struct rnp_adapter *adapter) | ^ | static 11 warnings generated. -- >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:179: warning: Function parameter or member 'data' not described in 'rnp_reg_test' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:466: warning: Function parameter or member 'dev' not described in 'rnp_get_ts_info' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:466: warning: Excess function parameter 'netdev' description in 'rnp_get_ts_info' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:527: warning: Function parameter or member 'dev' not described in 'rnp_get_channels' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:527: warning: Excess function parameter 'netdev' description in 'rnp_get_channels' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:561: warning: Function parameter or member 'dev' not described in 'rnp_set_channels' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:561: warning: Excess function parameter 'netdev' description in 'rnp_set_channels' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:600: warning: Function parameter or member 'dev' not described in 'rnp_get_module_info' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:600: warning: Excess function parameter 'netdev' description in 'rnp_get_module_info' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:653: warning: Function parameter or member 'dev' not described in 'rnp_get_module_eeprom' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:653: warning: Excess function parameter 'netdev' description in 'rnp_get_module_eeprom' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:700: warning: Function parameter or member 'ker' not described in 'rnp_get_ringparam' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:700: warning: Function parameter or member 'extack' not described in 'rnp_get_ringparam' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:725: warning: Function parameter or member 'ker' not described in 'rnp_set_ringparam' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:725: warning: Function parameter or member 'extack' not described in 'rnp_set_ringparam' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:945: warning: Function parameter or member 'coal' not described in 'rnp_get_coalesce' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:945: warning: Function parameter or member 'kernel_coal' not described in 'rnp_get_coalesce' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:945: warning: Function parameter or member 'extack' not described in 'rnp_get_coalesce' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:945: warning: Excess function parameter 'cmd' description in 'rnp_get_coalesce' >> drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:945: warning: Excess function parameter 'ec' description in 'rnp_get_coalesce' drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:987: warning: Function parameter or member 'kernel_coal' not described in 'rnp_set_coalesce' drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:987: warning: Function parameter or member 'extack' not described in 'rnp_set_coalesce' drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:987: warning: Excess function parameter 'cmd' description in 'rnp_set_coalesce' drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:1778: warning: Function parameter or member 'dev' not described in 'rnp_set_rxnfc' drivers/net/ethernet/mucse/rnp/rnp_ethtool.c:1778: warning: Excess function parameter 'netdev' description in 'rnp_set_rxnfc' .. vim +/has_mac +298 drivers/net/ethernet/mucse/rnp/rnp_common.h 287 288 #ifndef NO_SKB_DUMP 289 static inline void _rnp_skb_dump(const struct sk_buff *skb, bool full_pkt) 290 { 291 static atomic_t can_dump_full = ATOMIC_INIT(5); 292 #ifdef DEBUG 293 struct skb_shared_info *sh = skb_shinfo(skb); 294 #endif 295 struct net_device *dev = skb->dev; 296 //struct sock *sk = skb->sk; 297 struct sk_buff *list_skb; > 298 bool has_mac, has_trans; > 299 int headroom, tailroom; 300 int i, len, seg_len; 301 const char *level = KERN_WARNING; 302 303 if (full_pkt) 304 full_pkt = atomic_dec_if_positive(&can_dump_full) >= 0; 305 306 if (full_pkt) 307 len = skb->len; 308 else 309 len = min_t(int, skb->len, MAX_HEADER + 128); 310 311 headroom = skb_headroom(skb); 312 tailroom = skb_tailroom(skb); 313 314 has_mac = skb_mac_header_was_set(skb); 315 has_trans = skb_transport_header_was_set(skb); 316 317 dbg("%sskb len=%u headroom=%u headlen=%u tailroom=%u\n" 318 "mac=(%d,%d) net=(%d,%d) trans=%d\n" 319 "shinfo(txflags=%u nr_frags=%u gso(size=%hu type=%u segs=%hu))\n" 320 "csum(0x%x ip_summed=%u complete_sw=%u valid=%u level=%u)\n" 321 "hash(0x%x sw=%u l4=%u) proto=0x%04x pkttype=%u iif=%d\n", 322 level, skb->len, headroom, skb_headlen(skb), tailroom, 323 has_mac ? skb->mac_header : -1, 324 has_mac ? (skb->network_header - skb->mac_header) : -1, 325 skb->network_header, 326 has_trans ? skb_network_header_len(skb) : -1, 327 has_trans ? skb->transport_header : -1, sh->tx_flags, 328 sh->nr_frags, sh->gso_size, sh->gso_type, sh->gso_segs, 329 skb->csum, skb->ip_summed, skb->csum_complete_sw, 330 skb->csum_valid, skb->csum_level, skb->hash, skb->sw_hash, 331 skb->l4_hash, ntohs(skb->protocol), skb->pkt_type, 332 skb->skb_iif); 333 334 if (dev) 335 dbg("%sdev name=%s feat=0x%pNF\n", level, dev->name, 336 &dev->features); 337 338 //if (full_pkt && headroom) 339 // print_hex_dump(level, "skb headroom: ", 340 // DUMP_PREFIX_OFFSET, 341 // 16, 1, skb->head, headroom, false); 342 343 seg_len = min_t(int, skb_headlen(skb), len); 344 if (seg_len) 345 print_hex_dump(level, "skb linear: ", DUMP_PREFIX_OFFSET, 346 16, 1, skb->data, seg_len, false); 347 len -= seg_len; 348 349 // if (full_pkt && tailroom) 350 // print_hex_dump(level, "skb tailroom: ", 351 // DUMP_PREFIX_OFFSET, 352 // 16, 1, skb_tail_pointer(skb), tailroom, false); 353 354 for (i = 0; len && i < skb_shinfo(skb)->nr_frags; i++) { 355 skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; 356 //u32 p_off, p_len, copied; 357 u32 p_len; 358 struct page *p; 359 u8 *vaddr; 360 361 p = skb_frag_address(frag); 362 p_len = skb_frag_size(frag); 363 seg_len = min_t(int, p_len, len); 364 vaddr = kmap_atomic(p); 365 print_hex_dump(level, "skb frag: ", DUMP_PREFIX_OFFSET, 366 16, 1, vaddr, seg_len, false); 367 kunmap_atomic(vaddr); 368 len -= seg_len; 369 if (!len) 370 break; 371 } 372 373 if (full_pkt && skb_has_frag_list(skb)) { 374 dbg("skb fraglist:\n"); 375 skb_walk_frags(skb, list_skb) 376 _rnp_skb_dump(list_skb, true); 377 } 378 } 379 #endif 380 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 273
  • 274
  • 275
  • 276
  • 277
  • 278
  • 279
  • ...
  • 1825
  • Older →

HyperKitty Powered by HyperKitty