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

  • 6 participants
  • 20978 discussions
[openeuler:OLK-6.6 3075/3075] drivers/ub/ubus/ubus_config.c:191:6: warning: no previous prototype for function 'ub_sync_cfg_rsp_handle'
by kernel test robot 02 Nov '25

02 Nov '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 6a5b2f9a14178b13fe5efc52ba6575f5294c1270 commit: 280895301d3bc3507606cbd2e3cdccba75a8dcdc [3075/3075] ub:ubus: Support Ubus read/write configuration functions config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20251102/202511020347.upGDrs6j-lkp@…) compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251102/202511020347.upGDrs6j-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/202511020347.upGDrs6j-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/ub/ubus/ubus_config.c:191:6: warning: no previous prototype for function 'ub_sync_cfg_rsp_handle' [-Wmissing-prototypes] 191 | void ub_sync_cfg_rsp_handle(struct cfg_msg_pld_rsp *rsp, u8 size, | ^ drivers/ub/ubus/ubus_config.c:191:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 191 | void ub_sync_cfg_rsp_handle(struct cfg_msg_pld_rsp *rsp, u8 size, | ^ | static >> drivers/ub/ubus/ubus_config.c:310:5: warning: no previous prototype for function '__ub_cfg_read_byte' [-Wmissing-prototypes] 310 | int __ub_cfg_read_byte(struct ub_entity *uent, u64 pos, u8 *val) | ^ drivers/ub/ubus/ubus_config.c:310:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 310 | int __ub_cfg_read_byte(struct ub_entity *uent, u64 pos, u8 *val) | ^ | static >> drivers/ub/ubus/ubus_config.c:320:5: warning: no previous prototype for function '__ub_cfg_read_word' [-Wmissing-prototypes] 320 | int __ub_cfg_read_word(struct ub_entity *uent, u64 pos, u16 *val) | ^ drivers/ub/ubus/ubus_config.c:320:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 320 | int __ub_cfg_read_word(struct ub_entity *uent, u64 pos, u16 *val) | ^ | static >> drivers/ub/ubus/ubus_config.c:330:5: warning: no previous prototype for function '__ub_cfg_read_dword' [-Wmissing-prototypes] 330 | int __ub_cfg_read_dword(struct ub_entity *uent, u64 pos, u32 *val) | ^ drivers/ub/ubus/ubus_config.c:330:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 330 | int __ub_cfg_read_dword(struct ub_entity *uent, u64 pos, u32 *val) | ^ | static >> drivers/ub/ubus/ubus_config.c:340:5: warning: no previous prototype for function '__ub_cfg_write_byte' [-Wmissing-prototypes] 340 | int __ub_cfg_write_byte(struct ub_entity *uent, u64 pos, u8 val) | ^ drivers/ub/ubus/ubus_config.c:340:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 340 | int __ub_cfg_write_byte(struct ub_entity *uent, u64 pos, u8 val) | ^ | static >> drivers/ub/ubus/ubus_config.c:350:5: warning: no previous prototype for function '__ub_cfg_write_word' [-Wmissing-prototypes] 350 | int __ub_cfg_write_word(struct ub_entity *uent, u64 pos, u16 val) | ^ drivers/ub/ubus/ubus_config.c:350:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 350 | int __ub_cfg_write_word(struct ub_entity *uent, u64 pos, u16 val) | ^ | static >> drivers/ub/ubus/ubus_config.c:360:5: warning: no previous prototype for function '__ub_cfg_write_dword' [-Wmissing-prototypes] 360 | int __ub_cfg_write_dword(struct ub_entity *uent, u64 pos, u32 val) | ^ drivers/ub/ubus/ubus_config.c:360:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 360 | int __ub_cfg_write_dword(struct ub_entity *uent, u64 pos, u32 val) | ^ | static 7 warnings generated. vim +/ub_sync_cfg_rsp_handle +191 drivers/ub/ubus/ubus_config.c 190 > 191 void ub_sync_cfg_rsp_handle(struct cfg_msg_pld_rsp *rsp, u8 size, 192 u64 pos, bool write, u32 *val) 193 { 194 #define UB_CFG_REG_SIZE 4 195 u8 pos_in_reg = pos % UB_CFG_REG_SIZE; 196 u32 read_data; 197 198 if (!write) { 199 read_data = rsp->read_data >> (pos_in_reg * BITS_PER_BYTE); 200 if (size == sizeof(u8)) 201 *(u8 *)val = read_data; 202 else if (size == sizeof(u16)) 203 *(u16 *)val = read_data; 204 else 205 *val = read_data; 206 } 207 } 208 209 static u8 gen_cfg_sub_msg_code(bool is_write, u64 pos) 210 { 211 if (pos >= UB_CFG1_BASIC_SLICE && pos < UB_PORT_SLICE_START) 212 return is_write ? UB_CFG1_WRITE : UB_CFG1_READ; 213 else 214 return is_write ? UB_CFG0_WRITE : UB_CFG0_READ; 215 } 216 217 static void ub_msg_pkt_req_init(struct ub_entity *uent, u8 size, u64 pos, u32 *val, 218 struct cfg_msg_pld_req *req) 219 { 220 u8 bt_mask = ub_cfg_param[size >> 1].byte_mask; 221 222 if (val) { 223 if (size == sizeof(u8)) 224 req->write_data = *(u8 *)val; 225 else if (size == sizeof(u16)) 226 req->write_data = *(u16 *)val; 227 else 228 req->write_data = *val; 229 req->write_data <<= ((pos % sizeof(u32)) * BITS_PER_BYTE); 230 } 231 232 req->byte_enable = bt_mask << (u8)(pos % sizeof(u32)); 233 req->entity_idx = uent->entity_idx; 234 /* The address is in four bytes. */ 235 req->req_addr = pos / sizeof(u32); 236 } 237 238 static int ub_sync_cfg(struct ub_entity *uent, u8 size, u64 pos, bool iswrite, 239 u32 *val) 240 { 241 struct cfg_msg_req_pkt req_pkt = {}; 242 struct cfg_msg_rsp_pkt rsp_pkt = {}; 243 struct msg_info info = {}; 244 u8 sub_msg_code; 245 int ret; 246 247 if (!pos_size_valid(pos, size)) { 248 ub_err(uent, "pos or size invalid, pos=%#llx, size=%#x\n", pos, 249 size); 250 return -EINVAL; 251 } 252 253 if (!iswrite) 254 memset(val, 0xFF, size); 255 256 sub_msg_code = gen_cfg_sub_msg_code(iswrite, pos); 257 ub_msg_pkt_header_init(&req_pkt.header, uent, CFG_MSG_PLD_SIZE, 258 code_gen(UB_MSG_CODE_CFG, sub_msg_code, 259 MSG_REQ), false); 260 261 ub_msg_pkt_req_init(uent, size, pos, (iswrite ? val : NULL), 262 &req_pkt.req_payload); 263 264 message_info_init(&info, uent, &req_pkt, &rsp_pkt, 265 (MSG_CFG_PKT_SIZE << MSG_REQ_SIZE_OFFSET) | 266 MSG_CFG_PKT_SIZE); 267 ret = message_sync_request(uent->message->mdev, &info, 268 req_pkt.header.msgetah.code); 269 if (ret) 270 return ret; 271 272 ret = ub_sync_cfg_rsp_check(uent, &req_pkt, &rsp_pkt); 273 if (!ret) 274 ub_sync_cfg_rsp_handle(&rsp_pkt.rsp_payload, size, pos, iswrite, val); 275 276 return ret; 277 } 278 279 int ub_send_cfg(struct ub_entity *uent, u8 size, u64 pos, u32 *val) 280 { 281 struct cfg_msg_req_pkt req_pkt = {}; 282 struct msg_info info = {}; 283 u8 sub_msg_code; 284 285 if (!uent || !uent->message || !uent->message->mdev) { 286 pr_err("uent or message or mdev is null\n"); 287 return -EINVAL; 288 } 289 290 if (!pos_size_valid(pos, size)) { 291 pr_err("pos or size invalid, pos=%#llx, size=%u\n", pos, size); 292 return -EINVAL; 293 } 294 295 sub_msg_code = gen_cfg_sub_msg_code(true, pos); 296 ub_msg_pkt_header_init(&req_pkt.header, uent, CFG_MSG_PLD_SIZE, 297 code_gen(UB_MSG_CODE_CFG, sub_msg_code, 298 MSG_REQ), false); 299 300 ub_msg_pkt_req_init(uent, size, pos, val, 301 &req_pkt.req_payload); 302 303 message_info_init(&info, uent, &req_pkt, NULL, 304 (MSG_CFG_PKT_SIZE << MSG_REQ_SIZE_OFFSET) | 305 MSG_CFG_PKT_SIZE); 306 return message_send(uent->message->mdev, &info, 307 req_pkt.header.msgetah.code); 308 } 309 > 310 int __ub_cfg_read_byte(struct ub_entity *uent, u64 pos, u8 *val) 311 { 312 if (!uent || !uent->message || !uent->message->mdev || !val) { 313 pr_err("uent or message or mdev is null\n"); 314 return -EINVAL; 315 } 316 317 return ub_sync_cfg(uent, (u8)sizeof(u8), pos, false, (u32 *)val); 318 } 319 > 320 int __ub_cfg_read_word(struct ub_entity *uent, u64 pos, u16 *val) 321 { 322 if (!uent || !uent->message || !uent->message->mdev || !val) { 323 pr_err("uent or message or mdev is null\n"); 324 return -EINVAL; 325 } 326 327 return ub_sync_cfg(uent, (u8)sizeof(u16), pos, false, (u32 *)val); 328 } 329 > 330 int __ub_cfg_read_dword(struct ub_entity *uent, u64 pos, u32 *val) 331 { 332 if (!uent || !uent->message || !uent->message->mdev || !val) { 333 pr_err("uent or message or mdev is null\n"); 334 return -EINVAL; 335 } 336 337 return ub_sync_cfg(uent, (u8)sizeof(u32), pos, false, val); 338 } 339 > 340 int __ub_cfg_write_byte(struct ub_entity *uent, u64 pos, u8 val) 341 { 342 if (!uent || !uent->message || !uent->message->mdev) { 343 pr_err("uent or message or mdev is null\n"); 344 return -EINVAL; 345 } 346 347 return ub_sync_cfg(uent, (u8)sizeof(u8), pos, true, (u32 *)&val); 348 } 349 > 350 int __ub_cfg_write_word(struct ub_entity *uent, u64 pos, u16 val) 351 { 352 if (!uent || !uent->message || !uent->message->mdev) { 353 pr_err("uent or message or mdev is null\n"); 354 return -EINVAL; 355 } 356 357 return ub_sync_cfg(uent, (u8)sizeof(u16), pos, true, (u32 *)&val); 358 } 359 > 360 int __ub_cfg_write_dword(struct ub_entity *uent, u64 pos, u32 val) 361 { 362 if (!uent || !uent->message || !uent->message->mdev) { 363 pr_err("uent or message or mdev is null\n"); 364 return -EINVAL; 365 } 366 367 return ub_sync_cfg(uent, (u8)sizeof(u32), pos, true, (u32 *)&val); 368 } 369 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1890/1890] arch/x86/events/zhaoxin/uncore.c:2789:36-50: opportunity for str_enabled_disabled(uncore_enabled)
by kernel test robot 01 Nov '25

