<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/edac, branch v5.19</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-07-27T08:42:52Z</updated>
<entry>
<title>EDAC/ghes: Set the DIMM label unconditionally</title>
<updated>2022-07-27T08:42:52Z</updated>
<author>
<name>Toshi Kani</name>
<email>toshi.kani@hpe.com</email>
</author>
<published>2022-07-21T18:05:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5e2805d5379619c4a2e3ae4994e73b36439f4bad'/>
<id>urn:sha1:5e2805d5379619c4a2e3ae4994e73b36439f4bad</id>
<content type='text'>
The commit

  cb51a371d08e ("EDAC/ghes: Setup DIMM label from DMI and use it in error reports")

enforced that both the bank and device strings passed to
dimm_setup_label() are not NULL.

However, there are BIOSes, for example on a

  HPE ProLiant DL360 Gen10/ProLiant DL360 Gen10, BIOS U32 03/15/2019

which don't populate both strings:

  Handle 0x0020, DMI type 17, 84 bytes
  Memory Device
          Array Handle: 0x0013
          Error Information Handle: Not Provided
          Total Width: 72 bits
          Data Width: 64 bits
          Size: 32 GB
          Form Factor: DIMM
          Set: None
          Locator: PROC 1 DIMM 1        &lt;===== device
          Bank Locator: Not Specified   &lt;===== bank

This results in a buffer overflow because ghes_edac_register() calls
strlen() on an uninitialized label, which had non-zero values left over
from krealloc_array():

  detected buffer overflow in __fortify_strlen
   ------------[ cut here ]------------
   kernel BUG at lib/string_helpers.c:983!
   invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
   CPU: 1 PID: 1 Comm: swapper/0 Tainted: G          I       5.18.6-200.fc36.x86_64 #1
   Hardware name: HPE ProLiant DL360 Gen10/ProLiant DL360 Gen10, BIOS U32 03/15/2019
   RIP: 0010:fortify_panic
   ...
   Call Trace:
    &lt;TASK&gt;
    ghes_edac_register.cold
    ghes_probe
    platform_probe
    really_probe
    __driver_probe_device
    driver_probe_device
    __driver_attach
    ? __device_attach_driver
    bus_for_each_dev
    bus_add_driver
    driver_register
    acpi_ghes_init
    acpi_init
    ? acpi_sleep_proc_init
    do_one_initcall

The label contains garbage because the commit in Fixes reallocs the
DIMMs array while scanning the system but doesn't clear the newly
allocated memory.

Change dimm_setup_label() to always initialize the label to fix the
issue. Set it to the empty string in case BIOS does not provide both
bank and device so that ghes_edac_register() can keep the default label
given by edac_mc_alloc_dimms().

  [ bp: Rewrite commit message. ]

Fixes: b9cae27728d1f ("EDAC/ghes: Scan the system once on driver init")
Co-developed-by: Robert Richter &lt;rric@kernel.org&gt;
Signed-off-by: Robert Richter &lt;rric@kernel.org&gt;
Signed-off-by: Toshi Kani &lt;toshi.kani@hpe.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Tested-by: Robert Elliott &lt;elliott@hpe.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20220719220124.760359-1-toshi.kani@hpe.com
</content>
</entry>
<entry>
<title>EDAC/synopsys: Re-enable the error interrupts on v3 hw</title>
<updated>2022-07-22T12:31:38Z</updated>
<author>
<name>Sherry Sun</name>
<email>sherry.sun@nxp.com</email>
</author>
<published>2022-04-27T01:51:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4bcffe941758ee17becb43af3b25487f848f6512'/>
<id>urn:sha1:4bcffe941758ee17becb43af3b25487f848f6512</id>
<content type='text'>
zynqmp_get_error_info() writes 0 to the ECC_CLR_OFST register after
an interrupt for a {un-,}correctable error is raised, which disables
the error interrupts. Then the interrupt handler will be called only
once. Therefore, re-enable the error interrupt line at the end of
intr_handler() for v3.x Synopsys EDAC DDR.

