[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140613080028.GK15034@dhcp-17-89.nay.redhat.com>
Date: Fri, 13 Jun 2014 16:00:28 +0800
From: WANG Chao <chaowang@...hat.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Vivek Goyal <vgoyal@...hat.com>, Dave Young <dyoung@...hat.com>,
mjg59@...f.ucam.org, bhe@...hat.com, jkosina@...e.cz,
greg@...ah.com, kexec@...ts.infradead.org,
linux-kernel@...r.kernel.org, ebiederm@...ssion.com, hpa@...or.com,
akpm@...ux-foundation.org
Subject: Re: [PATCH 07/13] kexec: Implementation of new syscall
kexec_file_load
On 06/13/14 at 09:50am, Borislav Petkov wrote:
> On Mon, Jun 09, 2014 at 11:41:37AM -0400, Vivek Goyal wrote:
> > IIUC, COMMAND_LINE_SIZE gives max limits of running kernel and it does
> > not tell us anything about command line size supported by kernel being
> > loaded.
>
> Whatever you do, you do need a sane default because even querying the
> boot protocol is not reliable as the to-be-loaded kernel's boot protocol
> might be manipulated too, before signing (who knows what people do
> in the wild).
Make sense.
>
> So having a sane, unconditional fallback COMMAND_LINE_SIZE from the
> first kernel is a must, methinks.
By greping for COMMAND_LINE_SIZE for different arch, I think 8K being
the fallback, in general, is good for now and the future:
alpha/include/uapi/asm/setup.h
4:#define COMMAND_LINE_SIZE 256
arm/include/uapi/asm/setup.h
19:#define COMMAND_LINE_SIZE 1024
avr32/include/uapi/asm/setup.h
14:#define COMMAND_LINE_SIZE 256
cris/include/uapi/asm/setup.h
4:#define COMMAND_LINE_SIZE 256
frv/include/uapi/asm/setup.h
15:#define COMMAND_LINE_SIZE 512
ia64/include/uapi/asm/setup.h
4:#define COMMAND_LINE_SIZE 2048
m32r/include/uapi/asm/setup.h
8:#define COMMAND_LINE_SIZE 512
m68k/include/uapi/asm/setup.h
14:#define COMMAND_LINE_SIZE 256
mips/include/uapi/asm/setup.h
4:#define COMMAND_LINE_SIZE 4096
parisc/include/uapi/asm/setup.h
4:#define COMMAND_LINE_SIZE 1024
powerpc/include/uapi/asm/setup.h
4:#define COMMAND_LINE_SIZE 2048
s390/include/uapi/asm/setup.h
9:#define COMMAND_LINE_SIZE 4096
um/include/asm/setup.h
8:#define COMMAND_LINE_SIZE 4096
x86/include/asm/setup.h
6:#define COMMAND_LINE_SIZE 2048
xtensa/include/uapi/asm/setup.h
14:#define COMMAND_LINE_SIZE 256
c6x/include/uapi/asm/setup.h
4:#define COMMAND_LINE_SIZE 1024
microblaze/include/uapi/asm/setup.h
14:#define COMMAND_LINE_SIZE 256
mn10300/include/uapi/asm/param.h
16:#define COMMAND_LINE_SIZE 256
score/include/uapi/asm/setup.h
4:#define COMMAND_LINE_SIZE 256
tile/include/uapi/asm/setup.h
18:#define COMMAND_LINE_SIZE 2048
arc/include/asm/setup.h
15:#define COMMAND_LINE_SIZE 256
arm64/include/uapi/asm/setup.h
24:#define COMMAND_LINE_SIZE 2048
--
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