01 Nov '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: bca20ebb0eb886b6eef61fe75d9b476d02f92611 commit: 80e508024be6ebad4efb6e9c0f2cc273e6ce3ce2 [1890/1890] perf/zhaoxin/uncore: Enhance uncore support and fix related bugs config: x86_64-randconfig-r062-20251028 (https://download.01.org/0day-ci/archive/20251101/202511012255.csuhL1If-lkp@…) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) 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/202511012255.csuhL1If-lkp@intel.com/ cocci warnings: (new ones prefixed by >>) >> arch/x86/events/zhaoxin/uncore.c:2789:36-50: opportunity for str_enabled_disabled(uncore_enabled) vim +2789 arch/x86/events/zhaoxin/uncore.c 2775 2776 /* 2777 * Process kernel command-line parameter at boot time. 2778 * zhaoxin_pmc_uncore={0|off} or zhaoxin_pmc_uncore={1|on} 2779 */ 2780 static int __init zhaoxin_uncore_enable(char *str) 2781 { 2782 if (!strcasecmp(str, "off") || !strcmp(str, "0")) 2783 uncore_enabled = 0; 2784 else if (!strcasecmp(str, "on") || !strcmp(str, "1")) 2785 uncore_enabled = 1; 2786 else 2787 pr_err("zhaoxin_pmc_uncore: invalid parameter value (%s)\n", str); 2788 > 2789 pr_info("Zhaoxin PMC uncore %s\n", uncore_enabled ? "enabled" : "disabled"); 2790 2791 return 1; 2792 } 2793 __setup("zhaoxin_pmc_uncore=", zhaoxin_uncore_enable); 2794 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH openEuler-1.0-LTS] drm/mipi-dsi: Detach devices when removing the host
by Wupeng Ma 01 Nov '25

