mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

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

Kernel

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

  • 57 participants
  • 19203 discussions
[PATCH v3 OLK-5.10 0/4] Some features and fixs for hbmdev and hbm cache
by Zhang Zekun 02 Sep '24

02 Sep '24
hbmdev and hbmcache new features and new fixs. v2: - Fix format warning v3: - Improve the patch subject Zhang Zekun (4): soc:hisilicon: Use _ON and _OFF in hbmcache hisilicon/hisi_hbmcache: Add a lock to protect pcc operation region hisilicon/hisi_hbmdev: Add lock to protect pcc operation region ACPI/HMAT: Add missing locality information for hot-added device drivers/acpi/acpi_memhotplug.c | 13 +++++++++++++ drivers/acpi/internal.h | 1 + drivers/acpi/numa/hmat.c | 17 +++++++++++++++++ drivers/soc/hisilicon/hisi_hbmcache.c | 20 +++++++++++++------- drivers/soc/hisilicon/hisi_hbmdev.c | 2 ++ 5 files changed, 46 insertions(+), 7 deletions(-) -- 2.17.1
2 5
0 0
[PATCH OLK-6.6] nfsd: map the EBADMSG to nfserr_io to avoid warning
by Li Lingfeng 02 Sep '24

02 Sep '24
maillist inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IAO6R4 Reference: https://lore.kernel.org/all/20240817062713.1819908-1-lilingfeng@huaweicloud… ---------------------------------------- Ext4 will throw -EBADMSG through ext4_readdir when a checksum error occurs, resulting in the following WARNING. Fix it by mapping EBADMSG to nfserr_io. nfsd_buffered_readdir iterate_dir // -EBADMSG -74 ext4_readdir // .iterate_shared ext4_dx_readdir ext4_htree_fill_tree htree_dirblock_to_tree ext4_read_dirblock __ext4_read_dirblock ext4_dirblock_csum_verify warn_no_space_for_csum __warn_no_space_for_csum return ERR_PTR(-EFSBADCRC) // -EBADMSG -74 nfserrno // WARNING [ 161.115610] ------------[ cut here ]------------ [ 161.116465] nfsd: non-standard errno: -74 [ 161.117315] WARNING: CPU: 1 PID: 780 at fs/nfsd/nfsproc.c:878 nfserrno+0x9d/0xd0 [ 161.118596] Modules linked in: [ 161.119243] CPU: 1 PID: 780 Comm: nfsd Not tainted 5.10.0-00014-g79679361fd5d #138 [ 161.120684] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qe mu.org 04/01/2014 [ 161.123601] RIP: 0010:nfserrno+0x9d/0xd0 [ 161.124676] Code: 0f 87 da 30 dd 00 83 e3 01 b8 00 00 00 05 75 d7 44 89 ee 48 c7 c7 c0 57 24 98 89 44 24 04 c6 05 ce 2b 61 03 01 e8 99 20 d8 00 <0f> 0b 8b 44 24 04 eb b5 4c 89 e6 48 c7 c7 a0 6d a4 99 e8 cc 15 33 [ 161.127797] RSP: 0018:ffffc90000e2f9c0 EFLAGS: 00010286 [ 161.128794] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 161.130089] RDX: 1ffff1103ee16f6d RSI: 0000000000000008 RDI: fffff520001c5f2a [ 161.131379] RBP: 0000000000000022 R08: 0000000000000001 R09: ffff8881f70c1827 [ 161.132664] R10: ffffed103ee18304 R11: 0000000000000001 R12: 0000000000000021 [ 161.133949] R13: 00000000ffffffb6 R14: ffff8881317c0000 R15: ffffc90000e2fbd8 [ 161.135244] FS: 0000000000000000(0000) GS:ffff8881f7080000(0000) knlGS:0000000000000000 [ 161.136695] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 161.137761] CR2: 00007fcaad70b348 CR3: 0000000144256006 CR4: 0000000000770ee0 [ 161.139041] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 161.140291] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 161.141519] PKRU: 55555554 [ 161.142076] Call Trace: [ 161.142575] ? __warn+0x9b/0x140 [ 161.143229] ? nfserrno+0x9d/0xd0 [ 161.143872] ? report_bug+0x125/0x150 [ 161.144595] ? handle_bug+0x41/0x90 [ 161.145284] ? exc_invalid_op+0x14/0x70 [ 161.146009] ? asm_exc_invalid_op+0x12/0x20 [ 161.146816] ? nfserrno+0x9d/0xd0 [ 161.147487] nfsd_buffered_readdir+0x28b/0x2b0 [ 161.148333] ? nfsd4_encode_dirent_fattr+0x380/0x380 [ 161.149258] ? nfsd_buffered_filldir+0xf0/0xf0 [ 161.150093] ? wait_for_concurrent_writes+0x170/0x170 [ 161.151004] ? generic_file_llseek_size+0x48/0x160 [ 161.151895] nfsd_readdir+0x132/0x190 [ 161.152606] ? nfsd4_encode_dirent_fattr+0x380/0x380 [ 161.153516] ? nfsd_unlink+0x380/0x380 [ 161.154256] ? override_creds+0x45/0x60 [ 161.155006] nfsd4_encode_readdir+0x21a/0x3d0 [ 161.155850] ? nfsd4_encode_readlink+0x210/0x210 [ 161.156731] ? write_bytes_to_xdr_buf+0x97/0xe0 [ 161.157598] ? __write_bytes_to_xdr_buf+0xd0/0xd0 [ 161.158494] ? lock_downgrade+0x90/0x90 [ 161.159232] ? nfs4svc_decode_voidarg+0x10/0x10 [ 161.160092] nfsd4_encode_operation+0x15a/0x440 [ 161.160959] nfsd4_proc_compound+0x718/0xe90 [ 161.161818] nfsd_dispatch+0x18e/0x2c0 [ 161.162586] svc_process_common+0x786/0xc50 [ 161.163403] ? nfsd_svc+0x380/0x380 [ 161.164137] ? svc_printk+0x160/0x160 [ 161.164846] ? svc_xprt_do_enqueue.part.0+0x365/0x380 [ 161.165808] ? nfsd_svc+0x380/0x380 [ 161.166523] ? rcu_is_watching+0x23/0x40 [ 161.167309] svc_process+0x1a5/0x200 [ 161.168019] nfsd+0x1f5/0x380 [ 161.168663] ? nfsd_shutdown_threads+0x260/0x260 [ 161.169554] kthread+0x1c4/0x210 [ 161.170224] ? kthread_insert_work_sanity_check+0x80/0x80 [ 161.171246] ret_from_fork+0x1f/0x30 Signed-off-by: Li Lingfeng <lilingfeng3(a)huawei.com> --- fs/nfsd/vfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 1f2a5b22b649..b3e51d88faff 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -101,6 +101,7 @@ nfserrno (int errno) { nfserr_io, -EUCLEAN }, { nfserr_perm, -ENOKEY }, { nfserr_no_grace, -ENOGRACE}, + { nfserr_io, -EBADMSG }, }; int i; -- 2.31.1
2 1
0 0
[PATCH v2 OLK-5.10 0/4] Some features and fixs for hbmdev and hbm cache
by Zhang Zekun 02 Sep '24

