[lkml]   [2018]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v6 0/4] enable early printing of hashed pointers
On Mon, 28 May 2018, Tobin C. Harding wrote:

> Currently printing pointers early in the boot sequence can result in a
> dummy string '(____ptrval____)' being printed. While resolving this
> issue it was noticed that we can use the hw RNG if available for hashing
> pointers.
> Patch one and two do the ground work to be able to use hw RNG removing
> from get_random_bytes_arch() the call to get_random_bytes() and
> returning the number of bytes of random material successfully returned.
> Patch three uses the hw RNG to get keying material if it is available.
> Patch four further assists debugging early in the boot sequence for
> machines that do not have a hw RNG by adding a command line option
> 'debug_boot_weak_hash'. If enabled, non-cryptographically secure hashing
> is used instead of siphash so we can hash at any time.
> During the versions of this set I have been totally confused about which
> patches go through which tree. This version again puts all 4 patches
> together in the hope they will go through Andrew's tree.
> Steve,
> Could you please take a quick squiz at the final 2 patches if you get a
> chance. I assumed we are in preemptible context during early_init based
> on your code (and code comment) and called static_branch_disable()
> directly if hw RNG returned keying material. It's a pretty simple
> change but I'd love to get someone else to check I've not noob'ed it.

early_initcalls() are not that early :) They run in thread context fully
preemtible so calling static_branch_disable() is perfectly fine.



 \ /
  Last update: 2018-06-06 15:03    [W:0.145 / U:6.804 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site