01 Nov '25
From: Maxime Ripard <maxime(a)cerno.tech> stable inclusion from stable-v4.19.262 commit 95ae458209f5a556bba98aff872f933694914eb7 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/ID0UBT CVE: CVE-2022-50489 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit 668a8f17b5290d04ef7343636a5588a0692731a1 ] Whenever the MIPI-DSI host is unregistered, the code of mipi_dsi_host_unregister() loops over every device currently found on that bus and will unregister it. However, it doesn't detach it from the bus first, which leads to all kind of resource leaks if the host wants to perform some clean up whenever a device is detached. Fixes: 068a00233969 ("drm: Add MIPI DSI bus support") Acked-by: Thomas Zimmermann <tzimmermann(a)suse.de> Signed-off-by: Maxime Ripard <maxime(a)cerno.tech> Link: https://lore.kernel.org/r/20220711173939.1132294-2-maxime@cerno.tech Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Wupeng Ma <mawupeng1(a)huawei.com> --- drivers/gpu/drm/drm_mipi_dsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index 80b75501f5c6..40a93a09550b 100644 --- a/drivers/gpu/drm/drm_mipi_dsi.c +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -305,6 +305,7 @@ static int mipi_dsi_remove_device_fn(struct device *dev, void *priv) { struct mipi_dsi_device *dsi = to_mipi_dsi_device(dev); + mipi_dsi_detach(dsi); mipi_dsi_device_unregister(dsi); return 0; -- 2.43.0
2 1
0 0
[PATCH openEuler-1.0-LTS] scsi: storvsc: Fix handling of virtual Fibre Channel timeouts
by Wang Hai 01 Nov '25

01 Nov '25
From: Michael Kelley <mikelley(a)microsoft.com> stable inclusion from stable-v4.19.292 commit 311db605e07f0d4fc0cc7ddb74f1e5692ea2f469 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/ICY4HH CVE: CVE-2023-53245 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- commit 175544ad48cbf56affeef2a679c6a4d4fb1e2881 upstream. Hyper-V provides the ability to connect Fibre Channel LUNs to the host system and present them in a guest VM as a SCSI device. I/O to the vFC device is handled by the storvsc driver. The storvsc driver includes a partial integration with the FC transport implemented in the generic portion of the Linux SCSI subsystem so that FC attributes can be displayed in /sys. However, the partial integration means that some aspects of vFC don't work properly. Unfortunately, a full and correct integration isn't practical because of limitations in what Hyper-V provides to the guest. In particular, in the context of Hyper-V storvsc, the FC transport timeout function fc_eh_timed_out() causes a kernel panic because it can't find the rport and dereferences a NULL pointer. The original patch that added the call from storvsc_eh_timed_out() to fc_eh_timed_out() is faulty in this regard. In many cases a timeout is due to a transient condition, so the situation can be improved by just continuing to wait like with other I/O requests issued by storvsc, and avoiding the guaranteed panic. For a permanent failure, continuing to wait may result in a hung thread instead of a panic, which again may be better. So fix the panic by removing the storvsc call to fc_eh_timed_out(). This allows storvsc to keep waiting for a response. The change has been tested by users who experienced a panic in fc_eh_timed_out() due to transient timeouts, and it solves their problem. In the future we may want to deprecate the vFC functionality in storvsc since it can't be fully fixed. But it has current users for whom it is working well enough, so it should probably stay for a while longer. Fixes: 3930d7309807 ("scsi: storvsc: use default I/O timeout handler for FC devices") Cc: stable(a)vger.kernel.org Signed-off-by: Michael Kelley <mikelley(a)microsoft.com> Link: https://lore.kernel.org/r/1690606764-79669-1-git-send-email-mikelley@micros… Signed-off-by: Martin K. Petersen <martin.petersen(a)oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: Wang Hai <wanghai38(a)huawei.com> --- drivers/scsi/storvsc_drv.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index f3701b4e374b..a28eb91dc2f3 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1538,14 +1538,10 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd) * be unbounded on Azure. Reset the timer unconditionally to give the host a * chance to perform EH. */ static enum blk_eh_timer_return storvsc_eh_timed_out(struct scsi_cmnd *scmnd) { -#if IS_ENABLED(CONFIG_SCSI_FC_ATTRS) - if (scmnd->device->host->transportt == fc_transport_template) - return fc_eh_timed_out(scmnd); -#endif return BLK_EH_RESET_TIMER; } static bool storvsc_scsi_cmd_ok(struct scsi_cmnd *scmnd) { -- 2.17.1
2 1
0 0
[PATCH openEuler-1.0-LTS] net: hns: fix possible memory leak in hnae_ae_register()
by Wang Hai 01 Nov '25

