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

  • 52 participants
  • 18277 discussions
[PATCH OLK-6.6] seq_file: kabi: KABI reservation for seq_file
by Baokun Li 18 Dec '24

18 Dec '24
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IBC34X ---------------------------------------------------------------------- structure size reserves reserved seq_file 120 1 128 seq_operations 32 1 40 Signed-off-by: Baokun Li <libaokun1(a)huawei.com> --- include/linux/seq_file.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 234bcdb1fba4..cf4a2258df85 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h @@ -27,6 +27,8 @@ struct seq_file { int poll_event; const struct file *file; void *private; + + KABI_RESERVE(1) }; struct seq_operations { @@ -34,6 +36,8 @@ struct seq_operations { void (*stop) (struct seq_file *m, void *v); void * (*next) (struct seq_file *m, void *v, loff_t *pos); int (*show) (struct seq_file *m, void *v); + + KABI_RESERVE(1) }; #define SEQ_SKIP 1 -- 2.46.1
2 1
0 0
[PATCH OLK-6.6,v2] net/kabi: Reserve space for net structures
by Dong Chenchen 18 Dec '24

18 Dec '24
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IBC1RH -------------------------------- Reserve some fields beforehand for net subsystem related structures prone to change. Signed-off-by: Dong Chenchen <dongchenchen2(a)huawei.com> --- include/net/flow.h | 2 ++ include/net/netns/netfilter.h | 2 ++ include/net/netns/xfrm.h | 2 ++ include/net/xfrm.h | 4 ++++ 4 files changed, 10 insertions(+) diff --git a/include/net/flow.h b/include/net/flow.h index 0cc5f2ef1000..72d2ea2374ba 100644 --- a/include/net/flow.h +++ b/include/net/flow.h @@ -46,6 +46,8 @@ struct flowi_common { KABI_RESERVE(1) KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) }; union flowi_uli { diff --git a/include/net/netns/netfilter.h b/include/net/netns/netfilter.h index 4b77a9b031b6..963588269637 100644 --- a/include/net/netns/netfilter.h +++ b/include/net/netns/netfilter.h @@ -34,5 +34,7 @@ struct netns_nf { KABI_RESERVE(1) KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) }; #endif diff --git a/include/net/netns/xfrm.h b/include/net/netns/xfrm.h index a0c1359cc7eb..af7f20ef4823 100644 --- a/include/net/netns/xfrm.h +++ b/include/net/netns/xfrm.h @@ -87,6 +87,8 @@ struct netns_xfrm { KABI_RESERVE(1) KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) }; #endif diff --git a/include/net/xfrm.h b/include/net/xfrm.h index c875faf98492..b9dec5f9c973 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -294,6 +294,8 @@ struct xfrm_state { KABI_RESERVE(1) KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) }; static inline struct net *xs_net(struct xfrm_state *x) @@ -562,6 +564,8 @@ struct xfrm_policy { KABI_RESERVE(1) KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) }; static inline struct net *xp_net(const struct xfrm_policy *xp) -- 2.25.1
1 0
0 0
[PATCH OLK-5.10] soc: hisilicon: hbmdev: Only support built-in
by Zhang Zekun 18 Dec '24

