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: <20131014182415.GF3626@debian70-amd64.local.net-space.pl>
Date:	Mon, 14 Oct 2013 20:24:15 +0200
From:	Daniel Kiper <daniel.kiper@...cle.com>
To:	ebiederm@...ssion.com
Cc:	hbabu@...ibm.com, hpa@...ux.intel.com, keescook@...omium.org,
	vgoyal@...hat.com, kexec@...ts.infradead.org,
	linux-kernel@...r.kernel.org, david.vrabel@...rix.com,
	jbeulich@...e.com, keir@....org, xen-devel@...ts.xen.org
Subject: Re: kexec: Clearing registers just before jumping into purgatory

On Fri, Oct 11, 2013 at 03:15:38PM -0700, ebiederm@...ssion.com wrote:
> Daniel Kiper <daniel.kiper@...cle.com> writes:
>
> > On Fri, Oct 11, 2013 at 03:08:43AM -0700, ebiederm@...ssion.com wrote:
> >> Daniel Kiper <daniel.kiper@...cle.com> writes:

[...]

> > What is your opinion in that case?
>
> I can see documenting the registers other than the stack pointer
> as undefined.  (A stack pointer is needed to implement PIC code).
>
> For the implementation I recommend setting these registers to known
> values.  The issue is that your implementation will not change much and
> if you don't set the registers to known values someone may develop a
> dependency on what you happen to have those registers set to.
>
> It is easier to force a fixed value into a register that isn't hard to
> maintain into your registers than to discover when you make a change
> that there is some odd client that depends on some value that just
> happened to be in your register, and that your necessary change is now
> made 10x harder by a client you can't afford to break that depends on a
> bug in the previous implementation.
>
> So yes I strongly recommend setting the registers to a 0 in this case.

Thank you for this explanation. I think that it is worth to add relevant
comment to arch/x86/kernel/relocate_kernel_*.S and purgatory entry.
I will try to prepare something when we work out nice thing for Xen.

Daniel
--
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