Fixes: f7824ded4149 ("EDAC/synopsys: Add support for version 3 of the Synopsys EDAC DDR")
Signed-off-by: Sherry Sun &lt;sherry.sun@nxp.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Reviewed-by: Shubhrajyoti Datta &lt;Shubhrajyoti.datta@xilinx.com&gt;
Acked-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20220427015137.8406-3-sherry.sun@nxp.com
</content>
</entry>
<entry>
<title>EDAC/synopsys: Use the correct register to disable the error interrupt on v3 hw</title>
<updated>2022-07-22T12:31:30Z</updated>
<author>
<name>Sherry Sun</name>
<email>sherry.sun@nxp.com</email>
</author>
<published>2022-04-27T01:51:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=be76ceaf03bc04e74be5e28f608316b73c2b04ad'/>
<id>urn:sha1:be76ceaf03bc04e74be5e28f608316b73c2b04ad</id>
<content type='text'>
v3.x Synopsys EDAC DDR doesn't have the QOS Interrupt register. Use the
ECC Clear Register to disable the error interrupts instead.

Fixes: f7824ded4149 ("EDAC/synopsys: Add support for version 3 of the Synopsys EDAC DDR")
Signed-off-by: Sherry Sun &lt;sherry.sun@nxp.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Reviewed-by: Shubhrajyoti Datta &lt;Shubhrajyoti.datta@xilinx.com&gt;
Acked-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20220427015137.8406-2-sherry.sun@nxp.com
</content>
</entry>
<entry>
<title>Merge tag 'x86_misc_for_v5.19_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2022-05-24T02:32:59Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-05-24T02:32:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=abc8babefbc1fc6f013573bc933d66bc906cf726'/>
<id>urn:sha1:abc8babefbc1fc6f013573bc933d66bc906cf726</id>
<content type='text'>
Pull misc x86 updates from Borislav Petkov:
 "A variety of fixes which don't fit any other tip bucket:

   - Remove unnecessary function export

   - Correct asm constraint

   - Fix __setup handlers retval"

* tag 'x86_misc_for_v5.19_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/mm: Cleanup the control_va_addr_alignment() __setup handler
  x86: Fix return value of __setup handlers
  x86/delay: Fix the wrong asm constraint in delay_loop()
  x86/amd_nb: Unexport amd_cache_northbridges()
</content>
</entry>
<entry>
<title>Merge tag 'edac_updates_for_v5.19_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras</title>
<updated>2022-05-24T00:34:20Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-05-24T00:34:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0be3ff0ccbfacb1bcc56e2ec9c1c5d92cf9a64d3'/>
<id>urn:sha1:0be3ff0ccbfacb1bcc56e2ec9c1c5d92cf9a64d3</id>
<content type='text'>
Pull EDAC updates from Borislav Petkov:

 - Switch ghes_edac to use the CPER error reporting routines and
   simplify the code considerably this way

 - Rip out the silly edac_align_ptr() contraption which was computing
   the size of the private structures of each driver and thus allowing
   for a one-shot memory allocation. This was clearly unnecessary and
   confusing so switch to simple and boring kmalloc* calls.

 - Last but not least, the usual garden variety of fixes, cleanups and
   improvements all over EDAC land

* tag 'edac_updates_for_v5.19_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
  EDAC/xgene: Fix typo processsors -&gt; processors
  EDAC/i5100: Remove unused inline function i5100_nrecmema_dm_buf_id()
  EDAC: Use kcalloc()
  EDAC/ghes: Change ghes_hw from global to static
  EDAC/armada_xp: Use devm_platform_ioremap_resource()
  EDAC/synopsys: Add a SPDX identifier
  EDAC/synopsys: Add driver support for i.MX platforms
  EDAC/dmc520: Don't print an error for each unconfigured interrupt line
  EDAC/mc: Get rid of edac_align_ptr()
  EDAC/device: Sanitize edac_device_alloc_ctl_info() definition
  EDAC/device: Get rid of the silly one-shot memory allocation in edac_device_alloc_ctl_info()
  EDAC/pci: Get rid of the silly one-shot memory allocation in edac_pci_alloc_ctl_info()
  EDAC/mc: Get rid of silly one-shot struct allocation in edac_mc_alloc()
  efi/cper: Reformat CPER memory error location to more readable
  EDAC/ghes: Unify CPER memory error location reporting
  efi/cper: Add a cper_mem_err_status_str() to decode error description
  powerpc/85xx: Remove fsl,85... bindings
