From: Laurent Alfonsi <laurent.alfonsi@st.com>
To: Cedric VINCENT <cedric.vincent@st.com>
Cc: Riku Voipio <riku.voipio@iki.fi>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH] linux-user: Define AT_RANDOM to support target dynamic linkers that do ASLR
Date: Mon, 13 Jun 2011 14:03:40 +0200 [thread overview]
Message-ID: <4DF5FC9C.4050701@st.com> (raw)
In-Reply-To: <20110603064619.GA7025@gnx2503>
>> unsigned char k_rand_bytes[16];
>> elf_addr_t __user *u_rand_bytes;
>> ...
>> /*
>> * Generate 16 random bytes for userspace PRNG seeding.
>> */
>> get_random_bytes(k_rand_bytes, sizeof(k_rand_bytes));
>> u_rand_bytes = (elf_addr_t __user *)
>> STACK_ALLOC(p, sizeof(k_rand_bytes));
>> if (__copy_to_user(u_rand_bytes, k_rand_bytes, sizeof(k_rand_bytes)))
>> return -EFAULT;
>> ...
>> NEW_AUX_ENT(AT_RANDOM, (elf_addr_t)(unsigned long)u_rand_bytes);
> It's clearer to me now, thanks.
It is fine with me, I also understand better now.
And this now brings me to another point : In that case, it might have
sense to also add the auxv AT_RANDOM_SIZE.
http://sources.redhat.com/ml/libc-alpha/2008-10/msg00016.html
>> I suggest at minimum a command-line argument to force a
>> particular AT_RANDOM value, for repeatability.
Yep, I agree.
Laurent.
next prev parent reply other threads:[~2011-06-13 12:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-01 11:42 [Qemu-devel] [PATCH] linux-user: Define AT_RANDOM to support target dynamic linkers that do ASLR Cédric VINCENT
2011-06-01 13:26 ` Richard Henderson
2011-06-01 13:47 ` cedric.vincent
2011-06-01 14:35 ` [Qemu-devel] [PATCH v2] " Cédric VINCENT
2011-06-01 15:33 ` [Qemu-devel] [PATCH] " Richard Henderson
2011-06-03 6:46 ` cedric.vincent
2011-06-13 12:03 ` Laurent Alfonsi [this message]
2011-06-13 15:53 ` Richard Henderson
2011-06-20 6:43 ` [Qemu-devel] [PATCH v3] linux-user: Define AT_RANDOM to support target stack protection mechanism Cédric VINCENT
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=4DF5FC9C.4050701@st.com \
--to=laurent.alfonsi@st.com \
--cc=cedric.vincent@st.com \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=rth@twiddle.net \
/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 NNTP newsgroup(s).