lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 Oct 2006 15:43:18 +0200
From:	Eric Dumazet <dada1@...mosbay.com>
To:	Andrew Morton <akpm@...l.org>
Cc:	Andi Kleen <ak@...e.de>, linux-kernel@...r.kernel.org
Subject: [PATCH] account_system_vtime() should be a macro, not a function

[PATCH] account_system_vtime() should be a macro, not a function

Because the way 'current' is implemented on some archs, it's better to use a 
null macro for account_system_vtime(current) 

I discovered that gcc was (correctly) issuing one useless instruction (to 
load %rax with current from pda) on x86_64 on irq_enter() and __irq_exit()

This saves few bytes in kernel size, on archs where current is 'asm volatile'

Sample of asm code :

<smp_apic_timer_interrupt>:    
...
    callq  <exit_idle>
    mov    %gs:0x0,%rax // useless load of pda.'pcurrent' into %rax
    mov    %gs:0x10,%rax
    addl   $0x10000,0xffffffffffffe044(%rax) // 
add_preempt_count(HARDIRQ_OFFSET);

Signed-off-by: Eric Dumazet <dada1@...mosbay.com>

View attachment "account_system_vtime.patch" of type "text/plain" (479 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