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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1441645574-6043-1-git-send-email-ulfalizer.lkml@gmail.com>
Date:	Mon,  7 Sep 2015 19:06:14 +0200
From:	ulfalizer.lkml@...il.com
To:	corbet@....net
Cc:	gregkh@...uxfoundation.org, shane.seymour@...com,
	ulfalizer@...il.com, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] sysfs.txt: mention that store method buffers are null-terminated

From: Ulf Magnusson <ulfalizer@...il.com>

Without knowing this, the use of sysfs_streq() becomes puzzling.

The termination happens in kernfs_fop_write().

Signed-off-by: Ulf Magnusson <ulfalizer@...il.com>
---
 Documentation/filesystems/sysfs.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt
index 9494afb..575e997 100644
--- a/Documentation/filesystems/sysfs.txt
+++ b/Documentation/filesystems/sysfs.txt
@@ -198,6 +198,9 @@ implementations:
   entire file, modify the values it wishes to change, then write the
   entire buffer back. 
 
+  A terminating null is added after the data on stores. This makes
+  functions like sysfs_streq() safe to use.
+
   Attribute method implementations should operate on an identical
   buffer when reading and writing values. 
 
-- 
2.1.4

--
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