[PATCH 3/3] Remove --cyclic-buffer option.

2012-11-08 Thread Atsushi Kumagai
The size of cyclic buffer will be calculated automatically with [PATCH 2/3], so users don't have to specify the size manually. Signed-off-by: Atsushi Kumagai --- makedumpfile.8 | 16 makedumpfile.c | 31 ++- print_info.c | 11 --- 3 files ch

[PATCH 2/3] Calculate the size of cyclic buffer automatically.

2012-11-08 Thread Atsushi Kumagai
The size of cyclic buffer is set to DEFAULT_BUFSIZE_CYCLIC(1MB) when the size isn't specified. But 1MB is too small for large memory machine and the number of cycle will be so large. As a result, a lot of time will be spend for dump filtering. To resolve the issue above, I add calculate_cyclic_buf

[PATCH 1/3] Add get_free_memory_size() to get the amount of free memory.

2012-11-08 Thread Atsushi Kumagai
get_free_memory_size() reads /proc/meminfo and consider "MemFree:" the amount of free memory. Signed-off-by: Atsushi Kumagai --- makedumpfile.c | 34 ++ makedumpfile.h | 1 + 2 files changed, 35 insertions(+) diff --git a/makedumpfile.c b/makedumpfile.c index 11

[PATCH 0/3] makedumpfile: calculate the size of cyclic buffer automatically.

2012-11-08 Thread Atsushi Kumagai
Hello, I made the patch set based on v1.5.1-beta to calculate the size of cyclic buffer automatically. In v1.5.0, users have to specify the buffer size depending on system memory size with --cyclic-buffer option in order to get decent performance. This patch set avoids the inconvenience above b

Re: Kdump with signed images

2012-11-08 Thread Eric W. Biederman
Vivek Goyal writes: > On Thu, Nov 08, 2012 at 02:40:50PM -0500, Vivek Goyal wrote: >> On Tue, Nov 06, 2012 at 03:51:59PM -0800, Eric W. Biederman wrote: >> >> [..] >> >> Thnking more about executable signature verification, I have another >> question. >> >> While verifyign the signature, we w

Re: Kdump with signed images

2012-11-08 Thread Mimi Zohar
On Thu, 2012-11-08 at 14:40 -0500, Vivek Goyal wrote: > On Tue, Nov 06, 2012 at 03:51:59PM -0800, Eric W. Biederman wrote: > > [..] > > Thnking more about executable signature verification, I have another question. > > While verifyign the signature, we will have to read the whole executable > in

Re: Kdump with signed images

2012-11-08 Thread Vivek Goyal
On Thu, Nov 08, 2012 at 02:40:50PM -0500, Vivek Goyal wrote: > On Tue, Nov 06, 2012 at 03:51:59PM -0800, Eric W. Biederman wrote: > > [..] > > Thnking more about executable signature verification, I have another question. > > While verifyign the signature, we will have to read the whole executab

Re: Kdump with signed images

2012-11-08 Thread Vivek Goyal
On Tue, Nov 06, 2012 at 03:51:59PM -0800, Eric W. Biederman wrote: [..] Thnking more about executable signature verification, I have another question. While verifyign the signature, we will have to read the whole executable in memory. That sounds bad as we are in kernel mode and will not be kill

[PATCH v2 5/7] Implement apimember and apigetrtype call back functions

2012-11-08 Thread Aravinda Prasad
The patch includes functionality for apimember and apigetrtype eppic callback routines along with helper functions to fetch information related to the member of the structure/union Whenever a structure/union member is accessed inside the eppic macro, eppic will query makedumpfile through call back

[PATCH v2 7/7] Support fully typed symbol access mode

2012-11-08 Thread Aravinda Prasad
Eppic enables access to symbols in two ways. The first, is a more natural mode in that it makes symbols available as fully typed entities. The second, is generic and treats all symbols as an address to data which then needs to be cast to the proper type explicitly. The former obviously enables an e

[PATCH v2 4/7] Implement apigetctype call back function

2012-11-08 Thread Aravinda Prasad
libeppic will call apigetctype call back function whenever it encounters a token in the eppic macro. The call back function will use DWARF to query information related to the requested token and will pass it back to eppic using libeppic API calls. If the token does not exist, then apigetctype call

[PATCH v2 6/7] Extend eppic built-in functions to include memset function

2012-11-08 Thread Aravinda Prasad
The memset function will be used to specify the virtual address and the length of the data to be scrubbed in the dump file from the eppic macro. makedumpfile will convert these requests into filter_info nodes which will be enqueued for filtering. Existing makedumpfile functionality reads the filter

[PATCH v2 3/7] Eppic call back functions to query a dump image

2012-11-08 Thread Aravinda Prasad
This patch implements a series of apigetuint* call back functions which are used to access data from the dump image. Eppic uses these call back functions to fetch the actual value of the global variables. This patch also adds other call back functions as a place holder which will be implemented in

[PATCH v2 2/7] makedumpfile and eppic interface layer