01 Nov '25
From: Yang Yingliang <yangyingliang(a)huawei.com> stable inclusion from stable-v4.19.264 commit 7ae1345f6ad715acbcdc9e1ac28153684fd498bb category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/ICYBXC CVE: CVE-2022-50352 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit ff2f5ec5d009844ec28f171123f9e58750cef4bf ] Inject fault while probing module, if device_register() fails, but the refcount of kobject is not decreased to 0, the name allocated in dev_set_name() is leaked. Fix this by calling put_device(), so that name can be freed in callback function kobject_cleanup(). unreferenced object 0xffff00c01aba2100 (size 128): comm "systemd-udevd", pid 1259, jiffies 4294903284 (age 294.152s) hex dump (first 32 bytes): 68 6e 61 65 30 00 00 00 18 21 ba 1a c0 00 ff ff hnae0....!...... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<0000000034783f26>] slab_post_alloc_hook+0xa0/0x3e0 [<00000000748188f2>] __kmem_cache_alloc_node+0x164/0x2b0 [<00000000ab0743e8>] __kmalloc_node_track_caller+0x6c/0x390 [<000000006c0ffb13>] kvasprintf+0x8c/0x118 [<00000000fa27bfe1>] kvasprintf_const+0x60/0xc8 [<0000000083e10ed7>] kobject_set_name_vargs+0x3c/0xc0 [<000000000b87affc>] dev_set_name+0x7c/0xa0 [<000000003fd8fe26>] hnae_ae_register+0xcc/0x190 [hnae] [<00000000fe97edc9>] hns_dsaf_ae_init+0x9c/0x108 [hns_dsaf] [<00000000c36ff1eb>] hns_dsaf_probe+0x548/0x748 [hns_dsaf] Fixes: 6fe6611ff275 ("net: add Hisilicon Network Subsystem hnae framework support") Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com> Reviewed-by: Leon Romanovsky <leonro(a)nvidia.com> Link: https://lore.kernel.org/r/20221018122451.1749171-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski <kuba(a)kernel.org> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Wang Hai <wanghai38(a)huawei.com> --- drivers/net/ethernet/hisilicon/hns/hnae.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns/hnae.c b/drivers/net/ethernet/hisilicon/hns/hnae.c index 8a2197e3fedb..0049a639151c 100644 --- a/drivers/net/ethernet/hisilicon/hns/hnae.c +++ b/drivers/net/ethernet/hisilicon/hns/hnae.c @@ -417,12 +417,14 @@ int hnae_ae_register(struct hnae_ae_dev *hdev, struct module *owner) hdev->cls_dev.parent = hdev->dev; hdev->cls_dev.class = hnae_class; hdev->cls_dev.release = hnae_release; (void)dev_set_name(&hdev->cls_dev, "hnae%d", hdev->id); ret = device_register(&hdev->cls_dev); - if (ret) + if (ret) { + put_device(&hdev->cls_dev); return ret; + } __module_get(THIS_MODULE); INIT_LIST_HEAD(&hdev->handle_list); spin_lock_init(&hdev->lock); -- 2.17.1
2 1
0 0
[openeuler:OLK-6.6 3075/3075] drivers/ub/ubus/config.c:15:3: warning: unused variable 'cfg_ops_t'
by kernel test robot 01 Nov '25

01 Nov '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 6a5b2f9a14178b13fe5efc52ba6575f5294c1270 commit: 8733e7995bd92d8159ba0df49df547f4b9c4862b [3075/3075] ub:ubus: Add Ubus setting configuration space function config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20251101/202511011352.x6bDn1G2-lkp@…) compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251101/202511011352.x6bDn1G2-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/202511011352.x6bDn1G2-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/ub/ubus/config.c:51:5: warning: no previous prototype for function 'ub_cfg_read_byte' [-Wmissing-prototypes] 51 | int ub_cfg_read_byte(struct ub_entity *uent, u64 pos, u8 *val) | ^ drivers/ub/ubus/config.c:51:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 51 | int ub_cfg_read_byte(struct ub_entity *uent, u64 pos, u8 *val) | ^ | static drivers/ub/ubus/config.c:60:5: warning: no previous prototype for function 'ub_cfg_read_word' [-Wmissing-prototypes] 60 | int ub_cfg_read_word(struct ub_entity *uent, u64 pos, u16 *val) | ^ drivers/ub/ubus/config.c:60:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 60 | int ub_cfg_read_word(struct ub_entity *uent, u64 pos, u16 *val) | ^ | static drivers/ub/ubus/config.c:69:5: warning: no previous prototype for function 'ub_cfg_read_dword' [-Wmissing-prototypes] 69 | int ub_cfg_read_dword(struct ub_entity *uent, u64 pos, u32 *val) | ^ drivers/ub/ubus/config.c:69:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 69 | int ub_cfg_read_dword(struct ub_entity *uent, u64 pos, u32 *val) | ^ | static drivers/ub/ubus/config.c:78:5: warning: no previous prototype for function 'ub_cfg_write_byte' [-Wmissing-prototypes] 78 | int ub_cfg_write_byte(struct ub_entity *uent, u64 pos, u8 val) | ^ drivers/ub/ubus/config.c:78:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 78 | int ub_cfg_write_byte(struct ub_entity *uent, u64 pos, u8 val) | ^ | static drivers/ub/ubus/config.c:87:5: warning: no previous prototype for function 'ub_cfg_write_word' [-Wmissing-prototypes] 87 | int ub_cfg_write_word(struct ub_entity *uent, u64 pos, u16 val) | ^ drivers/ub/ubus/config.c:87:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 87 | int ub_cfg_write_word(struct ub_entity *uent, u64 pos, u16 val) | ^ | static drivers/ub/ubus/config.c:96:5: warning: no previous prototype for function 'ub_cfg_write_dword' [-Wmissing-prototypes] 96 | int ub_cfg_write_dword(struct ub_entity *uent, u64 pos, u32 val) | ^ drivers/ub/ubus/config.c:96:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 96 | int ub_cfg_write_dword(struct ub_entity *uent, u64 pos, u32 val) | ^ | static >> drivers/ub/ubus/config.c:15:3: warning: unused variable 'cfg_ops_t' [-Wunused-const-variable] 15 | } cfg_ops_t; | ^~~~~~~~~ 7 warnings generated. vim +/cfg_ops_t +15 drivers/ub/ubus/config.c 7 8 static const struct cfg_ops { 9 read_byte_f cfg_read_byte; 10 read_word_f cfg_read_word; 11 read_dword_f cfg_read_dword; 12 write_byte_f cfg_write_byte; 13 write_word_f cfg_write_word; 14 write_dword_f cfg_write_dword; > 15 } cfg_ops_t; 16 17 static struct cfg_ops ub_cfg_ops = {}; 18 19 int register_ub_cfg_read_ops(read_byte_f rb, read_word_f rw, read_dword_f rdw) 20 { 21 if (rb && rw && rdw) { 22 ub_cfg_ops.cfg_read_byte = rb; 23 ub_cfg_ops.cfg_read_word = rw; 24 ub_cfg_ops.cfg_read_dword = rdw; 25 return 0; 26 } 27 28 return -EINVAL; 29 } 30 EXPORT_SYMBOL_GPL(register_ub_cfg_read_ops); 31 32 int register_ub_cfg_write_ops(write_byte_f wb, write_word_f ww, write_dword_f wdw) 33 { 34 if (wb && ww && wdw) { 35 ub_cfg_ops.cfg_write_byte = wb; 36 ub_cfg_ops.cfg_write_word = ww; 37 ub_cfg_ops.cfg_write_dword = wdw; 38 return 0; 39 } 40 41 return -EINVAL; 42 } 43 EXPORT_SYMBOL_GPL(register_ub_cfg_write_ops); 44 45 void unregister_ub_cfg_ops(void) 46 { 47 memset(&ub_cfg_ops, 0, sizeof(struct cfg_ops)); 48 } 49 EXPORT_SYMBOL_GPL(unregister_ub_cfg_ops); 50 51 int ub_cfg_read_byte(struct ub_entity *uent, u64 pos, u8 *val) 52 { 53 if (!ub_cfg_ops.cfg_read_byte) 54 return -ENODEV; 55 56 return ub_cfg_ops.cfg_read_byte(uent, pos, val); 57 } 58 EXPORT_SYMBOL_GPL(ub_cfg_read_byte); 59 60 int ub_cfg_read_word(struct ub_entity *uent, u64 pos, u16 *val) 61 { 62 if (!ub_cfg_ops.cfg_read_word) 63 return -ENODEV; 64 65 return ub_cfg_ops.cfg_read_word(uent, pos, val); 66 } 67 EXPORT_SYMBOL_GPL(ub_cfg_read_word); 68 69 int ub_cfg_read_dword(struct ub_entity *uent, u64 pos, u32 *val) 70 { 71 if (!ub_cfg_ops.cfg_read_dword) 72 return -ENODEV; 73 74 return ub_cfg_ops.cfg_read_dword(uent, pos, val); 75 } 76 EXPORT_SYMBOL_GPL(ub_cfg_read_dword); 77 78 int ub_cfg_write_byte(struct ub_entity *uent, u64 pos, u8 val) 79 { 80 if (!ub_cfg_ops.cfg_write_byte) 81 return -ENODEV; 82 83 return ub_cfg_ops.cfg_write_byte(uent, pos, val); 84 } 85 EXPORT_SYMBOL_GPL(ub_cfg_write_byte); 86 87 int ub_cfg_write_word(struct ub_entity *uent, u64 pos, u16 val) 88 { 89 if (!ub_cfg_ops.cfg_write_word) 90 return -ENODEV; 91 92 return ub_cfg_ops.cfg_write_word(uent, pos, val); 93 } 94 EXPORT_SYMBOL_GPL(ub_cfg_write_word); 95 > 96 int ub_cfg_write_dword(struct ub_entity *uent, u64 pos, u32 val) -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3081/3081] include/linux/userfaultfd_k.h:66:45: sparse: sparse: restricted uffd_flags_t degrades to integer
by kernel test robot 01 Nov '25

