<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/edac/edac_mc.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-11-28T15:39:12+00:00</updated>
<entry>
<title>EDAC/mc: Add support for HBM3 memory type</title>
<updated>2023-11-28T15:39:12+00:00</updated>
<author>
<name>Muralidhara M K</name>
<email>muralidhara.mk@amd.com</email>
</author>
<published>2023-11-02T11:42:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9a5f580c1c71b6aedba696c4898a7a7184cef8ad'/>
<id>urn:sha1:9a5f580c1c71b6aedba696c4898a7a7184cef8ad</id>
<content type='text'>
AMD MI300A models use HBM3 (High Bandwidth Memory Gen 3) memory. HBM is
a high-speed computer memory interface for 3D-stacked synchronous
dynamic random-access memory (SDRAM).

Signed-off-by: Muralidhara M K &lt;muralidhara.mk@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Link: https://lore.kernel.org/r/20231102114225.2006878-4-muralimk@amd.com
</content>
</entry>
<entry>
<title>EDAC/mc: Drop duplicated dimm-&gt;nr_pages debug printout</title>
<updated>2022-09-01T06:52:18+00:00</updated>
<author>
<name>Serge Semin</name>
<email>Sergey.Semin@baikalelectronics.ru</email>
</author>
<published>2022-08-22T19:07:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=93df19476535a4ed871bc5eae719b6d67cf3abc3'/>
<id>urn:sha1:93df19476535a4ed871bc5eae719b6d67cf3abc3</id>
<content type='text'>
The duplicated edac_dbg()-based dimm-&gt;nr_pages print was introduced in

  6e84d359b2be ("edac_mc: Cleanup per-dimm_info debug messages").

The duplicated line can be found even in the commit message text:

  [ 1011.380101] EDAC DEBUG: edac_mc_dump_dimm:   dimm-&gt;nr_pages = 0x40000
  [ 1011.380103] EDAC DEBUG: edac_mc_dump_dimm:   dimm-&gt;grain = 8
  [ 1011.380104] EDAC DEBUG: edac_mc_dump_dimm:   dimm-&gt;nr_pages = 0x40000

Drop the second edac_dbg() call.

  [ bp: Massage commit message. ]

Signed-off-by: Serge Semin &lt;Sergey.Semin@baikalelectronics.ru&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lore.kernel.org/r/20220822190730.27277-14-Sergey.Semin@baikalelectronics.ru
</content>
</entry>
<entry>
<title>EDAC: Use kcalloc()</title>
<updated>2022-05-02T09:32:44+00:00</updated>
<author>
<name>Borislav Petkov</name>
<email>bp@suse.de</email>
</author>
<published>2022-04-12T21:10:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=13088b65d93a1c29f07f97931c2b69788ad58f04'/>
<id>urn:sha1:13088b65d93a1c29f07f97931c2b69788ad58f04</id>
<content type='text'>
It is syntactic sugar anyway:

  # drivers/edac/edac_mc.o:

   text    data     bss     dec     hex filename
  13378     324       8   13710    358e edac_mc.o.before
  13378     324       8   13710    358e edac_mc.o.after

md5:
   70a53ee3ac7f867730e35c2be9110748  edac_mc.o.before.asm
   70a53ee3ac7f867730e35c2be9110748  edac_mc.o.after.asm

  # drivers/edac/edac_device.o:

   text    data     bss     dec     hex filename
   5704     120       4    5828    16c4 edac_device.o.before
   5704     120       4    5828    16c4 edac_device.o.after

md5:
   880563c859da6eb9aca85ec431fdbaeb  edac_device.o.before.asm
   880563c859da6eb9aca85ec431fdbaeb  edac_device.o.after.asm

No functional changes.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lore.kernel.org/r/20220412211957.28899-1-bp@alien8.de
</content>
</entry>
<entry>
<title>EDAC/mc: Get rid of edac_align_ptr()</title>
<updated>2022-04-11T10:04:11+00:00</updated>
<author>
<name>Borislav Petkov</name>
<email>bp@suse.de</email>
</author>
<published>2022-03-08T17:05:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=713c4ff8859c3db4dc8dbf5eec33434b9a3fb76b'/>
<id>urn:sha1:713c4ff8859c3db4dc8dbf5eec33434b9a3fb76b</id>
<content type='text'>
Get rid of it now that it is unused.

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lore.kernel.org/r/20220310095254.1510-6-bp@alien8.de
</content>
</entry>
<entry>
<title>EDAC/mc: Get rid of silly one-shot struct allocation in edac_mc_alloc()</title>
<updated>2022-04-11T09:25:39+00:00</updated>
<author>
<name>Borislav Petkov</name>
<email>bp@suse.de</email>
</author>
<published>2022-02-20T21:34:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0bbb265f7089584aaa6d440805ca75ea4f3930d4'/>
<id>urn:sha1:0bbb265f7089584aaa6d440805ca75ea4f3930d4</id>
<content type='text'>
This has probably meant something at some point but there's no need for
it anymore - the struct mem_ctl_info allocation can happen with normal,
boring k*alloc() calls like everyone else does it.

