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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 15 Jul 2015 09:30:09 +0800
From:	Dave Young <dyoung@...hat.com>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"kexec@...ts.infradead.org" <kexec@...ts.infradead.org>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Vivek Goyal <vgoyal@...hat.com>, ptesarik@...e.cz,
	"Theodore Ts'o" <tytso@....edu>,
	Josh Boyer <jwboyer@...oraproject.org>,
	David Howells <dhowells@...hat.com>
Subject: Re: [PATCH 2/3] [PATCH 2/3] kexec: split kexec_load syscall from
 kexec core code

Hi, Geert

On 07/14/15 at 11:47am, Geert Uytterhoeven wrote:
> Hi Dave,
> 
> On Tue, Jul 14, 2015 at 11:24 AM, Dave Young <dyoung@...hat.com> wrote:
> > On 07/14/15 at 11:16am, Geert Uytterhoeven wrote:
> >> On Tue, Jul 14, 2015 at 11:11 AM, Dave Young <dyoung@...hat.com> wrote:
> >> > On 07/14/15 at 10:50am, Geert Uytterhoeven wrote:
> >> >> On Tue, Jul 14, 2015 at 10:46 AM, Dave Young <dyoung@...hat.com> wrote:
> >> >> >> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> >> >> >> > index 1c50210..20c48b3 100644
> >> >> >> > --- a/arch/arm/Kconfig
> >> >> >> > +++ b/arch/arm/Kconfig
> >> >> >> > @@ -2001,10 +2001,14 @@ config XIP_PHYS_ADDR
> >> >> >> >           be linked for and stored to.  This address is dependent on your
> >> >> >> >           own flash usage.
> >> >> >> >
> >> >> >> > +config KEXEC_CORE
> >> >> >> > +       bool
> >> >> >> > +
> >> >> >> >  config KEXEC
> >> >> >> >         bool "Kexec system call (EXPERIMENTAL)"
> >> >> >> >         depends on (!SMP || PM_SLEEP_SMP)
> >> >> >> >         depends on !CPU_V7M
> >> >> >> > +       select KEXEC_CORE
> >> >> >> >         help
> >> >> >> >           kexec is a system call that implements the ability to shutdown your
> >> >> >> >           current kernel, and to start another kernel.  It is like a reboot
> >> >> >>
> >> >> >> As this KEXEC_CORE is appearing in all arch/*/Kconfig files, I think it's
> >> >> >> time to add an ARCH_HAS_KEXEC symbol (to a common Kconfig file),
> >> >> >> and let arch/*/Kconfig select that if the architecture has kexec support.
> >> >> >>
> >> >> >> Then KEXEC and KEXEC_CORE can live in the common Kconfig file,
> >> >> >> without the need to duplicate it.
> >> >> >
> >> >> > I'm not sure I understand your idea well, do you means like
> >> >> > in arch/Kconfig add ARCH_HAS_KEXEC which depends on KEXEC_CORE?
> >> >>
> >> >> No, ARCH_HAS_KEXEC and all other KEXEC config options in arch/Kconfig.
> >> >> All other KEXEC config options should depend on ARCH_HAS_KEXEC,
> >> >> which can be selected by architectures that support kexec.
> >> >
> >> > So it will be like below? problem is KEXEC_FILE is x86 only now, how
> >> > to handle it then?
> >> >
> >> > arch/Kconfig:
> >> > config ARCH_HAS_KEXEC
> >> >         ...
> >> > config KEXEC_CORE
> >> >         ...
> >> > config KEXEC
> >>
> >> depends on ARCH_HAS_KEXEC
> >>
> >> >         ...
> >> > config KEXEC_FILE
> >>
> >> depends on ARCH_HAS_KEXEC
> >
> > But only x86 has KEXEC_FILE, if we make this change one will see KEXEC_FILE
> > on arches other than x86..
> 
> Is there any technical reason why it's limited to x86?

It was implemented for UEFI secure boot, til now only done in x86. Of course it
is also doable for other archtecture even if there's no secure boot. Basiclly
one need port the userspace code in kexec-tools to kernel space, also need code
to verify kernel signature.

> Else we may need ARCH_HAS_KEXEC_FILE, too :-(

Hmm, I'm not sure it will have much benefits now to add two ARCH_HAS options.
I would prefer current solution, but I can move the KEXEC_CORE to arch/Kconfig

Thanks
Dave
--
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