01 Nov '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 6a5b2f9a14178b13fe5efc52ba6575f5294c1270 commit: 0214feb8f616acf62f9a6a2a131f0a1479b2b8af [3081/3081] mm/userswap: introduce UFFDIO_COPY_MODE_DIRECT_MAP config: x86_64-randconfig-123-20251101 (https://download.01.org/0day-ci/archive/20251101/202511011309.6fKIlijE-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/20251101/202511011309.6fKIlijE-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/202511011309.6fKIlijE-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) mm/userfaultfd.c: note: in included file (through include/linux/rbtree.h, include/linux/mm_types.h, include/linux/mmzone.h, ...): include/linux/rcupdate.h:780:9: sparse: sparse: context imbalance in 'mfill_atomic_install_pte' - unexpected unlock include/linux/rcupdate.h:780:9: sparse: sparse: context imbalance in 'mfill_atomic_pte_zeropage' - unexpected unlock include/linux/rcupdate.h:780:9: sparse: sparse: context imbalance in 'mfill_atomic_pte_poison' - unexpected unlock mm/userfaultfd.c: note: in included file: >> include/linux/userfaultfd_k.h:66:45: sparse: sparse: restricted uffd_flags_t degrades to integer >> include/linux/userfaultfd_k.h:67:32: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted uffd_flags_t [usertype] flags @@ got unsigned int enum mfill_atomic_mode mode @@ include/linux/userfaultfd_k.h:67:32: sparse: expected restricted uffd_flags_t [usertype] flags include/linux/userfaultfd_k.h:67:32: sparse: got unsigned int enum mfill_atomic_mode mode >> include/linux/userfaultfd_k.h:66:45: sparse: sparse: restricted uffd_flags_t degrades to integer >> include/linux/userfaultfd_k.h:67:32: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted uffd_flags_t [usertype] flags @@ got unsigned int enum mfill_atomic_mode mode @@ include/linux/userfaultfd_k.h:67:32: sparse: expected restricted uffd_flags_t [usertype] flags include/linux/userfaultfd_k.h:67:32: sparse: got unsigned int enum mfill_atomic_mode mode >> include/linux/userfaultfd_k.h:66:45: sparse: sparse: restricted uffd_flags_t degrades to integer >> include/linux/userfaultfd_k.h:67:32: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted uffd_flags_t [usertype] flags @@ got unsigned int enum mfill_atomic_mode mode @@ include/linux/userfaultfd_k.h:67:32: sparse: expected restricted uffd_flags_t [usertype] flags include/linux/userfaultfd_k.h:67:32: sparse: got unsigned int enum mfill_atomic_mode mode >> include/linux/userfaultfd_k.h:66:45: sparse: sparse: restricted uffd_flags_t degrades to integer >> include/linux/userfaultfd_k.h:67:32: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted uffd_flags_t [usertype] flags @@ got unsigned int enum mfill_atomic_mode mode @@ include/linux/userfaultfd_k.h:67:32: sparse: expected restricted uffd_flags_t [usertype] flags include/linux/userfaultfd_k.h:67:32: sparse: got unsigned int enum mfill_atomic_mode mode vim +66 include/linux/userfaultfd_k.h 63 64 static inline uffd_flags_t uffd_flags_set_mode(uffd_flags_t flags, enum mfill_atomic_mode mode) 65 { > 66 if (IS_ENABLED(CONFIG_USERSWAP) && (flags & MFILL_ATOMIC_DIRECT_MAP) && > 67 uffd_flags_mode_is(mode, MFILL_ATOMIC_COPY)) 68 mode = MFILL_ATOMIC_DIRECT_MAP; 69 70 flags &= ~MFILL_ATOMIC_MODE_MASK; 71 return flags | ((__force uffd_flags_t) mode); 72 } 73 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH openEuler-1.0-LTS] net: sched: cls_u32: Undo tcf_bind_filter if u32_replace_hw_knode
by Dong Chenchen 01 Nov '25