No functional changes.

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lore.kernel.org/r/20220310095254.1510-2-bp@alien8.de
</content>
</entry>
<entry>
<title>Merge branch 'edac-amd64' into edac-updates-for-v5.18</title>
<updated>2022-03-21T09:34:57+00:00</updated>
<author>
<name>Borislav Petkov</name>
<email>bp@suse.de</email>
</author>
<published>2022-03-21T09:34:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1422df58e5eb83dca131dc64e0f307a1f9e56078'/>
<id>urn:sha1:1422df58e5eb83dca131dc64e0f307a1f9e56078</id>
<content type='text'>
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
</content>
</entry>
<entry>
<title>EDAC: Fix calculation of returned address and next offset in edac_align_ptr()</title>
<updated>2022-02-15T14:54:46+00:00</updated>
<author>
<name>Eliav Farber</name>
<email>farbere@amazon.com</email>
</author>
<published>2022-01-13T10:06:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f8efca92ae509c25e0a4bd5d0a86decea4f0c41e'/>
<id>urn:sha1:f8efca92ae509c25e0a4bd5d0a86decea4f0c41e</id>
<content type='text'>
Do alignment logic properly and use the "ptr" local variable for
calculating the remainder of the alignment.

This became an issue because struct edac_mc_layer has a size that is not
zero modulo eight, and the next offset that was prepared for the private
data was unaligned, causing an alignment exception.

The patch in Fixes: which broke this actually wanted to "what we
actually care about is the alignment of the actual pointer that's about
to be returned." But it didn't check that alignment.

Use the correct variable "ptr" for that.

  [ bp: Massage commit message. ]

Fixes: 8447c4d15e35 ("edac: Do alignment logic properly in edac_align_ptr()")
Signed-off-by: Eliav Farber &lt;farbere@amazon.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20220113100622.12783-2-farbere@amazon.com
</content>
</entry>
<entry>
<title>EDAC/mc: Remove unnecessary cast to char * in edac_align_ptr()</title>
<updated>2022-01-26T18:42:09+00:00</updated>
<author>
<name>Eliav Farber</name>
<email>farbere@amazon.com</email>
</author>
<published>2022-01-13T10:06:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b0596da1a019c092ca5ab64d6999f5e28d52865e'/>
<id>urn:sha1:b0596da1a019c092ca5ab64d6999f5e28d52865e</id>
<content type='text'>
Remove the forgotten (char *) casts as that function returns void *.

  [ bp: Rewrite commit message. ]

Signed-off-by: Eliav Farber &lt;farbere@amazon.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lore.kernel.org/r/20220113100622.12783-3-farbere@amazon.com
</content>
</entry>
<entry>
<title>EDAC: Add RDDR5 and LRDDR5 memory types</title>
<updated>2021-12-10T11:51:28+00:00</updated>
<author>
<name>Yazen Ghannam</name>
<email>yazen.ghannam@amd.com</email>
</author>
<published>2021-12-08T17:43:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f95711242390d759f69fd67ad46b31491fe904d6'/>
<id>urn:sha1:f95711242390d759f69fd67ad46b31491fe904d6</id>
<content type='text'>
Include Registered-DDR5 and Load-Reduced DDR5 in the list of memory
types.

Signed-off-by: Yazen Ghannam &lt;yazen.ghannam@amd.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lore.kernel.org/r/20211208174356.1997855-2-yazen.ghannam@amd.com
</content>
</entry>
<entry>
<title>EDAC/mc: Replace strcpy(), sprintf() and snprintf() with strscpy() or scnprintf()</title>
<updated>2021-09-15T11:52:58+00:00</updated>
<author>
<name>Len Baker</name>
<email>len.baker@gmx.com</email>
</author>
<published>2021-09-03T15:05:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fca6116564181a76c32bf89a0452585f5cb10004'/>
<id>urn:sha1:fca6116564181a76c32bf89a0452585f5cb10004</id>
<content type='text'>
strcpy() performs no bounds checking on the destination buffer. This
could result in linear overflows beyond the end of the buffer, leading
to all kinds of misbehavior. The safe replacement is strscpy().
[1][2]

However, to simplify and clarify the code, to concatenate labels use the
scnprintf() function. This way it is not necessary to check the return
value of strscpy() (-E2BIG if the parameter count is 0 or the src was
truncated) since scnprintf() always returns the number of chars written
into the buffer. This function always returns a nul-terminated string
even if it needs to be truncated.

While at it, fix all other broken string generation code that wrongly
interprets snprintf()'s return code or just uses sprintf(), implement
that using scnprintf() here too. Drop breaks in loops around
scnprintf() as it is safe now to loop.

Moreover, the check is not needed: for the case when the buffer is
exhausted, len never gets zero because scnprintf() takes the full buffer
length as input parameter, but excludes the trailing '\0' in its return
code and thus, 1 is the minimum len.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy
[2] https://github.com/KSPP/linux/issues/88

 [ rric: Replace snprintf() with scnprintf(), rework sprintf() user,
   drop breaks in loops around scnprintf(), introduce 'end' pointer to
   reduce pointer arithmetic, use prefix pattern for e-&gt;location,
   adjust subject and description ]

Co-developed-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Len Baker &lt;len.baker@gmx.com&gt;
Signed-off-by: Robert Richter &lt;rrichter@amd.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lkml.kernel.org/r/20210903150539.7282-1-len.baker@gmx.com
</content>
</entry>
</feed>
