.global sys32_helper sys32_helper: /* Args: syscall_args_32*, function pointer */ pushl %ebp pushl %ebx pushl %esi pushl %edi movl 5*4(%esp), %eax /* pointer to args struct */ movl 1*4(%eax), %ebx movl 2*4(%eax), %ecx movl 3*4(%eax), %edx movl 4*4(%eax), %esi movl 5*4(%eax), %edi movl 6*4(%eax), %ebp movl 0*4(%eax), %eax call *(6*4)(%esp) /* Do the syscall */ /* Now we need to recover without losing any reg values */ pushl %eax movl 6*4(%esp), %eax popl 0*4(%eax) movl %ebx, 1*4(%eax) movl %ecx, 2*4(%eax) movl %edx, 3*4(%eax) movl %esi, 4*4(%eax) movl %edi, 5*4(%eax) movl %ebp, 6*4(%eax) popl %edi popl %esi popl %ebx popl %ebp ret .type sys32_helper, @function .size sys32_helper, .-sys32_helper .global int80_and_ret int80_and_ret: int $0x80 ret .type int80_and_ret, @function .size int80_and_ret, .-int80_and_ret m method='get'> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/include/net/ncsi.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-02-11 02:31:11 -0500
committerDavid S. Miller <davem@davemloft.net>2017-02-11 02:31:11 -0500
commit35eeacf1820a08305c2b0960febfa190f5a6dd63 (patch)
treef1227c7384ee01d3f029cc5f82223234e6456c5f /include/net/ncsi.h
parentbed45f79a2afc9d7c279b880dfcac8f27d513b50 (diff)
parent1ee18329fae936089c6c599250ae92482ff2b81f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'include/net/ncsi.h')
". It is designed to extract as much possible uncertainty from a running system at boot time as possible, hoping to capitalize on any possible variation in CPU operation (due to runtime data differences, hardware differences, SMP ordering, thermal timing variation, cache behavior, etc). At the very least, this plugin is a much more comprehensive example for how to manipulate kernel code using the gcc plugin internals. The need for very-early boot entropy tends to be very architecture or system design specific, so this plugin is more suited for those sorts of special cases. The existing kernel RNG already attempts to extract entropy from reliable runtime variation, but this plugin takes the idea to a logical extreme by permuting a global variable based on any variation in code execution (e.g. a different value (and permutation function) is used to permute the global based on loop count, case statement, if/then/else branching, etc). To do this, the plugin starts by inserting a local variable in every marked function. The plugin then adds logic so that the value of this variable is modified by randomly chosen operations (add, xor and rol) and random values (gcc generates separate static values for each location at compile time and also injects the stack pointer at runtime). The resulting value depends on the control flow path (e.g., loops and branches taken). Before the function returns, the plugin mixes this local variable into the latent_entropy global variable. The value of this global variable is added to the kernel entropy pool in do_one_initcall() and _do_fork(), though it does not credit any bytes of entropy to the pool; the contents of the global are just used to mix the pool. Additionally, the plugin can pre-initialize arrays with build-time random contents, so that two different kernel builds running on identical hardware will not have the same starting values. Signed-off-by: Emese Revfy <re.emese@gmail.com> [kees: expanded commit message and code comments] Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'tools/perf/Documentation')