18 Dec '24
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IB78B0 ----------------------------------------------------------- Only support built in compile for hisi_hbmdev. We need to use lock_device_hotplug_sysfs() to prevent directly racing on acpi_scan_lock(), hbm memory can be time consumed during power on. Signed-off-by: Zhang Zekun <zhangzekun11(a)huawei.com> --- arch/arm64/configs/openeuler_defconfig | 2 +- drivers/soc/hisilicon/Kconfig | 2 +- drivers/soc/hisilicon/hisi_hbmdev.c | 19 ++++++++++++++++--- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/arch/arm64/configs/openeuler_defconfig b/arch/arm64/configs/openeuler_defconfig index 4c117f2f55f1..dba4e3b2e79a 100644 --- a/arch/arm64/configs/openeuler_defconfig +++ b/arch/arm64/configs/openeuler_defconfig @@ -6117,7 +6117,7 @@ CONFIG_QCOM_KRYO_L2_ACCESSORS=y # Hisilicon SoC drivers # CONFIG_KUNPENG_HCCS=m -CONFIG_HISI_HBMDEV=m +CONFIG_HISI_HBMDEV=y CONFIG_HISI_HBMCACHE=m CONFIG_HISI_HBMDEV_ACLS=y CONFIG_HISI_L3T=m diff --git a/drivers/soc/hisilicon/Kconfig b/drivers/soc/hisilicon/Kconfig index 0e79de44a01f..2dc1a2060d30 100644 --- a/drivers/soc/hisilicon/Kconfig +++ b/drivers/soc/hisilicon/Kconfig @@ -19,7 +19,7 @@ config KUNPENG_HCCS health status and port information of HCCS on Kunpeng SoC. config HISI_HBMDEV - tristate "add extra support for hbm memory device" + bool "add extra support for hbm memory device" depends on ACPI_HOTPLUG_MEMORY select ACPI_CONTAINER help diff --git a/drivers/soc/hisilicon/hisi_hbmdev.c b/drivers/soc/hisilicon/hisi_hbmdev.c index f09388a80009..4bf3a17fc2a8 100644 --- a/drivers/soc/hisilicon/hisi_hbmdev.c +++ b/drivers/soc/hisilicon/hisi_hbmdev.c @@ -59,9 +59,8 @@ static int memdev_power_on(struct acpi_device *adev) acpi_handle handle = adev->handle; acpi_status status; - acpi_scan_lock_acquire(); + /* Power on and online the devices */ status = acpi_evaluate_object(handle, "_ON", NULL, NULL); - acpi_scan_lock_release(); if (ACPI_FAILURE(status)) { acpi_handle_warn(handle, "Power on failed (0x%x)\n", status); return -ENODEV; @@ -100,6 +99,7 @@ static int memdev_power_off(struct acpi_device *adev) acpi_dev_for_each_child(adev, hbmdev_check, NULL); acpi_scan_lock_release(); + /* Eject the devices and power off */ status = acpi_evaluate_object(handle, "_OFF", NULL, NULL); if (ACPI_FAILURE(status)) { return -ENODEV; @@ -112,7 +112,12 @@ static ssize_t state_store(struct device *dev, struct device_attribute *attr, { struct acpi_device *adev = ACPI_COMPANION(dev); const int type = online_type_from_str(buf); - int ret = -EINVAL; + int ret; + + /* Disallow pending on the mutex to avoid potential hung task*/ + ret = lock_device_hotplug_sysfs(); + if (ret) + return ret; switch (type) { case STATE_ONLINE: @@ -124,6 +129,7 @@ static ssize_t state_store(struct device *dev, struct device_attribute *attr, default: break; } + unlock_device_hotplug(); if (ret) return ret; @@ -196,9 +202,16 @@ static int container_init(void) return 0; } +static struct acpi_platform_list kunpeng_hbm_plat_info[] = { + {"HISI ", "HIP11 ", 0, ACPI_SIG_IORT, all_versions, NULL, 0}, + { } +}; static int __init hbmdev_init(void) { + if (acpi_match_platform_list(kunpeng_hbm_plat_info) < 0) + return 0; + return container_init(); } module_init(hbmdev_init); -- 2.22.0
2 1
0 0
[PATCH OLK-6.6] iommu: Reserve extra KABI entry for struct iopf_group
by Zhang Zekun 18 Dec '24

