This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/17879] New: Library is missing memset_s
- From: "noloader at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 27 Jan 2015 00:07:30 +0000
- Subject: [Bug libc/17879] New: Library is missing memset_s
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=17879
Bug ID: 17879
Summary: Library is missing memset_s
Product: glibc
Version: 2.20
Status: NEW
Severity: enhancement
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: noloader at gmail dot com
CC: drepper.fsp at gmail dot com
memset_s is missing from the library.
I'm attempting to use memset_s to zero some memory. memset_s is guaranteed not
to be optimized away, so its appealing to use it rather than the alternatives.
Zeroization is a process requirement, and I can't discard it.
bzero cannot be used because (1) its non-portable, and (2) its deprecated.
The volatile qualifier cannot be used because GCC interprets it to mean only
memory that can be changed by hardware (a more lenient interpretation by the
GCC folks would be very helpful. But it is what it is).
memset_s not available in 2.19:
$ nm -D /lib/x86_64-linux-gnu/libc.so.6 | grep memset_s
$
$ ls -l /lib/x86_64-linux-gnu/libc.so.6 lrwxrwxrwx 1 root root 12 Dec 4
14:31 /lib/x86_64-linux-gnu/libc.so.6 -> libc-2.19.so
And checking out the latest, memset_s is not available in 2.20 (or is it
2.21?):
$ git clone git://sourceware.org/git/glibc.git
$ cd glibc
$ grep -R -w memset_s *
$
I understand the safer functions from TR 24731-1 are not popular, but there
should be no objections for a memset function that is not optimized away
(correct me here, please).
Please provide the memset_s for safety and portability.
--
You are receiving this mail because:
You are on the CC list for the bug.