02 Sep '24
hbmdev and hbmcache new features and new fixs. v2: - Fix format warning Zhang Zekun (4): soc:hisilicon: Use _ON and _OFF in hbmcache hisilicon/hisi_hbmcache: Add a lock to prevent conrrency hisilicon/hisi_hbmdev: Add lock to prevent correnctly ACPI/HMAT: Add missing locality information for hot-added device drivers/acpi/acpi_memhotplug.c | 13 +++++++++++++ drivers/acpi/internal.h | 1 + drivers/acpi/numa/hmat.c | 17 +++++++++++++++++ drivers/soc/hisilicon/hisi_hbmcache.c | 20 +++++++++++++------- drivers/soc/hisilicon/hisi_hbmdev.c | 2 ++ 5 files changed, 46 insertions(+), 7 deletions(-) -- 2.17.1
2 5
0 0
[openeuler:OLK-5.10 26911/30000] drivers/ub/urma/ubcore/ubcore_umem.c:284:10: warning: no previous prototype for function 'ubcore_umem_find_best_page_size'
by kernel test robot 02 Sep '24

02 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 02994a9b68a17040658e1a32a4438a31ae6f273b commit: 5d130e2cfa3d2aaee4d10e18c075f6c3750600c5 [26911/30000] urma: upload kernel patch for 20240511_mig config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240902/202409021518.znzh3BK4-lkp@…) compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240902/202409021518.znzh3BK4-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/202409021518.znzh3BK4-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/ub/urma/ubcore/ubcore_umem.c:242:21: warning: no previous prototype for function 'ubcore_umem_get' [-Wmissing-prototypes] 242 | struct ubcore_umem *ubcore_umem_get(struct ubcore_device *dev, uint64_t va, | ^ drivers/ub/urma/ubcore/ubcore_umem.c:242:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 242 | struct ubcore_umem *ubcore_umem_get(struct ubcore_device *dev, uint64_t va, | ^ | static drivers/ub/urma/ubcore/ubcore_umem.c:260:6: warning: no previous prototype for function 'ubcore_umem_release' [-Wmissing-prototypes] 260 | void ubcore_umem_release(struct ubcore_umem *umem) | ^ drivers/ub/urma/ubcore/ubcore_umem.c:260:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 260 | void ubcore_umem_release(struct ubcore_umem *umem) | ^ | static >> drivers/ub/urma/ubcore/ubcore_umem.c:284:10: warning: no previous prototype for function 'ubcore_umem_find_best_page_size' [-Wmissing-prototypes] 284 | uint64_t ubcore_umem_find_best_page_size(struct ubcore_umem *umem, uint64_t page_size_bitmap, | ^ drivers/ub/urma/ubcore/ubcore_umem.c:284:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 284 | uint64_t ubcore_umem_find_best_page_size(struct ubcore_umem *umem, uint64_t page_size_bitmap, | ^ | static 3 warnings generated. -- drivers/ub/urma/ubcore/ubcore_netdev.c:41:25: warning: no previous prototype for function 'ubcore_lookup_sip_info_without_lock' [-Wmissing-prototypes] 41 | struct ubcore_sip_info *ubcore_lookup_sip_info_without_lock( | ^ drivers/ub/urma/ubcore/ubcore_netdev.c:41:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 41 | struct ubcore_sip_info *ubcore_lookup_sip_info_without_lock( | ^ | static drivers/ub/urma/ubcore/ubcore_netdev.c:75:5: warning: no previous prototype for function 'ubcore_notify_uvs_del_sip' [-Wmissing-prototypes] 75 | int ubcore_notify_uvs_del_sip(struct ubcore_device *dev, | ^ drivers/ub/urma/ubcore/ubcore_netdev.c:75:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 75 | int ubcore_notify_uvs_del_sip(struct ubcore_device *dev, | ^ | static drivers/ub/urma/ubcore/ubcore_netdev.c:113:22: warning: no previous prototype for function 'ubcore_new_sip_req_msg' [-Wmissing-prototypes] 113 | struct ubcore_nlmsg *ubcore_new_sip_req_msg(struct ubcore_device *dev, | ^ drivers/ub/urma/ubcore/ubcore_netdev.c:113:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 113 | struct ubcore_nlmsg *ubcore_new_sip_req_msg(struct ubcore_device *dev, | ^ | static drivers/ub/urma/ubcore/ubcore_netdev.c:145:5: warning: no previous prototype for function 'ubcore_notify_uvs_add_sip' [-Wmissing-prototypes] 145 | int ubcore_notify_uvs_add_sip(struct ubcore_device *dev, | ^ drivers/ub/urma/ubcore/ubcore_netdev.c:145:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 145 | int ubcore_notify_uvs_add_sip(struct ubcore_device *dev, | ^ | static drivers/ub/urma/ubcore/ubcore_netdev.c:177:5: warning: no previous prototype for function 'ubcore_check_port_state' [-Wmissing-prototypes] 177 | int ubcore_check_port_state(struct ubcore_device *dev) | ^ drivers/ub/urma/ubcore/ubcore_netdev.c:177:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 177 | int ubcore_check_port_state(struct ubcore_device *dev) | ^ | static >> drivers/ub/urma/ubcore/ubcore_netdev.c:204:6: warning: no previous prototype for function 'ubcore_fill_port_netdev' [-Wmissing-prototypes] 204 | void ubcore_fill_port_netdev(struct ubcore_device *dev, | ^ drivers/ub/urma/ubcore/ubcore_netdev.c:204:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 204 | void ubcore_fill_port_netdev(struct ubcore_device *dev, | ^ | static drivers/ub/urma/ubcore/ubcore_netdev.c:268:5: warning: no previous prototype for function 'ubcore_set_port_netdev' [-Wmissing-prototypes] 268 | int ubcore_set_port_netdev(struct ubcore_device *dev, struct net_device *ndev, | ^ drivers/ub/urma/ubcore/ubcore_netdev.c:268:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 268 | int ubcore_set_port_netdev(struct ubcore_device *dev, struct net_device *ndev, | ^ | static drivers/ub/urma/ubcore/ubcore_netdev.c:353:5: warning: no previous prototype for function 'ubcore_unset_port_netdev' [-Wmissing-prototypes] 353 | int ubcore_unset_port_netdev(struct ubcore_device *dev, struct net_device *ndev, | ^ drivers/ub/urma/ubcore/ubcore_netdev.c:353:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 353 | int ubcore_unset_port_netdev(struct ubcore_device *dev, struct net_device *ndev, | ^ | static drivers/ub/urma/ubcore/ubcore_netdev.c:385:6: warning: no previous prototype for function 'ubcore_put_port_netdev' [-Wmissing-prototypes] 385 | void ubcore_put_port_netdev(struct ubcore_device *dev) | ^ drivers/ub/urma/ubcore/ubcore_netdev.c:385:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 385 | void ubcore_put_port_netdev(struct ubcore_device *dev) | ^ | static drivers/ub/urma/ubcore/ubcore_netdev.c:412:5: warning: no previous prototype for function 'ubcore_sip_table_init' [-Wmissing-prototypes] 412 | int ubcore_sip_table_init(struct ubcore_sip_table *sip_table, uint32_t size) | ^ drivers/ub/urma/ubcore/ubcore_netdev.c:412:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 412 | int ubcore_sip_table_init(struct ubcore_sip_table *sip_table, uint32_t size) | ^ | static drivers/ub/urma/ubcore/ubcore_netdev.c:431:6: warning: no previous prototype for function 'ubcore_sip_table_uninit' [-Wmissing-prototypes] 431 | void ubcore_sip_table_uninit(struct ubcore_sip_table *sip_table) | ^ drivers/ub/urma/ubcore/ubcore_netdev.c:431:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 431 | void ubcore_sip_table_uninit(struct ubcore_sip_table *sip_table) | ^ | static drivers/ub/urma/ubcore/ubcore_netdev.c:442:5: warning: no previous prototype for function 'ubcore_sip_idx_alloc' [-Wmissing-prototypes] 442 | int ubcore_sip_idx_alloc(struct ubcore_sip_table *sip_table) | ^ drivers/ub/urma/ubcore/ubcore_netdev.c:442:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 442 | int ubcore_sip_idx_alloc(struct ubcore_sip_table *sip_table) | ^ | static drivers/ub/urma/ubcore/ubcore_netdev.c:458:5: warning: no previous prototype for function 'ubcore_sip_idx_free' [-Wmissing-prototypes] 458 | int ubcore_sip_idx_free(struct ubcore_sip_table *sip_table, uint32_t idx) | ^ drivers/ub/urma/ubcore/ubcore_netdev.c:458:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 458 | int ubcore_sip_idx_free(struct ubcore_sip_table *sip_table, uint32_t idx) | ^ | static drivers/ub/urma/ubcore/ubcore_netdev.c:471:5: warning: no previous prototype for function 'ubcore_add_sip_entry' [-Wmissing-prototypes] 471 | int ubcore_add_sip_entry(struct ubcore_sip_table *sip_table, const struct ubcore_sip_info *sip, | ^ drivers/ub/urma/ubcore/ubcore_netdev.c:471:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 471 | int ubcore_add_sip_entry(struct ubcore_sip_table *sip_table, const struct ubcore_sip_info *sip, | ^ | static drivers/ub/urma/ubcore/ubcore_netdev.c:489:5: warning: no previous prototype for function 'ubcore_del_sip_entry' [-Wmissing-prototypes] 489 | int ubcore_del_sip_entry(struct ubcore_sip_table *sip_table, uint32_t idx) | ^ drivers/ub/urma/ubcore/ubcore_netdev.c:489:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 489 | int ubcore_del_sip_entry(struct ubcore_sip_table *sip_table, uint32_t idx) | ^ | static >> drivers/ub/urma/ubcore/ubcore_netdev.c:519:5: warning: no previous prototype for function 'ubcore_update_sip_entry' [-Wmissing-prototypes] 519 | int ubcore_update_sip_entry(struct ubcore_sip_table *sip_table, struct ubcore_sip_info *new_sip, | ^ drivers/ub/urma/ubcore/ubcore_netdev.c:519:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 519 | int ubcore_update_sip_entry(struct ubcore_sip_table *sip_table, struct ubcore_sip_info *new_sip, | ^ | static drivers/ub/urma/ubcore/ubcore_netdev.c:548:5: warning: no previous prototype for function 'ubcore_lookup_sip_idx' [-Wmissing-prototypes] 548 | int ubcore_lookup_sip_idx(struct ubcore_sip_table *sip_table, struct ubcore_sip_info *sip, | ^ drivers/ub/urma/ubcore/ubcore_netdev.c:548:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 548 | int ubcore_lookup_sip_idx(struct ubcore_sip_table *sip_table, struct ubcore_sip_info *sip, | ^ | static 17 warnings generated. -- >> drivers/ub/urma/ubcore/ubcore_tpg.c:85:6: warning: no previous prototype for function 'ubcore_tpg_kref_get' [-Wmissing-prototypes] 85 | void ubcore_tpg_kref_get(struct ubcore_tpg *tpg) | ^ drivers/ub/urma/ubcore/ubcore_tpg.c:85:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 85 | void ubcore_tpg_kref_get(struct ubcore_tpg *tpg) | ^ | static drivers/ub/urma/ubcore/ubcore_tpg.c:100:30: warning: comparison of address of 'dev->ht[UBCORE_HT_TPG].head' equal to a null pointer is always false [-Wtautological-pointer-compare] 100 | if (&dev->ht[UBCORE_HT_TPG].head == NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~^~~~ ~~~~ >> drivers/ub/urma/ubcore/ubcore_tpg.c:131:29: warning: comparison of address of 'dev->ht[UBCORE_HT_TP].head' equal to a null pointer is always false [-Wtautological-pointer-compare] 131 | if (&dev->ht[UBCORE_HT_TP].head == NULL) { | ~~~~~~~~~~~~~~~~~~~~~~^~~~ ~~~~ 3 warnings generated. -- >> drivers/ub/urma/uburma/uburma_mmap.c:29:6: warning: no previous prototype for function 'uburma_umap_priv_init' [-Wmissing-prototypes] 29 | void uburma_umap_priv_init(struct uburma_umap_priv *priv, | ^ drivers/ub/urma/uburma/uburma_mmap.c:29:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 29 | void uburma_umap_priv_init(struct uburma_umap_priv *priv, | ^ | static >> drivers/ub/urma/uburma/uburma_mmap.c:42:6: warning: no previous prototype for function 'uburma_unmap_vma_pages' [-Wmissing-prototypes] 42 | void uburma_unmap_vma_pages(struct uburma_file *ufile) | ^ drivers/ub/urma/uburma/uburma_mmap.c:42:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 42 | void uburma_unmap_vma_pages(struct uburma_file *ufile) | ^ | static >> drivers/ub/urma/uburma/uburma_mmap.c:157:36: warning: no previous prototype for function 'uburma_get_umap_ops' [-Wmissing-prototypes] 157 | const struct vm_operations_struct *uburma_get_umap_ops(void) | ^ drivers/ub/urma/uburma/uburma_mmap.c:157:7: note: declare 'static' if the function is not intended to be used outside of this translation unit 157 | const struct vm_operations_struct *uburma_get_umap_ops(void) | ^ | static 3 warnings generated. vim +/ubcore_umem_find_best_page_size +284 drivers/ub/urma/ubcore/ubcore_umem.c 259 > 260 void ubcore_umem_release(struct ubcore_umem *umem) 261 { 262 uint64_t npages; 263 264 if (IS_ERR_OR_NULL(umem) || umem->ub_dev == NULL || umem->owning_mm == NULL) { 265 ubcore_log_err("Invalid parameter.\n"); 266 return; 267 } 268 269 if (((umem->va + umem->length) < umem->va) || 270 PAGE_ALIGN(umem->va + umem->length) < (umem->va + umem->length)) { 271 ubcore_log_err("Invalid parameter, va or len is invalid.\n"); 272 return; 273 } 274 275 npages = umem_cal_npages(umem->va, umem->length); 276 dma_unmap_sg(umem->ub_dev->dma_dev, umem->sg_head.sgl, (int)umem->nmap, DMA_BIDIRECTIONAL); 277 umem_free_sgt(umem); 278 umem_atomic_sub(npages, umem->owning_mm); 279 mmdrop(umem->owning_mm); 280 kfree(umem); 281 } 282 EXPORT_SYMBOL(ubcore_umem_release); 283 > 284 uint64_t ubcore_umem_find_best_page_size(struct ubcore_umem *umem, uint64_t page_size_bitmap, -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH openEuler-1.0-LTS] jbd2: avoid mount failed when commit block is partial submitted
by Baokun Li 02 Sep '24

02 Sep '24
From: Ye Bin <yebin10(a)huawei.com> mainline inclusion from mainline-v6.11-rc1 commit 0bab8db4152c4a2185a1367db09cc402bdc62d5e category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IAJ5DD CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- We encountered a problem that the file system could not be mounted in the power-off scenario. The analysis of the file system mirror shows that only part of the data is written to the last commit block. The valid data of the commit block is concentrated in the first sector. However, the data of the entire block is involved in the checksum calculation. For different hardware, the minimum atomic unit may be different. If the checksum of a committed block is incorrect, clear the data except the 'commit_header' and then calculate the checksum. If the checkusm is correct, it is considered that the block is partially committed, Then continue to replay journal. Signed-off-by: Ye Bin <yebin10(a)huawei.com> Reviewed-by: Jan Kara <jack(a)suse.cz> Link: https://patch.msgid.link/20240620072405.3533701-1-yebin@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso(a)mit.edu> Conflicts: fs/jbd2/recovery.c [There is a context conflict because commit a20d1cebb98b ("jbd2: fix portability problems caused by unaligned accesses") is not merged.] Signed-off-by: Baokun Li <libaokun1(a)huawei.com> --- fs/jbd2/recovery.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c index 55f89fcee666..3aa91c8bf8d2 100644 --- a/fs/jbd2/recovery.c +++ b/fs/jbd2/recovery.c @@ -401,6 +401,27 @@ static int jbd2_commit_block_csum_verify(journal_t *j, void *buf) return provided == cpu_to_be32(calculated); } +static bool jbd2_commit_block_csum_verify_partial(journal_t *j, void *buf) +{ + struct commit_header *h; + __be32 provided; + __u32 calculated; + void *tmpbuf; + + tmpbuf = kzalloc(j->j_blocksize, GFP_KERNEL); + if (!tmpbuf) + return false; + + memcpy(tmpbuf, buf, sizeof(struct commit_header)); + h = tmpbuf; + provided = h->h_chksum[0]; + h->h_chksum[0] = 0; + calculated = jbd2_chksum(j, j->j_csum_seed, tmpbuf, j->j_blocksize); + kfree(tmpbuf); + + return provided == cpu_to_be32(calculated); +} + static int jbd2_block_tag_csum_verify(journal_t *j, journal_block_tag_t *tag, void *buf, __u32 sequence) { @@ -768,6 +789,13 @@ static int do_one_pass(journal_t *journal, if (pass == PASS_SCAN && !jbd2_commit_block_csum_verify(journal, bh->b_data)) { + if (jbd2_commit_block_csum_verify_partial( + journal, + bh->b_data)) { + pr_notice("JBD2: Find incomplete commit block in transaction %u block %lu\n", + next_commit_ID, next_log_block); + goto chksum_ok; + } chksum_error: if (commit_time < last_trans_commit_time) goto ignore_crc_mismatch; @@ -780,8 +808,10 @@ static int do_one_pass(journal_t *journal, break; } } - if (pass == PASS_SCAN) + if (pass == PASS_SCAN) { + chksum_ok: last_trans_commit_time = commit_time; + } brelse(bh); next_commit_ID++; continue; @@ -798,6 +828,7 @@ static int do_one_pass(journal_t *journal, next_log_block); need_check_commit_time = true; } + /* If we aren't in the REVOKE pass, then we can * just skip over this block. */ if (pass != PASS_REVOKE) { -- 2.31.1
2 1
0 0
[PATCH openEuler-22.03-LTS-SP1] jbd2: avoid mount failed when commit block is partial submitted
by Baokun Li 02 Sep '24

02 Sep '24
From: Ye Bin <yebin10(a)huawei.com> mainline inclusion from mainline-v6.11-rc1 commit 0bab8db4152c4a2185a1367db09cc402bdc62d5e category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IAJ5DD Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- We encountered a problem that the file system could not be mounted in the power-off scenario. The analysis of the file system mirror shows that only part of the data is written to the last commit block. The valid data of the commit block is concentrated in the first sector. However, the data of the entire block is involved in the checksum calculation. For different hardware, the minimum atomic unit may be different. If the checksum of a committed block is incorrect, clear the data except the 'commit_header' and then calculate the checksum. If the checkusm is correct, it is considered that the block is partially committed, Then continue to replay journal. Signed-off-by: Ye Bin <yebin10(a)huawei.com> Reviewed-by: Jan Kara <jack(a)suse.cz> Link: https://patch.msgid.link/20240620072405.3533701-1-yebin@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso(a)mit.edu> Conflicts: fs/jbd2/recovery.c [There is a context conflict because commit a20d1cebb98b ("jbd2: fix portability problems caused by unaligned accesses") is not merged.] Signed-off-by: Baokun Li <libaokun1(a)huawei.com> --- fs/jbd2/recovery.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c index cdf4c553f058..6301badc8cbd 100644 --- a/fs/jbd2/recovery.c +++ b/fs/jbd2/recovery.c @@ -446,6 +446,27 @@ static int jbd2_commit_block_csum_verify(journal_t *j, void *buf) return provided == cpu_to_be32(calculated); } +static bool jbd2_commit_block_csum_verify_partial(journal_t *j, void *buf) +{ + struct commit_header *h; + __be32 provided; + __u32 calculated; + void *tmpbuf; + + tmpbuf = kzalloc(j->j_blocksize, GFP_KERNEL); + if (!tmpbuf) + return false; + + memcpy(tmpbuf, buf, sizeof(struct commit_header)); + h = tmpbuf; + provided = h->h_chksum[0]; + h->h_chksum[0] = 0; + calculated = jbd2_chksum(j, j->j_csum_seed, tmpbuf, j->j_blocksize); + kfree(tmpbuf); + + return provided == cpu_to_be32(calculated); +} + static int jbd2_block_tag_csum_verify(journal_t *j, journal_block_tag_t *tag, void *buf, __u32 sequence) { @@ -814,6 +835,13 @@ static int do_one_pass(journal_t *journal, if (pass == PASS_SCAN && !jbd2_commit_block_csum_verify(journal, bh->b_data)) { + if (jbd2_commit_block_csum_verify_partial( + journal, + bh->b_data)) { + pr_notice("JBD2: Find incomplete commit block in transaction %u block %lu\n", + next_commit_ID, next_log_block); + goto chksum_ok; + } chksum_error: if (commit_time < last_trans_commit_time) goto ignore_crc_mismatch; @@ -826,8 +854,10 @@ static int do_one_pass(journal_t *journal, break; } } - if (pass == PASS_SCAN) + if (pass == PASS_SCAN) { + chksum_ok: last_trans_commit_time = commit_time; + } brelse(bh); next_commit_ID++; continue; @@ -844,6 +874,7 @@ static int do_one_pass(journal_t *journal, next_log_block); need_check_commit_time = true; } + /* If we aren't in the REVOKE pass, then we can * just skip over this block. */ if (pass != PASS_REVOKE) { -- 2.31.1
2 1
0 0
[PATCH openEuler-22.03-LTS-SP1] dma: fix call order in dmam_free_coherent
by Kaixiong Yu 02 Sep '24

02 Sep '24
From: Lance Richardson <rlance(a)google.com> stable inclusion from stable-v6.6.44 commit 1fe97f68fce1ba24bf823bfb0eb0956003473130 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAKQ2W CVE: CVE-2024-43856 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit 28e8b7406d3a1f5329a03aa25a43aa28e087cb20 ] dmam_free_coherent() frees a DMA allocation, which makes the freed vaddr available for reuse, then calls devres_destroy() to remove and free the data structure used to track the DMA allocation. Between the two calls, it is possible for a concurrent task to make an allocation with the same vaddr and add it to the devres list. If this happens, there will be two entries in the devres list with the same vaddr and devres_destroy() can free the wrong entry, triggering the WARN_ON() in dmam_match. Fix by destroying the devres entry before freeing the DMA allocation. Tested: kokonut //net/encryption http://sponge2/b9145fe6-0f72-4325-ac2f-a84d81075b03 Fixes: 9ac7849e35f7 ("devres: device resource management") Signed-off-by: Lance Richardson <rlance(a)google.com> Signed-off-by: Christoph Hellwig <hch(a)lst.de> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Kaixiong Yu <yukaixiong(a)huawei.com> --- kernel/dma/mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/dma/mapping.c b/kernel/dma/mapping.c index 51bb8fa8eb89..453c0fbe87ff 100644 --- a/kernel/dma/mapping.c +++ b/kernel/dma/mapping.c @@ -60,8 +60,8 @@ void dmam_free_coherent(struct device *dev, size_t size, void *vaddr, { struct dma_devres match_data = { size, vaddr, dma_handle }; - dma_free_coherent(dev, size, vaddr, dma_handle); WARN_ON(devres_destroy(dev, dmam_release, dmam_match, &match_data)); + dma_free_coherent(dev, size, vaddr, dma_handle); } EXPORT_SYMBOL(dmam_free_coherent); -- 2.25.1
2 1
0 0
[PATCH OLK-5.10] jbd2: avoid mount failed when commit block is partial submitted
by Baokun Li 02 Sep '24

02 Sep '24
From: Ye Bin <yebin10(a)huawei.com> mainline inclusion from mainline-v6.11-rc1 commit 0bab8db4152c4a2185a1367db09cc402bdc62d5e category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IAJ5DD Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- We encountered a problem that the file system could not be mounted in the power-off scenario. The analysis of the file system mirror shows that only part of the data is written to the last commit block. The valid data of the commit block is concentrated in the first sector. However, the data of the entire block is involved in the checksum calculation. For different hardware, the minimum atomic unit may be different. If the checksum of a committed block is incorrect, clear the data except the 'commit_header' and then calculate the checksum. If the checkusm is correct, it is considered that the block is partially committed, Then continue to replay journal. Signed-off-by: Ye Bin <yebin10(a)huawei.com> Reviewed-by: Jan Kara <jack(a)suse.cz> Link: https://patch.msgid.link/20240620072405.3533701-1-yebin@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso(a)mit.edu> Conflicts: fs/jbd2/recovery.c [There is a context conflict because commit a20d1cebb98b ("jbd2: fix portability problems caused by unaligned accesses") is not merged.] Signed-off-by: Baokun Li <libaokun1(a)huawei.com> --- fs/jbd2/recovery.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c index cdf4c553f058..6301badc8cbd 100644 --- a/fs/jbd2/recovery.c +++ b/fs/jbd2/recovery.c @@ -446,6 +446,27 @@ static int jbd2_commit_block_csum_verify(journal_t *j, void *buf) return provided == cpu_to_be32(calculated); } +static bool jbd2_commit_block_csum_verify_partial(journal_t *j, void *buf) +{ + struct commit_header *h; + __be32 provided; + __u32 calculated; + void *tmpbuf; + + tmpbuf = kzalloc(j->j_blocksize, GFP_KERNEL); + if (!tmpbuf) + return false; + + memcpy(tmpbuf, buf, sizeof(struct commit_header)); + h = tmpbuf; + provided = h->h_chksum[0]; + h->h_chksum[0] = 0; + calculated = jbd2_chksum(j, j->j_csum_seed, tmpbuf, j->j_blocksize); + kfree(tmpbuf); + + return provided == cpu_to_be32(calculated); +} + static int jbd2_block_tag_csum_verify(journal_t *j, journal_block_tag_t *tag, void *buf, __u32 sequence) { @@ -814,6 +835,13 @@ static int do_one_pass(journal_t *journal, if (pass == PASS_SCAN && !jbd2_commit_block_csum_verify(journal, bh->b_data)) { + if (jbd2_commit_block_csum_verify_partial( + journal, + bh->b_data)) { + pr_notice("JBD2: Find incomplete commit block in transaction %u block %lu\n", + next_commit_ID, next_log_block); + goto chksum_ok; + } chksum_error: if (commit_time < last_trans_commit_time) goto ignore_crc_mismatch; @@ -826,8 +854,10 @@ static int do_one_pass(journal_t *journal, break; } } - if (pass == PASS_SCAN) + if (pass == PASS_SCAN) { + chksum_ok: last_trans_commit_time = commit_time; + } brelse(bh); next_commit_ID++; continue; @@ -844,6 +874,7 @@ static int do_one_pass(journal_t *journal, next_log_block); need_check_commit_time = true; } + /* If we aren't in the REVOKE pass, then we can * just skip over this block. */ if (pass != PASS_REVOKE) { -- 2.31.1
2 1
0 0
[PATCH OLK-5.10 0/4] Some features and fixs for hbmdev and hbm cache
by Zhang Zekun 02 Sep '24

02 Sep '24
hbmdev and hbmcache new features and new fixs. Zhang Zekun (3): hisilicon/hisi_hbmcache: Add a lock to prevent conrrency hisilicon/hisi_hbmdev: Add lock to prevent correnctly ACPI/HMAT: Add missing locality information for hot-added device z00652016 (1): soc:hisilicon: Use _ON and _OFF in hbmcache drivers/acpi/acpi_memhotplug.c | 12 ++++++++++++ drivers/acpi/internal.h | 1 + drivers/acpi/numa/hmat.c | 17 +++++++++++++++++ drivers/soc/hisilicon/hisi_hbmcache.c | 20 +++++++++++++------- drivers/soc/hisilicon/hisi_hbmdev.c | 2 ++ 5 files changed, 45 insertions(+), 7 deletions(-) -- 2.17.1
2 5
0 0
[PATCH OLK-6.6] jbd2: avoid mount failed when commit block is partial submitted
by Baokun Li 02 Sep '24

02 Sep '24
From: Ye Bin <yebin10(a)huawei.com> mainline inclusion from mainline-v6.11-rc1 commit 0bab8db4152c4a2185a1367db09cc402bdc62d5e category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IAJ5DD Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- We encountered a problem that the file system could not be mounted in the power-off scenario. The analysis of the file system mirror shows that only part of the data is written to the last commit block. The valid data of the commit block is concentrated in the first sector. However, the data of the entire block is involved in the checksum calculation. For different hardware, the minimum atomic unit may be different. If the checksum of a committed block is incorrect, clear the data except the 'commit_header' and then calculate the checksum. If the checkusm is correct, it is considered that the block is partially committed, Then continue to replay journal. Signed-off-by: Ye Bin <yebin10(a)huawei.com> Reviewed-by: Jan Kara <jack(a)suse.cz> Link: https://patch.msgid.link/20240620072405.3533701-1-yebin@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso(a)mit.edu> Signed-off-by: Baokun Li <libaokun1(a)huawei.com> --- fs/jbd2/recovery.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c index 5b771a3d8d9a..421c0d360836 100644 --- a/fs/jbd2/recovery.c +++ b/fs/jbd2/recovery.c @@ -448,6 +448,27 @@ static int jbd2_commit_block_csum_verify(journal_t *j, void *buf) return provided == cpu_to_be32(calculated); } +static bool jbd2_commit_block_csum_verify_partial(journal_t *j, void *buf) +{ + struct commit_header *h; + __be32 provided; + __u32 calculated; + void *tmpbuf; + + tmpbuf = kzalloc(j->j_blocksize, GFP_KERNEL); + if (!tmpbuf) + return false; + + memcpy(tmpbuf, buf, sizeof(struct commit_header)); + h = tmpbuf; + provided = h->h_chksum[0]; + h->h_chksum[0] = 0; + calculated = jbd2_chksum(j, j->j_csum_seed, tmpbuf, j->j_blocksize); + kfree(tmpbuf); + + return provided == cpu_to_be32(calculated); +} + static int jbd2_block_tag_csum_verify(journal_t *j, journal_block_tag_t *tag, journal_block_tag3_t *tag3, void *buf, __u32 sequence) @@ -814,6 +835,13 @@ static int do_one_pass(journal_t *journal, if (pass == PASS_SCAN && !jbd2_commit_block_csum_verify(journal, bh->b_data)) { + if (jbd2_commit_block_csum_verify_partial( + journal, + bh->b_data)) { + pr_notice("JBD2: Find incomplete commit block in transaction %u block %lu\n", + next_commit_ID, next_log_block); + goto chksum_ok; + } chksum_error: if (commit_time < last_trans_commit_time) goto ignore_crc_mismatch; @@ -828,6 +856,7 @@ static int do_one_pass(journal_t *journal, } } if (pass == PASS_SCAN) { + chksum_ok: last_trans_commit_time = commit_time; head_block = next_log_block; } @@ -847,6 +876,7 @@ static int do_one_pass(journal_t *journal, next_log_block); need_check_commit_time = true; } + /* If we aren't in the REVOKE pass, then we can * just skip over this block. */ if (pass != PASS_REVOKE) { -- 2.31.1
2 1
0 0
  • ← Newer
  • 1
  • ...
  • 690
  • 691
  • 692
  • 693
  • 694
  • 695
  • 696
  • ...
  • 1921
  • Older →

HyperKitty Powered by HyperKitty