lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  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]
Date:	Sun, 06 Feb 2011 18:35:34 -0800
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Rob Landley <rlandley@...allels.com>
Cc:	Simon Horman <horms@...ge.net.au>,
	"Ahmed S. Darwish" <darwish.07@...il.com>,
	Randy Dunlap <rdunlap@...otime.net>,
	Vivek Goyal <vgoyal@...hat.com>,
	Haren Myneni <hbabu@...ibm.com>, <kexec@...ts.infradead.org>,
	LKML <linux-kernel@...r.kernel.org>, <linux-doc@...r.kernel.org>
Subject: Re: [PATCH -next] Documentation: Improve crashkernel= description

Rob Landley <rlandley@...allels.com> writes:

2> On 02/06/2011 03:57 PM, Simon Horman wrote:
>> On Sun, Feb 06, 2011 at 05:41:08PM +0200, Ahmed S. Darwish wrote:
>>> (Also applicable over 2.6.38-rc3)
>>>
>>> Had to explore two C code files to make sense of the 'crashkernel='
>>> kernel parameter values.  Improve the situation.
>>>
>>> Signed-off-by: Ahmed S. Darwish <darwish.07@...il.com>
>>> ---
>>>
>>> diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
>>> index 89835a4..8f26b42 100644
>>> --- a/Documentation/kernel-parameters.txt
>>> +++ b/Documentation/kernel-parameters.txt
>>> @@ -545,9 +545,12 @@ and is between 256 and 4096 characters. It is defined in the file
>>>  			Format:
>>>  			<first_slot>,<last_slot>,<port>,<enum_bit>[,<debug>]
>>>  
>>> -	crashkernel=nn[KMG]@...KMG]
>>> -			[KNL] Reserve a chunk of physical memory to
>>> -			hold a kernel to switch to with kexec on panic.
>>> +	crashkernel=size[KMG][@...set[KMG]]
>>> +			[KNL] Using kexec, Linux can switch to a 'crash kernel'
>>> +			upon panic. This parameter reserves the physical
>>> +			memory region [offset, offset + size] for that kernel
>>> +			image. If the '@...set' part was ignored, Linux finds
>>> +			a suitable crash image start address automatically.
>> 
>> I think this would be further improved as:
>> 
>> 			... If '@...set' is omitted then a suitable
>> 			offset is selected automatically.
>
> Suitable offset as in parses a known image type (ELF, bzImage, etc) to
> find the start address?  Or just assumes the entry point and load
> address are the same?

Neither.  Suitable as in an offset that is naturally aligned for the
size up to I think 16MB where the kernel doesn't care anymore. Saying
that somewhere would be good but I don't think the definition of
suitable belongs in a reference doc like kernel-parameters.txt

The important things for users is to know that they don't need to
specify offset anymore.

> Is this the size for just the kernel image, or also for the physical
> memory it uses so it won't overwrite the existing kernel's stuff on the
> way up?  (If a compressed kernel wants to decompress itself or extract
> an initramfs for itself, what happens?)

The size is the size of the area reserved for the crash capture kernel to run
in. The crash capture kernel never uses anything else.

All of the parsing etc is done in user space via /sbin/kexec.

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