2012-11-08 Thread Aravinda Prasad
This patch extends the makedumpfile functionality to include eppic language support. The patch initializes eppic and then loads and executes the specified eppic macros. This patch also includes "--eppic" option to makedumpfile command to specify the eppic macro or the directory containing eppic ma

[PATCH v2 1/7] Initialize and setup eppic

2012-11-08 Thread Aravinda Prasad
This patch contains routines which initialize eppic and register call back function which will be called whenever a new eppic macro is loaded using eppic_load() API. The registered call back function executes the eppic macro as soon as it is loaded. The -ltinfo is included in LIBS in the Makefile,

[PATCH v2 0/7] makedumpfile security key filtering with eppic

2012-11-08 Thread Aravinda Prasad
makedumpfile security key filtering enhancement - Add Eppic language support (formerly known as SIAL) to specify rules to scrub data in a dumpfile. Eppic was previously part of crash source code repository. The following series of patches enhance the makedumpfile to provide a more powerful way to

[PATCH 08/10] Add page_is_buddy for PG_buddy

2012-11-08 Thread HATAYAMA Daisuke
On kernels from v2.6.18 to v2.6.37, buddy page is marked by the PG_buddy flag. kernel version | PG_buddy -- +- v2.6.17 to v2.6.26 | 19 v2.6.27 to v2.6.37 | 19 if CONFIG_PAGEFLAGS_EXTEND=y | 18 otherwise Note for hard

[PATCH 10/10] Print warning about cyclic buffer overrun if it can happen

2012-11-08 Thread HATAYAMA Daisuke
Clearling bits on cyclic buffer can overrun the cyclic buffer according to some combination of MAX_ORDER and cyclic buffer size. This patch warns this possibility but continues processing. Signed-off-by: HATAYAMA Daisuke --- makedumpfile.c | 48 +++

[PATCH 00/10] Support free page filtering looking up mem_map array

2012-11-08 Thread HATAYAMA Daisuke
This patch set implements filtering free pages looking up mem_map array instead of free lists. This is compatible for cyclic mode because looking up mem_map can be divided into cycles. On the other hand, dividing free pages contaiend in free lists is difficult since they are not sorted in physical-

[PATCH 09/10] Add page_is_buddy for old kernels

2012-11-08 Thread HATAYAMA Daisuke
On kernels from v2.6.15 to v2.6.17 buddy page is marked by the condition that PG_private flag is set and _count == 0. Unfortunately, I have yet to test this logic on these kernel versions simply because I've been failing to boot them on my box. Note that on these kernels, free list can be corrupt

[PATCH 07/10] Add page_is_buddy for recent kernels

2012-11-08 Thread HATAYAMA Daisuke
On kernels from v2.6.38 and later kernels, buddy page is marked by _mapcount == PAGE_BUDDY_MAPCOUNT_VALUE, which varies once as follows: kernel version| PAGE_BUDDY_MAPCOUNT_VALUE --+-- v2.6.38 | -2 v2.6.39 and later | -128 One more not

[PATCH 06/10] Exclude free pages by looking up mem_map array

2012-11-08 Thread HATAYAMA Daisuke
Add free page filtering logic in __exclude_unnecessary_pages. Unlike other filtering levels, the number of free pages indicated by buddy page is multiple. So I put this logic in the first position to skip the pages corresponding to free pages. This mem_map array logic is used in cyclic mode only.

[PATCH 02/10] Add debuginfo interface for enum type size

2012-11-08 Thread HATAYAMA Daisuke
This is need to determine if a specified enumeration type is present in a given debug information. In this patch set, I'll use this to check if enum pageflags is present. The newly introduced interface is a simple extension from the existing one for enumeration value. Signed-off-by: HATAYAMA Dai

[PATCH 03/10] Add new parameters to various tables

2012-11-08 Thread HATAYAMA Daisuke
Add new parameters required for mem_map-based freepages filtering, to various tables. Signed-off-by: HATAYAMA Daisuke --- makedumpfile.h |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/makedumpfile.h b/makedumpfile.h index 20f4d99..1304df0 100644 --- a/makedumpfi

[PATCH 05/10] Add hardcoded page flag values

2012-11-08 Thread HATAYAMA Daisuke
Basically, these should be exported as VMCOREINFO from kernel. But we cannot modify old kernels. Luckily, page flag values had frequently changed in old kernels, so on old kernels, it's relatively easy to determine appropreate page flags on a given kernel version without any symbol and type informa

[PATCH 01/10] Move page flags setup for old kernels after debuginfo initialization

2012-11-08 Thread HATAYAMA Daisuke
Page flags setup needs to be done after debuginfo initialization. We use hard coded values only when debugging information doesn't provide corresponding values. Signed-off-by: HATAYAMA Daisuke --- makedumpfile.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/makedu

[PATCH 04/10] Add debuginfo-related processing for VMCOREINFO/VMLINUX

2012-11-08 Thread HATAYAMA Daisuke
Signed-off-by: HATAYAMA Daisuke --- makedumpfile.c | 21 - 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/makedumpfile.c b/makedumpfile.c index 6513059..0d03716 100644 --- a/makedumpfile.c +++ b/makedumpfile.c @@ -914,6 +914,8 @@ get_structure_info(void)