lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 27 Jun 2008 12:13:38 -0600
From:	dougthompson@...ssion.com
To:	bluesmoke-devel@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: [PATCH 10/13] EDAC core fix added newline to sysfs dimm labels

From: Arthur Jones <ajones@...erbed.com>

Applied to linux-2.6.26-rc5-mm3

The channel DIMM label does not seem to be
used much in the edac code.  However, where
it is used (in the core code), it is assumed
to not have a newline embedded.  This leaves
the sysfs file newline free which looks funny
when cat'ing it.  Here we just add the trailing
newline to the sysfs chX_dimm_label output...

[Doug Thompson note: the DIMM label is one of the primary uses of EDAC. User
space daemon scripts, edac-utils@...rceforge, populate the DIMM label fields,
via /sys/devices/system/edac attributes, with the silk screen labels of
the motherboard in use. dmidecode access BIOS tables, but BIOS tables
are well known to be incorrect and useless in these respects. edac-utils
will strip off any newlines before its use of the output, when displaying
DIMM slot silk screen labels.

Signed-off-by: Arthur Jones <ajones@...erbed.com>
Signed-off-by: Doug Thompson <dougthompson@...ssion.com>
---
 drivers/edac/edac_mc_sysfs.c |    6 ++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

Index: linux-2.6.26-rc5/drivers/edac/edac_mc_sysfs.c
===================================================================
--- linux-2.6.26-rc5.orig/drivers/edac/edac_mc_sysfs.c
+++ linux-2.6.26-rc5/drivers/edac/edac_mc_sysfs.c
@@ -178,7 +178,11 @@ static ssize_t csrow_edac_mode_show(stru
 static ssize_t channel_dimm_label_show(struct csrow_info *csrow,
 				char *data, int channel)
 {
-	return snprintf(data, EDAC_MC_LABEL_LEN, "%s",
+	/* if field has not been initialized, there is nothing to send */
+	if (!csrow->channels[channel].label[0])
+		return 0;
+
+	return snprintf(data, EDAC_MC_LABEL_LEN, "%s\n",
 			csrow->channels[channel].label);
 }
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