All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@dominikbrodowski.net>
To: arjan@linux.intel.com, gregkh@linuxfoundation.org,
	mingo@kernel.org, dan.j.williams@intel.com, luto@kernel.org,
	bp@alien8.de, torvalds@linux-foundation.org, dwmw2@infradead.org,
	hpa@zytor.com, dave.hansen@linux.intel.com, jpoimboe@redhat.com,
	linux-kernel@vger.kernel.org, peterz@infradead.org,
	tglx@linutronix.de
Cc: linux-tip-commits@vger.kernel.org
Subject: Re: [tip:x86/pti] x86/entry: Reduce the code footprint of the 'idtentry' macro
Date: Sat, 17 Feb 2018 13:28:59 +0100	[thread overview]
Message-ID: <20180217122859.GA13344@isilmar-4.linta.de> (raw)
In-Reply-To: <tip-9e809d15d6b692fa061d74be7aaab1c79f6784b8@git.kernel.org>

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@dominikbrodowski.net>
> AuthorDate: Wed, 14 Feb 2018 18:59:23 +0100
> Committer:  Ingo Molnar <mingo@kernel.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@linux-foundation.org>
> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
> Cc: Andy Lutomirski <luto@kernel.org>
> Cc: Arjan van de Ven <arjan@linux.intel.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: David Woodhouse <dwmw2@infradead.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Josh Poimboeuf <jpoimboe@redhat.com>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Link: http://lkml.kernel.org/r/20180214175924.23065-2-linux@dominikbrodowski.net
> [ Small tweaks to comments. ]
> Signed-off-by: Ingo Molnar <mingo@kernel.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

  reply	other threads:[~2018-02-17 12:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14 17:59 [PATCH 0/2] x86/entry: xorq->xorl; idtentry size reduction Dominik Brodowski
2018-02-14 17:59 ` [PATCH 1/2] x86/entry: reduce static footprint of idtentry Dominik Brodowski
2018-02-17 11:40   ` [tip:x86/pti] x86/entry: Reduce the code footprint of the 'idtentry' macro tip-bot for Dominik Brodowski
2018-02-17 12:28     ` Dominik Brodowski [this message]
2018-02-14 17:59 ` [PATCH 2/2] x86/entry/64: use xorl for register clearing Dominik Brodowski
2018-02-17 11:40   ` [tip:x86/pti] x86/entry/64: Use 'xorl' for faster " tip-bot for Dominik Brodowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180217122859.GA13344@isilmar-4.linta.de \
    --to=linux@dominikbrodowski.net \
    --cc=arjan@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.