runtime: get per-process random number from auxv for hash table
Decode AT_RANDOM, AT_HWCAP, and AT_PLATFORM.
This CL only make use of AT_RANDOM, but future CLs will make use of the others.
On Mon, Apr 16, 2012 at 6:33 AM, Dave Cheney <dave@cheney.net> wrote: > > Thank ...
12 years, 11 months ago
(2012-04-16 05:30:58 UTC)
#3
On Mon, Apr 16, 2012 at 6:33 AM, Dave Cheney <dave@cheney.net> wrote:
>
> Thank you for this CL. Previously you've mention that AT_* were newer
> kernel features. Which kernel did they get added too? Specifically RHEL5 is
> a known working platform, but uses 2.6.18, will this change continue to
> work there?
AT_RANDOM is introduced in 2.6.29, but as the original code always use 0, I
think this is acceptable (I could
have read random bytes from /dev/random, but it might be overkill to read a
device file each time we create
a map). And, of course, we could do better by using some pseudo random
number generator for runtime.cputicks
and only use kernel provided random number as seed (I used fastrand1
algorithm for this now).
AT_PLATFORM is introduced in at least 2.6.11.
AT_HWCAP is introduced in at least 2.6.11 (
http://lxr.linux.no/#linux+v2.6.11/include/asm-arm/procinfo.h#L50)
(I've added this info in the comment)
On 2012/04/16 05:30:58, minux wrote: > AT_RANDOM is introduced in 2.6.29, but as the original ...
12 years, 11 months ago
(2012-04-16 05:56:45 UTC)
#4
On 2012/04/16 05:30:58, minux wrote:
> AT_RANDOM is introduced in 2.6.29, but as the original code always use 0, I
> think this is acceptable (I could have read random bytes from /dev/random,
> but it might be overkill to read a device file each time we create a map).
Correction: we only call runtime.cputicks() once per M.
Are there any parts of this CL that are applicable to linux/amd64 and 386 ? ...
12 years, 11 months ago
(2012-04-18 10:21:37 UTC)
#5
Are there any parts of this CL that are applicable to linux/amd64 and 386 ? It
might improve the level of confidence with this addition if it can be tested
natively all the linux archs.
On Wed, Apr 18, 2012 at 6:21 PM, <dave@cheney.net> wrote: > Are there any parts ...
12 years, 11 months ago
(2012-04-18 10:27:58 UTC)
#6
On Wed, Apr 18, 2012 at 6:21 PM, <dave@cheney.net> wrote:
> Are there any parts of this CL that are applicable to linux/amd64 and
> 386 ? It might improve the level of confidence with this addition if it
linux/386 already use auxv to get AT_SYSINFO (VDSO).
Excellent, I didn't realise. On Wed, Apr 18, 2012 at 8:27 PM, minux <minux.ma@gmail.com> wrote: ...
12 years, 11 months ago
(2012-04-18 10:29:22 UTC)
#7
Excellent, I didn't realise.
On Wed, Apr 18, 2012 at 8:27 PM, minux <minux.ma@gmail.com> wrote:
>
> On Wed, Apr 18, 2012 at 6:21 PM, <dave@cheney.net> wrote:
>>
>> Are there any parts of this CL that are applicable to linux/amd64 and
>> 386 ? It might improve the level of confidence with this addition if it
>
> linux/386 already use auxv to get AT_SYSINFO (VDSO).
LGTM http://codereview.appspot.com/5978051/diff/19001/src/pkg/runtime/signal_linux_arm.c File src/pkg/runtime/signal_linux_arm.c (right): http://codereview.appspot.com/5978051/diff/19001/src/pkg/runtime/signal_linux_arm.c#newcode146 src/pkg/runtime/signal_linux_arm.c:146: uint32 runtime·randomNumber; Can you make this static? It ...
12 years, 10 months ago
(2012-05-03 21:53:27 UTC)
#10
On 2012/05/03 21:53:27, rsc wrote: > http://codereview.appspot.com/5978051/diff/19001/src/pkg/runtime/signal_linux_arm.c#newcode146 > src/pkg/runtime/signal_linux_arm.c:146: uint32 runtime·randomNumber; > Can you make ...
12 years, 10 months ago
(2012-05-04 17:45:57 UTC)
#11
Issue 5978051: code review 5978051: runtime: get per-process randome number from auxv for h...
(Closed)
Created 12 years, 11 months ago by minux1
Modified 12 years, 10 months ago
Reviewers:
Base URL:
Comments: 7