01 Nov '25
From: Victor Nogueira <victor(a)mojatatu.com> mainline inclusion from mainline-v6.5-rc3 commit 9cb36faedeafb9720ac236aeae2ea57091d90a09 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/ID3FON CVE: CVE-2023-53733 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- When u32_replace_hw_knode fails, we need to undo the tcf_bind_filter operation done at u32_set_parms. Fixes: d34e3e181395 ("net: cls_u32: Add support for skip-sw flag to tc u32 classifier.") Signed-off-by: Victor Nogueira <victor(a)mojatatu.com> Acked-by: Jamal Hadi Salim <jhs(a)mojatatu.com> Reviewed-by: Pedro Tammela <pctammela(a)mojatatu.com> Reviewed-by: Simon Horman <simon.horman(a)corigine.com> Signed-off-by: David S. Miller <davem(a)davemloft.net> Conflicts: net/sched/cls_u32.c [commit c86e0209dc77 and 18512f5c255f are not backport] Signed-off-by: Dong Chenchen <dongchenchen2(a)huawei.com> --- net/sched/cls_u32.c | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index 3aa1af58000b..facc5774bd4f 100644 --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u32.c @@ -771,8 +771,24 @@ static const struct nla_policy u32_policy[TCA_U32_MAX + 1] = { [TCA_U32_FLAGS] = { .type = NLA_U32 }, }; +static void u32_unbind_filter(struct tcf_proto *tp, struct tc_u_knode *n, + struct nlattr **tb) +{ + if (tb[TCA_U32_CLASSID]) + tcf_unbind_filter(tp, &n->res); +} + +static void u32_bind_filter(struct tcf_proto *tp, struct tc_u_knode *n, + unsigned long base, struct nlattr **tb) +{ + if (tb[TCA_U32_CLASSID]) { + n->res.classid = nla_get_u32(tb[TCA_U32_CLASSID]); + tcf_bind_filter(tp, &n->res, base); + } +} + static int u32_set_parms(struct net *net, struct tcf_proto *tp, - unsigned long base, struct tc_u_hnode *ht, + struct tc_u_hnode *ht, struct tc_u_knode *n, struct nlattr **tb, struct nlattr *est, bool ovr, struct netlink_ext_ack *extack) @@ -819,10 +835,6 @@ static int u32_set_parms(struct net *net, struct tcf_proto *tp, if (ht_old) ht_old->refcnt--; } - if (tb[TCA_U32_CLASSID]) { - n->res.classid = nla_get_u32(tb[TCA_U32_CLASSID]); - tcf_bind_filter(tp, &n->res, base); - } #ifdef CONFIG_NET_CLS_IND if (ifindex >= 0) @@ -969,8 +981,7 @@ static int u32_change(struct net *net, struct sk_buff *in_skb, if (!new) return -ENOMEM; - err = u32_set_parms(net, tp, base, - rtnl_dereference(n->ht_up), new, tb, + err = u32_set_parms(net, tp, rtnl_dereference(n->ht_up), new, tb, tca[TCA_RATE], ovr, extack); if (err) { @@ -978,8 +989,12 @@ static int u32_change(struct net *net, struct sk_buff *in_skb, return err; } + u32_bind_filter(tp, new, base, tb); + err = u32_replace_hw_knode(tp, new, flags, extack); if (err) { + u32_unbind_filter(tp, new, tb); + __u32_destroy_key(new); return err; } @@ -1134,15 +1149,18 @@ static int u32_change(struct net *net, struct sk_buff *in_skb, } #endif - err = u32_set_parms(net, tp, base, ht, n, tb, tca[TCA_RATE], ovr, + err = u32_set_parms(net, tp, ht, n, tb, tca[TCA_RATE], ovr, extack); + + u32_bind_filter(tp, n, base, tb); + if (err == 0) { struct tc_u_knode __rcu **ins; struct tc_u_knode *pins; err = u32_replace_hw_knode(tp, n, flags, extack); if (err) - goto errhw; + goto errunbind; if (!tc_in_hw(n->flags)) n->flags |= TCA_CLS_FLAGS_NOT_IN_HW; @@ -1159,7 +1177,9 @@ static int u32_change(struct net *net, struct sk_buff *in_skb, return 0; } -errhw: +errunbind: + u32_unbind_filter(tp, n, tb); + #ifdef CONFIG_CLS_U32_MARK free_percpu(n->pcpu_success); #endif -- 2.25.1
2 1
0 0
[PATCH openEuler-1.0-LTS] [Backport] can: peak_usb: fix shift-out-of-bounds issue
by Dong Chenchen 01 Nov '25

01 Nov '25
From: Stéphane Grosjean <stephane.grosjean(a)hms-networks.com> mainline inclusion from mainline-v6.17-rc6 commit c443be70aaee42c2d1d251e0329e0a69dd96ae54 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/ID3FRA CVE: CVE-2025-40020 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- Explicitly uses a 64-bit constant when the number of bits used for its shifting is 32 (which is the case for PC CAN FD interfaces supported by this driver). Signed-off-by: Stéphane Grosjean <stephane.grosjean(a)hms-networks.com> Link: https://patch.msgid.link/20250918132413.30071-1-stephane.grosjean@free.fr Reported-by: Marc Kleine-Budde <mkl(a)pengutronix.de> Closes: https://lore.kernel.org/20250917-aboriginal-refined-honeybee-82b1aa-mkl@pen… Fixes: bb4785551f64 ("can: usb: PEAK-System Technik USB adapters driver core") [mkl: update subject, apply manually] Signed-off-by: Marc Kleine-Budde <mkl(a)pengutronix.de> Signed-off-by: Dong Chenchen <dongchenchen2(a)huawei.com> --- drivers/net/can/usb/peak_usb/pcan_usb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c index afc8d978124e..b12889925730 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c @@ -92,7 +92,7 @@ void peak_usb_update_ts_now(struct peak_time_ref *time_ref, u32 ts_now) u32 delta_ts = time_ref->ts_dev_2 - time_ref->ts_dev_1; if (time_ref->ts_dev_2 < time_ref->ts_dev_1) - delta_ts &= (1 << time_ref->adapter->ts_used_bits) - 1; + delta_ts &= (1ULL << time_ref->adapter->ts_used_bits) - 1; time_ref->ts_total += delta_ts; } -- 2.25.1
2 1
0 0
[openeuler:OLK-6.6 3081/3081] arch/x86/kvm/svm/nested.c:485:6: error: call to undeclared function 'to_hv_vcpu'; ISO C99 and later do not support implicit function declarations
by kernel test robot 01 Nov '25

