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]
Message-ID: <CALCETrWM2wVynp1rrip9AWtNYDzjC4M8JqKR82ew5dpyrTWMgA@mail.gmail.com>
Date:	Mon, 3 Nov 2014 13:11:51 -0800
From:	Andy Lutomirski <luto@...capital.net>
To:	Andy Lutomirski <luto@...capital.net>,
	Jan Beulich <jbeulich@...e.com>,
	Ingo Molnar <mingo@...nel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Sebastian Lackner <sebastian@...-team.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Chuck Ebbert <cebbert.lkml@...il.com>,
	Anish Bhatt <anish@...lsio.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Oleg Nesterov <oleg@...hat.com>
Cc:	"linux-tip-commits@...r.kernel.org" 
	<linux-tip-commits@...r.kernel.org>
Subject: Re: [tip:x86/asm] sched/x86_64: Don't save flags on context switch

On Tue, Oct 28, 2014 at 4:14 AM, tip-bot for Andy Lutomirski
<tipbot@...or.com> wrote:
> Commit-ID:  2c7577a7583747c9b71f26dced7f696b739da745
> Gitweb:     http://git.kernel.org/tip/2c7577a7583747c9b71f26dced7f696b739da745
> Author:     Andy Lutomirski <luto@...capital.net>
> AuthorDate: Wed, 1 Oct 2014 11:28:25 -0700
> Committer:  Ingo Molnar <mingo@...nel.org>
> CommitDate: Tue, 28 Oct 2014 11:11:30 +0100
>
> sched/x86_64: Don't save flags on context switch
>
> Now that the kernel always runs with clean flags (in particular,
> NT is clear), there is no need to save and restore flags on
> every context switch.

Just to make myself a little more comfortable with this...

There is one potentially relevant flag: AC.  I think this is still OK.
If we schedule with STAC set, then we've already screwed up, I think.
Even preempt schedules from interrupt context, so if we schedule due
to preemption or #PF in the middle of uaccess, AC should be saved and
cleared by whatever interrupt caused the reschedule, right?

And do we ever have TF set during a context switch?  I hope not.

Also, what's with 'jmp exit_intr' at the end of retint_kernel?  Why
isn't that 'jmp retint_kernel'?

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