</content>
</entry>
<entry>
<title>Merge branches 'edac-misc' and 'edac-alloc-cleanup' into edac-updates-for-v5.19</title>
<updated>2022-05-23T08:19:30Z</updated>
<author>
<name>Borislav Petkov</name>
<email>bp@suse.de</email>
</author>
<published>2022-05-23T08:19:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=be80a1ca5119c5d31b6019d5e6dc6d9123bda959'/>
<id>urn:sha1:be80a1ca5119c5d31b6019d5e6dc6d9123bda959</id>
<content type='text'>
Combine all collected EDAC changes for submission into v5.19:

* edac-misc:
  EDAC/xgene: Fix typo processsors -&gt; processors
  EDAC/i5100: Remove unused inline function i5100_nrecmema_dm_buf_id()
  EDAC/ghes: Change ghes_hw from global to static
  EDAC/armada_xp: Use devm_platform_ioremap_resource()
  EDAC/synopsys: Add a SPDX identifier
  EDAC/synopsys: Add driver support for i.MX platforms
  EDAC/dmc520: Don't print an error for each unconfigured interrupt line
  efi/cper: Reformat CPER memory error location to more readable
  EDAC/ghes: Unify CPER memory error location reporting
  efi/cper: Add a cper_mem_err_status_str() to decode error description
  powerpc/85xx: Remove fsl,85... bindings

* edac-alloc-cleanup:
  EDAC: Use kcalloc()
  EDAC/mc: Get rid of edac_align_ptr()
  EDAC/device: Sanitize edac_device_alloc_ctl_info() definition
  EDAC/device: Get rid of the silly one-shot memory allocation in edac_device_alloc_ctl_info()
  EDAC/pci: Get rid of the silly one-shot memory allocation in edac_pci_alloc_ctl_info()
  EDAC/mc: Get rid of silly one-shot struct allocation in edac_mc_alloc()

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
</content>
</entry>
<entry>
<title>EDAC/xgene: Fix typo processsors -&gt; processors</title>
<updated>2022-05-21T14:03:49Z</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@inria.fr</email>
</author>
<published>2022-05-21T11:10:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2aeb1f5fbbacbe159690ef7338503f323b0d4f46'/>
<id>urn:sha1:2aeb1f5fbbacbe159690ef7338503f323b0d4f46</id>
<content type='text'>
Spelling mistake (triple letters) in comment. Detected with the help of
Coccinelle.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@inria.fr&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lore.kernel.org/r/20220521111145.81697-39-Julia.Lawall@inria.fr
</content>
</entry>
<entry>
<title>EDAC/i5100: Remove unused inline function i5100_nrecmema_dm_buf_id()</title>
<updated>2022-05-17T15:44:50Z</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2022-05-14T08:04:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2edb9863e12566259503b2695d1c252c775b0ee7'/>
<id>urn:sha1:2edb9863e12566259503b2695d1c252c775b0ee7</id>
<content type='text'>
Commit

  a4972b1b9a04 ("edac: i5100_edac: Remove unused i5100_recmema_dm_buf_id")

left this function unused. Remove it.

Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lore.kernel.org/r/20220514080433.29944-1-yuehaibing@huawei.com
</content>
</entry>
<entry>
<title>EDAC: Use kcalloc()</title>
<updated>2022-05-02T09:32:44Z</updated>
<author>
<name>Borislav Petkov</name>
<email>bp@suse.de</email>
</author>
<published>2022-04-12T21:10:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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/ghes: Change ghes_hw from global to static</title>
<updated>2022-04-29T09:23:09Z</updated>
<author>
<name>Tom Rix</name>
<email>trix@redhat.com</email>
</author>
<published>2022-04-21T13:53:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=815fad6e4f9c7dcd3336b989d84ee02fd912d29e'/>
<id>urn:sha1:815fad6e4f9c7dcd3336b989d84ee02fd912d29e</id>
<content type='text'>
Smatch reports this issue
  ghes_edac.c:44:3: warning: symbol 'ghes_hw' was not declared. Should it be static?

ghes_hw is used only in ghes_edac.c so change its storage-class
specifier to static.

Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lore.kernel.org/r/20220421135319.1508754-1-trix@redhat.com
</content>
</entry>
</feed>