18 Dec '24
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IBBRHP --------------------------------------------------------------- The list_head entry in iopf_group has been moved to iopf_group_extend for KABI compatibility and the lack of KABI reserve entry. Reserve extra kabi entry for future usage. Signed-off-by: Zhang Zekun <zhangzekun11(a)huawei.com> --- include/linux/iommu.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/iommu.h b/include/linux/iommu.h index bb463cb96a44..83ec4bf9809e 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -155,6 +155,10 @@ struct iopf_group { KABI_USE(2, u32 cookie) KABI_RESERVE(3) KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) }; struct iopf_group_extend { -- 2.22.0
2 1
0 0
[PATCH OLK-6.6] mm: revert "mm: shmem: fix data-race in shmem_getattr()"
by Heyuan Wang 18 Dec '24

18 Dec '24
From: Andrew Morton <akpm(a)linux-foundation.org> mainline inclusion from mainline-v6.12 commit d1aa0c04294e29883d65eac6c2f72fe95cc7c049 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IB957P CVE: CVE-2024-53136 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- Revert d949d1d14fa2 ("mm: shmem: fix data-race in shmem_getattr()") as suggested by Chuck [1]. It is causing deadlocks when accessing tmpfs over NFS. As Hugh commented, "added just to silence a syzbot sanitizer splat: added where there has never been any practical problem". Link: https://lkml.kernel.org/r/ZzdxKF39VEmXSSyN@tissot.1015granger.net [1] Fixes: d949d1d14fa2 ("mm: shmem: fix data-race in shmem_getattr()") Acked-by: Hugh Dickins <hughd(a)google.com> Cc: Chuck Lever <chuck.lever(a)oracle.com> Cc: Jeongjun Park <aha310510(a)gmail.com> Cc: Yu Zhao <yuzhao(a)google.com> Cc: <stable(a)vger.kernel.org> Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org> Signed-off-by: Heyuan Wang <wangheyuan2(a)h-partners.com> --- mm/shmem.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index 6901c95370e4..4ba22dea0092 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1167,9 +1167,7 @@ static int shmem_getattr(struct mnt_idmap *idmap, stat->attributes_mask |= (STATX_ATTR_APPEND | STATX_ATTR_IMMUTABLE | STATX_ATTR_NODUMP); - inode_lock_shared(inode); generic_fillattr(idmap, request_mask, inode, stat); - inode_unlock_shared(inode); if (shmem_huge_global_enabled(inode, 0, 0, false, NULL, 0)) stat->blksize = HPAGE_PMD_SIZE; -- 2.25.1
2 1
0 0
[openeuler:OLK-6.6 1613/1613] drivers/char/lsse_sdf_cdev.c:198:62: sparse: sparse: incorrect type in argument 2 (different address spaces)
by kernel test robot 18 Dec '24

18 Dec '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 46064348cc445799cf9e8fd030323a0426fbb5e4 commit: bcb311924fa97b123317ec1d4d4ccce77199c9d2 [1613/1613] LoongArch: add loongson SE SDF support config: loongarch-randconfig-r111-20241210 (https://download.01.org/0day-ci/archive/20241218/202412181438.CJxz4kpl-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce: (https://download.01.org/0day-ci/archive/20241218/202412181438.CJxz4kpl-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/202412181438.CJxz4kpl-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/char/lsse_sdf_cdev.c:198:62: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got char const *buf @@ drivers/char/lsse_sdf_cdev.c:198:62: sparse: expected void const [noderef] __user *from drivers/char/lsse_sdf_cdev.c:198:62: sparse: got char const *buf >> drivers/char/lsse_sdf_cdev.c:239:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected char const *buf @@ got char const [noderef] __user *buf @@ drivers/char/lsse_sdf_cdev.c:239:32: sparse: expected char const *buf drivers/char/lsse_sdf_cdev.c:239:32: sparse: got char const [noderef] __user *buf >> drivers/char/lsse_sdf_cdev.c:248:50: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected char *buf @@ got char [noderef] __user *buf @@ drivers/char/lsse_sdf_cdev.c:248:50: sparse: expected char *buf drivers/char/lsse_sdf_cdev.c:248:50: sparse: got char [noderef] __user *buf >> drivers/char/lsse_sdf_cdev.c:345:30: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct miscdevice *misc @@ got struct miscdevice const * @@ drivers/char/lsse_sdf_cdev.c:345:30: sparse: expected struct miscdevice *misc drivers/char/lsse_sdf_cdev.c:345:30: sparse: got struct miscdevice const * drivers/char/lsse_sdf_cdev.c:361:26: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct miscdevice *misc @@ got struct miscdevice const * @@ drivers/char/lsse_sdf_cdev.c:361:26: sparse: expected struct miscdevice *misc drivers/char/lsse_sdf_cdev.c:361:26: sparse: got struct miscdevice const * drivers/char/lsse_sdf_cdev.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/slab.h): include/linux/page-flags.h:244:46: sparse: sparse: self-comparison always evaluates to false -- >> drivers/char/loongson_se.c:558:30: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct miscdevice *misc @@ got struct miscdevice const * @@ drivers/char/loongson_se.c:558:30: sparse: expected struct miscdevice *misc drivers/char/loongson_se.c:558:30: sparse: got struct miscdevice const * drivers/char/loongson_se.c:581:26: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct miscdevice *misc @@ got struct miscdevice const * @@ drivers/char/loongson_se.c:581:26: sparse: expected struct miscdevice *misc drivers/char/loongson_se.c:581:26: sparse: got struct miscdevice const * drivers/char/loongson_se.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/umh.h, include/linux/kmod.h, ...): include/linux/page-flags.h:244:46: sparse: sparse: self-comparison always evaluates to false vim +198 drivers/char/lsse_sdf_cdev.c 170 171 static int lsse_sdf_send(struct sdf_file_pvt_data *pvt, const char *buf, 172 size_t count, int user) 173 { 174 int ret, se_ret; 175 struct sdf_handle *ph = NULL; 176 struct sdf_kernel_command *skc; 177 struct lsse_sdf_dev *se = pvt->se; 178 179 if (!se->se_ch->smsg) { 180 pr_err("se device is not ready\n"); 181 return 0; 182 } 183 184 if (count > se->se_ch->data_size) { 185 pr_err("Invalid size in send: count=%zd, size=%d\n", 186 count, se->se_ch->data_size); 187 return -EIO; 188 } 189 190 if (user) { 191 ret = mutex_lock_interruptible(&se->data_lock); 192 if (ret) 193 goto out; 194 } else 195 mutex_lock(&se->data_lock); 196 197 if (user) { > 198 ret = copy_from_user(se->se_ch->data_buffer, buf, count); 199 if (ret) { 200 ret = -EFAULT; 201 goto out_unlock; 202 } 203 skc = (struct sdf_kernel_command *)se->se_ch->data_buffer; 204 if (skc->header.command == SDF_CLOSESESSION) 205 ph = find_sdf_handle(skc->handle, pvt); 206 } else 207 memcpy(se->se_ch->data_buffer, buf, count); 208 209 se->processing_cmd = true; 210 ret = se_send_sdf_cmd(se, count, 5); 211 if (ret) { 212 pr_err("se_send_sdf_cmd failed\n"); 213 goto out_unlock; 214 } 215 216 ret = lsse_sdf_recv(pvt, (char *)buf, 0, user, &se_ret); 217 if (ret) { 218 pr_err("recv failed ret: %x\n", ret); 219 goto out_unlock; 220 } 221 if (ph && !se_ret) { 222 list_del(&ph->handle_list); 223 kfree(ph); 224 } 225 out_unlock: 226 mutex_unlock(&se->data_lock); 227 out: 228 return ret; 229 } 230 231 static ssize_t lsse_sdf_write(struct file *filp, const char __user *buf, 232 size_t cnt, loff_t *offt) 233 { 234 struct sdf_file_pvt_data *pvt = filp->private_data; 235 236 if (cnt > SE_SDF_BUFSIZE) 237 return -E2BIG; 238 > 239 if (lsse_sdf_send(pvt, buf, cnt, 1)) 240 return -EFAULT; 241 242 return cnt; 243 } 244 245 static ssize_t lsse_sdf_read(struct file *filp, char __user *buf, 246 size_t size, loff_t *off) 247 { > 248 return lsse_sdf_recv(filp->private_data, buf, size, 1, NULL); 249 } 250 251 static int close_one_handle(struct sdf_file_pvt_data *pvt, struct sdf_handle *ph) 252 { 253 struct sdf_kernel_command *skc = &pvt->skc; 254 255 skc->header.command = 0x205; 256 skc->header.u.param_cnt = 1; 257 skc->header.param_len[0] = 8; 258 skc->handle = ph->handle; 259 /* close one session */ 260 lsse_sdf_send(pvt, (char *)&pvt->skc, KERNEL_COMMAND_SIZE, 0); 261 if (skc->header.u.ret) { 262 pr_err("Auto Close Session failed, session handle: %llx, ret: %d\n", 263 (u64)ph->handle, skc->header.u.ret); 264 return skc->header.u.ret; 265 } 266 kfree(ph); 267 268 return 0; 269 } 270 271 static int close_all_handle(struct sdf_file_pvt_data *pvt) 272 { 273 int ret = 0; 274 struct sdf_handle *ph, *tmp; 275 276 list_for_each_entry_safe(ph, tmp, &pvt->handle_list, handle_list) { 277 list_del(&ph->handle_list); 278 ret = close_one_handle(pvt, ph); 279 if (ret) 280 return ret; 281 } 282 283 return 0; 284 } 285 286 static int lsse_sdf_release(struct inode *inode, struct file *filp) 287 { 288 int ret; 289 struct sdf_file_pvt_data *pvt = filp->private_data; 290 291 ret = close_all_handle(pvt); 292 filp->private_data = NULL; 293 kfree(pvt); 294 295 if (ret) 296 ret = -EFAULT; 297 return ret; 298 } 299 300 static int lsse_sdf_open(struct inode *inode, struct file *filp) 301 { 302 struct sdf_file_pvt_data *pvt = kmalloc(sizeof(*pvt), GFP_KERNEL); 303 304 if (!pvt) 305 return -ENOMEM; 306 307 INIT_LIST_HEAD(&pvt->handle_list); 308 pvt->se = se_sdf_dev; 309 filp->private_data = pvt; 310 311 return 0; 312 } 313 314 static const struct file_operations lsse_sdf_fops = { 315 .owner = THIS_MODULE, 316 .open = lsse_sdf_open, 317 .write = lsse_sdf_write, 318 .read = lsse_sdf_read, 319 .release = lsse_sdf_release, 320 }; 321 322 static const struct miscdevice lsse_sdf_miscdev = { 323 .minor = MISC_DYNAMIC_MINOR, 324 .name = "lsse_sdf", 325 .fops = &lsse_sdf_fops, 326 }; 327 328 static int lsse_sdf_probe(struct platform_device *pdev) 329 { 330 int msg_size; 331 int ret; 332 333 se_sdf_dev = kzalloc(sizeof(*se_sdf_dev), GFP_KERNEL); 334 if (IS_ERR_OR_NULL(se_sdf_dev)) 335 return PTR_ERR(se_sdf_dev); 336 337 mutex_init(&se_sdf_dev->data_lock); 338 init_waitqueue_head(&se_sdf_dev->wq); 339 se_sdf_dev->processing_cmd = false; 340 341 msg_size = 2 * sizeof(struct se_sdf_msg); 342 se_sdf_dev->se_ch = se_init_ch(SE_CH_SDF, SE_SDF_BUFSIZE, msg_size, 343 se_sdf_dev, lsse_sdf_complete); 344 > 345 ret = misc_register(&lsse_sdf_miscdev); 346 if (ret < 0) { 347 pr_err("register sdf dev failed!\n"); 348 goto out; 349 } 350 351 return 0; 352 353 out: 354 kfree(se_sdf_dev); 355 356 return ret; 357 } 358 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH OLK-6.6 v2] bpf: Add kabi reserve padding for uapi struct bpf_link_info
by Pu Lehui 18 Dec '24

18 Dec '24
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IBC248 -------------------------------- Add kabi reserve padding for uapi struct bpf_link_info Signed-off-by: Pu Lehui <pulehui(a)huawei.com> --- include/uapi/linux/bpf.h | 9 +++++++++ tools/include/uapi/linux/bpf.h | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 482647774bf5..a660cb68c853 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -6573,6 +6573,15 @@ struct bpf_link_info { __u64 config; __u32 type; } event; /* BPF_PERF_EVENT_EVENT */ + struct { + __u64:64; + __u32:32; + __u32:32; + __u64:64; + __u64:64; + __u64:64; + __u64:64; + } kabi_reserve; }; } perf_event; struct { diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index c112c6f7c766..9b302242be6c 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h @@ -6576,6 +6576,15 @@ struct bpf_link_info { __u64 config; __u32 type; } event; /* BPF_PERF_EVENT_EVENT */ + struct { + __u64:64; + __u32:32; + __u32:32; + __u64:64; + __u64:64; + __u64:64; + __u64:64; + } kabi_reserve; }; } perf_event; struct { -- 2.34.1
2 1
0 0
[PATCH OLK-5.10] soc: hisilicon: hbmdev: Only support built-in
by Zhang Zekun 18 Dec '24

18 Dec '24
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IB78B0 ----------------------------------------------------------- Only support built in compile for hisi_hbmdev. We need to use lock_device_hotplug_sysfs() to prevent directly racing on acpi_scan_lock(), hbm memory can be time consumed during power on. Signed-off-by: Zhang Zekun <zhangzekun11(a)huawei.com> --- arch/arm64/configs/openeuler_defconfig | 2 +- drivers/soc/hisilicon/Kconfig | 2 +- drivers/soc/hisilicon/hisi_hbmdev.c | 19 ++++++++++++++++--- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/arch/arm64/configs/openeuler_defconfig b/arch/arm64/configs/openeuler_defconfig index 4c117f2f55f1..dba4e3b2e79a 100644 --- a/arch/arm64/configs/openeuler_defconfig +++ b/arch/arm64/configs/openeuler_defconfig @@ -6117,7 +6117,7 @@ CONFIG_QCOM_KRYO_L2_ACCESSORS=y # Hisilicon SoC drivers # CONFIG_KUNPENG_HCCS=m -CONFIG_HISI_HBMDEV=m +CONFIG_HISI_HBMDEV=y CONFIG_HISI_HBMCACHE=m CONFIG_HISI_HBMDEV_ACLS=y CONFIG_HISI_L3T=m diff --git a/drivers/soc/hisilicon/Kconfig b/drivers/soc/hisilicon/Kconfig index 0e79de44a01f..2dc1a2060d30 100644 --- a/drivers/soc/hisilicon/Kconfig +++ b/drivers/soc/hisilicon/Kconfig @@ -19,7 +19,7 @@ config KUNPENG_HCCS health status and port information of HCCS on Kunpeng SoC. config HISI_HBMDEV - tristate "add extra support for hbm memory device" + bool "add extra support for hbm memory device" depends on ACPI_HOTPLUG_MEMORY select ACPI_CONTAINER help diff --git a/drivers/soc/hisilicon/hisi_hbmdev.c b/drivers/soc/hisilicon/hisi_hbmdev.c index f09388a80009..4bf3a17fc2a8 100644 --- a/drivers/soc/hisilicon/hisi_hbmdev.c +++ b/drivers/soc/hisilicon/hisi_hbmdev.c @@ -59,9 +59,8 @@ static int memdev_power_on(struct acpi_device *adev) acpi_handle handle = adev->handle; acpi_status status; - acpi_scan_lock_acquire(); + /* Power on and online the devices */ status = acpi_evaluate_object(handle, "_ON", NULL, NULL); - acpi_scan_lock_release(); if (ACPI_FAILURE(status)) { acpi_handle_warn(handle, "Power on failed (0x%x)\n", status); return -ENODEV; @@ -100,6 +99,7 @@ static int memdev_power_off(struct acpi_device *adev) acpi_dev_for_each_child(adev, hbmdev_check, NULL); acpi_scan_lock_release(); + /* Eject the devices and power off */ status = acpi_evaluate_object(handle, "_OFF", NULL, NULL); if (ACPI_FAILURE(status)) { return -ENODEV; @@ -112,7 +112,12 @@ static ssize_t state_store(struct device *dev, struct device_attribute *attr, { struct acpi_device *adev = ACPI_COMPANION(dev); const int type = online_type_from_str(buf); - int ret = -EINVAL; + int ret; + + /* Disallow pending on the mutex to avoid potential hung task*/ + ret = lock_device_hotplug_sysfs(); + if (ret) + return ret; switch (type) { case STATE_ONLINE: @@ -124,6 +129,7 @@ static ssize_t state_store(struct device *dev, struct device_attribute *attr, default: break; } + unlock_device_hotplug(); if (ret) return ret; @@ -196,9 +202,16 @@ static int container_init(void) return 0; } +static struct acpi_platform_list kunpeng_hbm_plat_info[] = { + {"HISI ", "HIP11 ", 0, ACPI_SIG_IORT, all_versions, NULL, 0}, + { } +}; static int __init hbmdev_init(void) { + if (acpi_match_platform_list(kunpeng_hbm_plat_info) < 0) + return 0; + return container_init(); } module_init(hbmdev_init); -- 2.22.0
2 1
0 0
[PATCH OLK-6.6] bpf: Add kabi reserve padding for uapi struct bpf_link_info
by Pu Lehui 18 Dec '24

18 Dec '24
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IBC248 -------------------------------- Add kabi reserve padding for uapi struct bpf_link_info Signed-off-by: Pu Lehui <pulehui(a)huawei.com> --- include/uapi/linux/bpf.h | 9 +++++++++ tools/include/uapi/linux/bpf.h | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 482647774bf5..9ba68e07ba6e 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -6573,6 +6573,15 @@ struct bpf_link_info { __u64 config; __u32 type; } event; /* BPF_PERF_EVENT_EVENT */ + struct { + __u64 :64; + __u32 :32; + __u32 :32; + __u64 :64; + __u64 :64; + __u64 :64; + __u64 :64; + } kabi_reserve; }; } perf_event; struct { diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index c112c6f7c766..145e33162730 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h @@ -6576,6 +6576,15 @@ struct bpf_link_info { __u64 config; __u32 type; } event; /* BPF_PERF_EVENT_EVENT */ + struct { + __u64 :64; + __u32 :32; + __u32 :32; + __u64 :64; + __u64 :64; + __u64 :64; + __u64 :64; + } kabi_reserve; }; } perf_event; struct { -- 2.34.1
2 1
0 0
[PATCH OLK-6.6] kabi: net: reserve space for xdp subsystem related structure
by Zhang Changzhong 18 Dec '24

18 Dec '24
hulk inclusion category: other bugzilla: https://gitee.com/openeuler/kernel/issues/I8OWRC ---------------------------------------------------- Reserve some fields beforehand for xdp framework related structures prone to change. Signed-off-by: Zhang Changzhong <zhangchangzhong(a)huawei.com> --- include/net/xdp.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/include/net/xdp.h b/include/net/xdp.h index c283668..ebebadc 100644 --- a/include/net/xdp.h +++ b/include/net/xdp.h @@ -54,6 +54,9 @@ enum xdp_mem_type { struct xdp_mem_info { u32 type; /* enum xdp_mem_type, but known size type */ u32 id; + + KABI_RESERVE(1); + KABI_RESERVE(2); }; struct page_pool; @@ -74,6 +77,9 @@ struct xdp_rxq_info { struct xdp_txq_info { struct net_device *dev; + + KABI_RESERVE(1); + KABI_RESERVE(2); }; enum xdp_buff_flags { @@ -92,6 +98,11 @@ struct xdp_buff { struct xdp_txq_info *txq; u32 frame_sz; /* frame size to deduce data_hard_end/reserved tailroom*/ u32 flags; /* supported values defined in xdp_buff_flags */ + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; static __always_inline bool xdp_buff_has_frags(struct xdp_buff *xdp) @@ -181,6 +192,11 @@ struct xdp_frame { struct net_device *dev_rx; /* used by cpumap */ u32 frame_sz; u32 flags; /* supported values defined in xdp_buff_flags */ + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; static __always_inline bool xdp_frame_has_frags(struct xdp_frame *frame) @@ -198,6 +214,9 @@ struct xdp_frame_bulk { int count; void *xa; void *q[XDP_BULK_QUEUE_SIZE]; + + KABI_RESERVE(1); + KABI_RESERVE(2); }; static __always_inline void xdp_frame_bulk_init(struct xdp_frame_bulk *bq) -- 2.9.5
2 1
0 0
  • ← Newer
  • 1
  • ...
  • 273
  • 274
  • 275
  • 276
  • 277
  • 278
  • 279
  • ...
  • 1828
  • Older →

HyperKitty Powered by HyperKitty