From: David CARLIER <devnexen@gmail.com>
To: libc-alpha@sourceware.org
Subject: [patch] explicit_bzero constraint on the destination buffer
Date: Thu, 28 Jun 2018 16:05:00 -0000 [thread overview]
Message-ID: <CA+XhMqzL0=OhSMRMFjW8R5qpgjBHLuJK5n_ttcFYgpUTJx03uQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 133 bytes --]
Hi,
This is my first message but here a little patch proposal for
explicit_bzero function.
Hope it s good.
Thanks.
Kind regards.
[-- Attachment #2: 0001-Constraint-on-the-destination-buffer.patch --]
[-- Type: application/octet-stream, Size: 657 bytes --]
From d70ed2be70551e962a5ae3f76197012bda9bcd27 Mon Sep 17 00:00:00 2001
From: David Carlier <dcarlier@afilias.info>
Date: Thu, 28 Jun 2018 15:39:59 +0000
Subject: [PATCH] Constraint on the destination buffer
---
string/explicit_bzero.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/string/explicit_bzero.c b/string/explicit_bzero.c
index 7ba3f0f62c..c26ac38311 100644
--- a/string/explicit_bzero.c
+++ b/string/explicit_bzero.c
@@ -34,5 +34,5 @@ explicit_bzero (void *s, size_t len)
{
memset (s, '\0', len);
/* Compiler barrier. */
- asm volatile ("" ::: "memory");
+ asm volatile ("" :: "r"(s) : "memory");
}
--
2.14.1
next reply other threads:[~2018-06-28 16:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-28 16:05 David CARLIER [this message]
2018-06-28 17:16 ` Adhemerval Zanella
2018-06-28 18:38 ` David CARLIER
2018-06-28 19:00 ` Adhemerval Zanella
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+XhMqzL0=OhSMRMFjW8R5qpgjBHLuJK5n_ttcFYgpUTJx03uQ@mail.gmail.com' \
--to=devnexen@gmail.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).