RE: [PATCH v20 00/15] EDAC: Scrub: introduce generic EDAC RAS control feature driver + CXL/ACPI-RAS2 drivers

Shiju Jose posted 15 patches 11 months, 2 weeks ago
Only 0 patches received!
There is a newer version of this series
RE: [PATCH v20 00/15] EDAC: Scrub: introduce generic EDAC RAS control feature driver + CXL/ACPI-RAS2 drivers
Posted by Shiju Jose 11 months, 2 weeks ago
>-----Original Message-----
>From: Borislav Petkov <bp@alien8.de>
>Sent: 24 February 2025 19:36
>To: Shiju Jose <shiju.jose@huawei.com>
>Cc: linux-edac@vger.kernel.org; linux-cxl@vger.kernel.org; linux-
>acpi@vger.kernel.org; linux-mm@kvack.org; linux-kernel@vger.kernel.org;
>linux-doc@vger.kernel.org; tony.luck@intel.com; rafael@kernel.org;
>lenb@kernel.org; mchehab@kernel.org; dan.j.williams@intel.com;
>dave@stgolabs.net; Jonathan Cameron <jonathan.cameron@huawei.com>;
>dave.jiang@intel.com; alison.schofield@intel.com; vishal.l.verma@intel.com;
>ira.weiny@intel.com; david@redhat.com; Vilas.Sridharan@amd.com;
>leo.duran@amd.com; Yazen.Ghannam@amd.com; rientjes@google.com;
>jiaqiyan@google.com; Jon.Grimm@amd.com; dave.hansen@linux.intel.com;
>naoya.horiguchi@nec.com; james.morse@arm.com; jthoughton@google.com;
>somasundaram.a@hpe.com; erdemaktas@google.com; pgonda@google.com;
>duenwen@google.com; gthelen@google.com;
>wschwartz@amperecomputing.com; dferguson@amperecomputing.com;
>wbs@os.amperecomputing.com; nifan.cxl@gmail.com; tanxiaofei
><tanxiaofei@huawei.com>; Zengtao (B) <prime.zeng@hisilicon.com>; Roberto
>Sassu <roberto.sassu@huawei.com>; kangkang.shen@futurewei.com;
>wanghuiqiang <wanghuiqiang@huawei.com>; Linuxarm
><linuxarm@huawei.com>
>Subject: Re: [PATCH v20 00/15] EDAC: Scrub: introduce generic EDAC RAS
>control feature driver + CXL/ACPI-RAS2 drivers
>
>On Mon, Feb 24, 2025 at 06:30:48PM +0000, Shiju Jose wrote:
>> Testing rest of the patches for CXL RAS features and ACPI RAS2 scrub
>> feature in this branch are worked fine.
>
>Thanks.
>
>Unfortunately, my randbuild tests trigger issues:

Hi Borislav,

Thanks for spotting this bug.

Do you want me to send the fix in the next version?

Please find the fix below:

diff --git a/drivers/edac/mem_repair.c b/drivers/edac/mem_repair.c index cbe5a722715d..3b1a845457b0 100755
--- a/drivers/edac/mem_repair.c
+++ b/drivers/edac/mem_repair.c
@@ -322,7 +322,7 @@ static int mem_repair_create_desc(struct device *dev,
                return -ENOMEM;
 
        for (i = 0; i < MR_MAX_ATTRS; i++) {
-               memcpy(&ctx->mem_repair_dev_attr[i].dev_attr,
+               memcpy(&ctx->mem_repair_dev_attr[i],
                       &dev_attr[i], sizeof(dev_attr[i]));
                ctx->mem_repair_attrs[i] =
                        &ctx->mem_repair_dev_attr[i].dev_attr.attr;

Thanks,
Shiju

>
>In file included from drivers/edac/mem_repair.c:12:
>In file included from ./include/linux/edac.h:16:
>In file included from ./include/linux/device.h:15:
>In file included from ./include/linux/dev_printk.h:16:
>In file included from ./include/linux/ratelimit.h:6:
>In file included from ./include/linux/sched.h:13:
>In file included from ./arch/x86/include/asm/processor.h:19:
>In file included from ./arch/x86/include/asm/cpuid.h:71:
>In file included from ./arch/x86/include/asm/paravirt.h:21:
>In file included from ./include/linux/cpumask.h:12:
>In file included from ./include/linux/bitmap.h:13:
>In file included from ./include/linux/string.h:392:
>./include/linux/fortify-string.h:571:4: error: call to '__write_overflow_field'
>declared with 'warning' attribute: detected write beyond size of field (1st
>parameter); maybe use struct_group()? [-Werror,-Wattribute-warning]
>  571 |                         __write_overflow_field(p_size_field, size);
>      |                         ^
>1 error generated.
>make[4]: *** [scripts/Makefile.build:207: drivers/edac/mem_repair.o] Error 1
>make[4]: *** Waiting for unfinished jobs....
>make[3]: *** [scripts/Makefile.build:465: drivers/edac] Error 2
>make[3]: *** Waiting for unfinished jobs....
>make[2]: *** [scripts/Makefile.build:465: drivers] Error 2
>make[2]: *** Waiting for unfinished jobs....
>make[1]: *** [/home/amd/kernel/linux/Makefile:1989: .] Error 2
>make: *** [Makefile:251: __sub-make] Error 2
>
>That's a allmodconfig-x86_64-clang build.
>
>gcc triggers it too:
>
>In file included from ./include/linux/string.h:392,
>                 from ./include/linux/bitmap.h:13,
>                 from ./include/linux/cpumask.h:12,
>                 from ./arch/x86/include/asm/paravirt.h:21,
>                 from ./arch/x86/include/asm/cpuid.h:71,
>                 from ./arch/x86/include/asm/processor.h:19,
>                 from ./include/linux/sched.h:13,
>                 from ./include/linux/ratelimit.h:6,
>                 from ./include/linux/dev_printk.h:16,
>                 from ./include/linux/device.h:15,
>                 from ./include/linux/edac.h:16,
>                 from drivers/edac/mem_repair.c:12:
>In function ‘fortify_memcpy_chk’,
>    inlined from ‘mem_repair_create_desc’ at drivers/edac/mem_repair.c:325:3:
>./include/linux/fortify-string.h:571:25: error: call to ‘__write_overflow_field’
>declared with attribute warning: detected write beyond size of field (1st
>parameter); maybe use struct_group()? [-Werror=attribute-warning]
>  571 |                         __write_overflow_field(p_size_field, size);
>      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>cc1: all warnings being treated as errors
>make[4]: *** [scripts/Makefile.build:207: drivers/edac/mem_repair.o] Error 1
>make[3]: *** [scripts/Makefile.build:465: drivers/edac] Error 2
>make[3]: *** Waiting for unfinished jobs....
>make[2]: *** [scripts/Makefile.build:465: drivers] Error 2
>make[1]: *** [/home/amd/kernel/linux/Makefile:1989: .] Error 2
>make: *** [Makefile:251: __sub-make] Error 2 11-22-09-allmodconfig-x86_64-
>20849.log (END)
>
>--
>Regards/Gruss,
>    Boris.
>
>https://people.kernel.org/tglx/notes-about-netiquette