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] [day] [month] [year] [list]
Message-ID: <20180217122859.GA13344@isilmar-4.linta.de>
Date:   Sat, 17 Feb 2018 13:28:59 +0100
From:   Dominik Brodowski <linux@...inikbrodowski.net>
To:     arjan@...ux.intel.com, gregkh@...uxfoundation.org,
        mingo@...nel.org, dan.j.williams@...el.com, luto@...nel.org,
        bp@...en8.de, torvalds@...ux-foundation.org, dwmw2@...radead.org,
        hpa@...or.com, dave.hansen@...ux.intel.com, jpoimboe@...hat.com,
        linux-kernel@...r.kernel.org, peterz@...radead.org,
        tglx@...utronix.de
Cc:     linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/pti] x86/entry: Reduce the code footprint of the
 'idtentry' macro

On Sat, Feb 17, 2018 at 03:40:13AM -0800, tip-bot for Dominik Brodowski wrote:
> Commit-ID:  9e809d15d6b692fa061d74be7aaab1c79f6784b8
> Gitweb:     https://git.kernel.org/tip/9e809d15d6b692fa061d74be7aaab1c79f6784b8
> Author:     Dominik Brodowski <linux@...inikbrodowski.net>
> AuthorDate: Wed, 14 Feb 2018 18:59:23 +0100
> Committer:  Ingo Molnar <mingo@...nel.org>
> CommitDate: Sat, 17 Feb 2018 11:14:33 +0100
> 
> x86/entry: Reduce the code footprint of the 'idtentry' macro
> 
> Play a little trick in the generic PUSH_AND_CLEAR_REGS macro
> to insert the GP registers "above" the original return address.
> 
> This allows us to (re-)insert the macro in error_entry() and
> paranoid_entry() and to remove it from the idtentry macro. This
> reduces the static footprint significantly:
> 
>    text	   data	    bss	    dec	    hex	filename
>   24307	      0	      0	  24307	   5ef3	entry_64.o-orig
>   20987	      0	      0	  20987	   51fb	entry_64.o
> 
> Co-developed-by: Linus Torvalds <torvalds@...ux-foundation.org>
> Signed-off-by: Dominik Brodowski <linux@...inikbrodowski.net>
> Cc: Andy Lutomirski <luto@...nel.org>
> Cc: Arjan van de Ven <arjan@...ux.intel.com>
> Cc: Borislav Petkov <bp@...en8.de>
> Cc: Dan Williams <dan.j.williams@...el.com>
> Cc: Dave Hansen <dave.hansen@...ux.intel.com>
> Cc: David Woodhouse <dwmw2@...radead.org>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: Josh Poimboeuf <jpoimboe@...hat.com>
> Cc: Linus Torvalds <torvalds@...ux-foundation.org>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Link: http://lkml.kernel.org/r/20180214175924.23065-2-linux@dominikbrodowski.net
> [ Small tweaks to comments. ]
> Signed-off-by: Ingo Molnar <mingo@...nel.org>

Thanks! Just a minor thing:

> - * Switch gs if needed.
> + * Save all registers in pt_regs, and switch gs if needed.

...

> - * Switch gs if needed.
> + * Save all registers in pt_regs, and switch GS if needed.

If we switch from gs to GS, we should do it in both places.

Thanks!

	Dominik

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