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: <20070329034421.GC9582@in.ibm.com>
Date:	Thu, 29 Mar 2007 09:14:21 +0530
From:	Vivek Goyal <vgoyal@...ibm.com>
To:	Simon Horman <horms@...ge.net.au>
Cc:	fastboot@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] kdump/kexec: calculate note size at compile time

On Thu, Mar 29, 2007 at 12:30:59PM +0900, Simon Horman wrote:
> Hi,
> 
> this is a(nother) minor update to this patch. 
> Explanation below.
> 
> -- 
> Horms
>   H: http://www.vergenet.net/~horms/
>   W: http://www.valinux.co.jp/en/
> 
> [PATCH] kdump/kexec: calculate note size at compile time
> 
> Currently the size of the per-cpu region reserved to save crash
> notes is set by the per-architecture value MAX_NOTE_BYTES. Which
> in turn is currently set to 1024 on all supported architectures.
> 
> While testing ia64 I recently discovered that this value is
> in fact too small. The particular setup I was using actually
> needs 1172 bytes. This lead to very tedious failure mode
> where the tail of one elf note would overwrite the head of
> another if they ended up being alocated sequentially by kmalloc,
> which was often the case.
> 
> It seems to me that a far better approach is to caclculate the size
> that the area needs to be. This patch does just that.
> 
> If a simpler stop-gap patch for ia64 to be squeezed into 2.6.21(.X)
> is needed then this should be as easy as making MAX_NOTE_BYTES
> larger in arch/asm-ia64/kexec.h. Perhaps 2048 would be a good choice.
> However, I think that the approach in this patch is a much more robust
> idea.
> 
> Update I:
> 
>   Changed KEXEC_NOTE_HEAD_BYTES to KEXEC_NOTE_DESC_BYTES in line
>   with the name of the relevant field in struct elf_note
> 
> Update II:
> 
>   * Use KEXEC_NOTE_NAME instead of "CORE" in kernel/kexec.c and
>     arch/ia64/kernel/crash.c just to be extra sure that the data
>     used to calculate the size, and the data stuffed into the reserved
>     area is the same.
> 
>     Incidently, the ia64 code really ought to use the generic code.
>     I am working on a patch for this. But it is not urgent.
> 

Looks good. Another patch to make ia64 also use generic kexec code
for note generation would be nice.

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