01 Nov '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 6a5b2f9a14178b13fe5efc52ba6575f5294c1270 commit: 2a3cfce9a18a4b772f01830cbc95fe00125431d8 [3081/3081] KVM: x86: Make Hyper-V emulation optional config: x86_64-randconfig-013-20251101 (https://download.01.org/0day-ci/archive/20251101/202511011104.PcEVHImG-lkp@…) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251101/202511011104.PcEVHImG-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/202511011104.PcEVHImG-lkp@intel.com/ All errors (new ones prefixed by >>): >> arch/x86/kvm/svm/nested.c:485:6: error: call to undeclared function 'to_hv_vcpu'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 485 | if (to_hv_vcpu(vcpu) && npt_enabled) | ^ 1 error generated. -- >> arch/x86/kvm/x86.c:12528:8: error: call to undeclared function 'to_kvm_hv'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 12528 | kfree(to_kvm_hv(kvm)->hv_pa_pg); | ^ >> arch/x86/kvm/x86.c:12528:24: error: member reference type 'int' is not a pointer 12528 | kfree(to_kvm_hv(kvm)->hv_pa_pg); | ~~~~~~~~~~~~~~ ^ 2 errors generated. -- In file included from arch/x86/kvm/kvm-asm-offsets.c:10: >> arch/x86/kvm/vmx/vmx.h:757:20: error: no member named 'hyperv_enabled' in 'struct kvm_vcpu_arch' 757 | return vcpu->arch.hyperv_enabled && | ~~~~~~~~~~ ^ 1 error generated. -- >> arch/x86/kvm/lapic.c:1479:6: error: call to undeclared function 'to_hv_vcpu'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 1479 | if (to_hv_vcpu(apic->vcpu) && | ^ >> arch/x86/kvm/lapic.c:1480:23: error: call to undeclared function 'to_hv_synic'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 1480 | test_bit(vector, to_hv_synic(apic->vcpu)->vec_bitmap)) | ^ >> arch/x86/kvm/lapic.c:1480:48: error: member reference type 'int' is not a pointer 1480 | test_bit(vector, to_hv_synic(apic->vcpu)->vec_bitmap)) | ~~~~~~~~~~~~~~~~~~~~~~~ ^ include/linux/bitops.h:61:50: note: expanded from macro 'test_bit' 61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr) | ^~~~ include/linux/bitops.h:50:37: note: expanded from macro 'bitop' 50 | __builtin_constant_p((uintptr_t)(addr) != (uintptr_t)NULL) && \ | ^~~~ >> arch/x86/kvm/lapic.c:1480:48: error: member reference type 'int' is not a pointer 1480 | test_bit(vector, to_hv_synic(apic->vcpu)->vec_bitmap)) | ~~~~~~~~~~~~~~~~~~~~~~~ ^ include/linux/bitops.h:61:50: note: expanded from macro 'test_bit' 61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr) | ^~~~ include/linux/bitops.h:51:16: note: expanded from macro 'bitop' 51 | (uintptr_t)(addr) != (uintptr_t)NULL && \ | ^~~~ >> arch/x86/kvm/lapic.c:1480:48: error: member reference type 'int' is not a pointer 1480 | test_bit(vector, to_hv_synic(apic->vcpu)->vec_bitmap)) | ~~~~~~~~~~~~~~~~~~~~~~~ ^ include/linux/bitops.h:61:50: note: expanded from macro 'test_bit' 61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr) | ^~~~ include/linux/bitops.h:52:50: note: expanded from macro 'bitop' 52 | __builtin_constant_p(*(const unsigned long *)(addr))) ? \ | ^~~~ >> arch/x86/kvm/lapic.c:1480:48: error: member reference type 'int' is not a pointer 1480 | test_bit(vector, to_hv_synic(apic->vcpu)->vec_bitmap)) | ~~~~~~~~~~~~~~~~~~~~~~~ ^ include/linux/bitops.h:61:50: note: expanded from macro 'test_bit' 61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr) | ^~~~ include/linux/bitops.h:53:17: note: expanded from macro 'bitop' 53 | const##op(nr, addr) : op(nr, addr)) | ^~~~ >> arch/x86/kvm/lapic.c:1480:48: error: member reference type 'int' is not a pointer 1480 | test_bit(vector, to_hv_synic(apic->vcpu)->vec_bitmap)) | ~~~~~~~~~~~~~~~~~~~~~~~ ^ include/linux/bitops.h:61:50: note: expanded from macro 'test_bit' 61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr) | ^~~~ include/linux/bitops.h:53:32: note: expanded from macro 'bitop' 53 | const##op(nr, addr) : op(nr, addr)) | ^~~~ arch/x86/kvm/lapic.c:2954:6: error: call to undeclared function 'to_hv_vcpu'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 2954 | if (to_hv_vcpu(vcpu) && test_bit(vector, to_hv_synic(vcpu)->auto_eoi_bitmap)) { | ^ arch/x86/kvm/lapic.c:2954:43: error: call to undeclared function 'to_hv_synic'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 2954 | if (to_hv_vcpu(vcpu) && test_bit(vector, to_hv_synic(vcpu)->auto_eoi_bitmap)) { | ^ arch/x86/kvm/lapic.c:2954:62: error: member reference type 'int' is not a pointer 2954 | if (to_hv_vcpu(vcpu) && test_bit(vector, to_hv_synic(vcpu)->auto_eoi_bitmap)) { | ~~~~~~~~~~~~~~~~~ ^ include/linux/bitops.h:61:50: note: expanded from macro 'test_bit' 61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr) | ^~~~ include/linux/bitops.h:50:37: note: expanded from macro 'bitop' 50 | __builtin_constant_p((uintptr_t)(addr) != (uintptr_t)NULL) && \ | ^~~~ arch/x86/kvm/lapic.c:2954:62: error: member reference type 'int' is not a pointer 2954 | if (to_hv_vcpu(vcpu) && test_bit(vector, to_hv_synic(vcpu)->auto_eoi_bitmap)) { | ~~~~~~~~~~~~~~~~~ ^ include/linux/bitops.h:61:50: note: expanded from macro 'test_bit' 61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr) | ^~~~ include/linux/bitops.h:51:16: note: expanded from macro 'bitop' 51 | (uintptr_t)(addr) != (uintptr_t)NULL && \ | ^~~~ arch/x86/kvm/lapic.c:2954:62: error: member reference type 'int' is not a pointer 2954 | if (to_hv_vcpu(vcpu) && test_bit(vector, to_hv_synic(vcpu)->auto_eoi_bitmap)) { | ~~~~~~~~~~~~~~~~~ ^ include/linux/bitops.h:61:50: note: expanded from macro 'test_bit' 61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr) | ^~~~ include/linux/bitops.h:52:50: note: expanded from macro 'bitop' 52 | __builtin_constant_p(*(const unsigned long *)(addr))) ? \ | ^~~~ arch/x86/kvm/lapic.c:2954:62: error: member reference type 'int' is not a pointer 2954 | if (to_hv_vcpu(vcpu) && test_bit(vector, to_hv_synic(vcpu)->auto_eoi_bitmap)) { | ~~~~~~~~~~~~~~~~~ ^ include/linux/bitops.h:61:50: note: expanded from macro 'test_bit' 61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr) | ^~~~ include/linux/bitops.h:53:17: note: expanded from macro 'bitop' 53 | const##op(nr, addr) : op(nr, addr)) | ^~~~ arch/x86/kvm/lapic.c:2954:62: error: member reference type 'int' is not a pointer 2954 | if (to_hv_vcpu(vcpu) && test_bit(vector, to_hv_synic(vcpu)->auto_eoi_bitmap)) { | ~~~~~~~~~~~~~~~~~ ^ include/linux/bitops.h:61:50: note: expanded from macro 'test_bit' 61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr) | ^~~~ include/linux/bitops.h:53:32: note: expanded from macro 'bitop' 53 | const##op(nr, addr) : op(nr, addr)) | ^~~~ 14 errors generated. Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PTP_1588_CLOCK Depends on [n]: NET [=y] && POSIX_TIMERS [=n] Selected by [m]: - SXE [=m] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_LINKDATA [=y] && (X86 [=y] || ARM64) && PCI [=y] - SXE_VF [=m] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_LINKDATA [=y] && (X86 [=y] || ARM64) && PCI [=y] vim +/to_hv_vcpu +485 arch/x86/kvm/svm/nested.c 36e2e98363e6c1 Paolo Bonzini 2020-05-22 476 d2e5601907bd29 Sean Christopherson 2021-06-09 477 static void nested_svm_transition_tlb_flush(struct kvm_vcpu *vcpu) d2e5601907bd29 Sean Christopherson 2021-06-09 478 { 3f4a812edf5cb0 Vitaly Kuznetsov 2022-11-01 479 /* 3f4a812edf5cb0 Vitaly Kuznetsov 2022-11-01 480 * KVM_REQ_HV_TLB_FLUSH flushes entries from either L1's VP_ID or 3f4a812edf5cb0 Vitaly Kuznetsov 2022-11-01 481 * L2's VP_ID upon request from the guest. Make sure we check for 3f4a812edf5cb0 Vitaly Kuznetsov 2022-11-01 482 * pending entries in the right FIFO upon L1/L2 transition as these 3f4a812edf5cb0 Vitaly Kuznetsov 2022-11-01 483 * requests are put by other vCPUs asynchronously. 3f4a812edf5cb0 Vitaly Kuznetsov 2022-11-01 484 */ 3f4a812edf5cb0 Vitaly Kuznetsov 2022-11-01 @485 if (to_hv_vcpu(vcpu) && npt_enabled) 3f4a812edf5cb0 Vitaly Kuznetsov 2022-11-01 486 kvm_make_request(KVM_REQ_HV_TLB_FLUSH, vcpu); 3f4a812edf5cb0 Vitaly Kuznetsov 2022-11-01 487 d2e5601907bd29 Sean Christopherson 2021-06-09 488 /* d2e5601907bd29 Sean Christopherson 2021-06-09 489 * TODO: optimize unconditional TLB flush/MMU sync. A partial list of d2e5601907bd29 Sean Christopherson 2021-06-09 490 * things to fix before this can be conditional: d2e5601907bd29 Sean Christopherson 2021-06-09 491 * d2e5601907bd29 Sean Christopherson 2021-06-09 492 * - Flush TLBs for both L1 and L2 remote TLB flush d2e5601907bd29 Sean Christopherson 2021-06-09 493 * - Honor L1's request to flush an ASID on nested VMRUN d2e5601907bd29 Sean Christopherson 2021-06-09 494 * - Sync nested NPT MMU on VMRUN that flushes L2's ASID[*] d2e5601907bd29 Sean Christopherson 2021-06-09 495 * - Don't crush a pending TLB flush in vmcb02 on nested VMRUN d2e5601907bd29 Sean Christopherson 2021-06-09 496 * - Flush L1's ASID on KVM_REQ_TLB_FLUSH_GUEST d2e5601907bd29 Sean Christopherson 2021-06-09 497 * d2e5601907bd29 Sean Christopherson 2021-06-09 498 * [*] Unlike nested EPT, SVM's ASID management can invalidate nested d2e5601907bd29 Sean Christopherson 2021-06-09 499 * NPT guest-physical mappings on VMRUN. d2e5601907bd29 Sean Christopherson 2021-06-09 500 */ d2e5601907bd29 Sean Christopherson 2021-06-09 501 kvm_make_request(KVM_REQ_MMU_SYNC, vcpu); d2e5601907bd29 Sean Christopherson 2021-06-09 502 kvm_make_request(KVM_REQ_TLB_FLUSH_CURRENT, vcpu); d2e5601907bd29 Sean Christopherson 2021-06-09 503 } d2e5601907bd29 Sean Christopherson 2021-06-09 504 :::::: The code at line 485 was first introduced by commit :::::: 3f4a812edf5cb0a50e65fbdfafdb3e688da18f16 KVM: nSVM: hyper-v: Enable L2 TLB flush :::::: TO: Vitaly Kuznetsov <vkuznets(a)redhat.com> :::::: CC: Paolo Bonzini <pbonzini(a)redhat.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • ...
  • 2098
  • Older →

HyperKitty Powered by HyperKitty