All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com>
To: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Cc: V Srivatsa <vsrivatsa@in.ibm.com>,
	Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
	kexec@lists.infradead.org, Dave Anderson <anderson@redhat.com>,
	Prerna Saxena <prerna@linux.vnet.ibm.com>,
	Reinhard <BUENDGEN@de.ibm.com>
Subject: Re: [PATCH v2 6/8] makedumpfile: Read and process 'for' command from config file.
Date: Wed, 07 Sep 2011 16:44:06 +0530	[thread overview]
Message-ID: <4E6751FE.5070605@linux.vnet.ibm.com> (raw)
In-Reply-To: <20110907154115.02b47998.oomichi@mxs.nes.nec.co.jp>

Hi Ken'ichi,

On 09/07/2011 12:11 PM, Ken'ichi Ohmichi wrote:
> 
> Hi Mahesh,
> 
> On Mon, 5 Sep 2011 20:10:33 +0530
> Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com> wrote:
>>>>
>>>> This patch fixes following BUGs:
>>>
>>> [..]
>>>
>>>> - The loop construct used for array of char* (pointer) silently fails and
>>>> does not filter the strings.
>>>
>>> Did the silent failure happen at the following code of list_entry_empty() ?
>>>
>>>    7373         addr = get_config_symbol_addr(le, 0, NULL);
>>>    7374         if (!addr)
>>>    7375                 return TRUE;
>>>
>>
>> Nope. It use to fail in resolve_list_entry()->resolve_config_entry()
>> and following hunk from the patch fixes it:
>>We dont allow no-array 
>> @@ -6866,7 +6882,7 @@ resolve_config_entry(struct config_entry *ce, unsigned long long base_addr,
>>  		 * If this is a struct or list_head data type then
>>  		 * create a leaf node entry with 'next' member.
>>  		 */
>> -		if ((ce->type_flag & TYPE_BASE)
>> +		if (((ce->type_flag & (TYPE_BASE | TYPE_ARRAY)) == TYPE_BASE)
>>  					&& (strcmp(ce->type_name, "void")))
>>  			return FALSE;
>>  
>> The old code use to check only TYPE_BASE flag ignoring TYPE_ARRAY flag.
> 
> Thank you for the explanation.
> I feel I see it.
> Is the below understanding right ?
> 
> At the part of earlier resolve_config_entry(), necessary information
> (sym_addr, type_name, and array_length) can be gotten in the case
> of pointer array.

Yes, including the size information for type of element (type_name) in
the LIST entry.

> However, the old resolve_config_entry() returned FALSE because of
> the check lack you said.

Yes. The old resolve_config_entry() use to return FALSE only for array
of base type elements (e.g. array of char, int, long etc.). However, it
was working well for array of structures (pointer/non-pointer).

The LIST entry can be of one of the following kind:
1. Array of base types (pointer/non-pointer).
2. Array of structures (pointer/non-pointer).
3. Link list.
4. list_head link list.

The old code was working for all of the above except (1).

Thanks,
-Mahesh.

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2011-09-07 11:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-17 20:05 [PATCH v2 6/8] makedumpfile: Read and process 'for' command from config file Mahesh J Salgaonkar
2011-08-11  8:06 ` Ken'ichi Ohmichi
2011-08-30 18:16   ` Mahesh J Salgaonkar
2011-09-01  8:06     ` Ken'ichi Ohmichi
2011-09-05 14:40       ` Mahesh J Salgaonkar
2011-09-07  6:41         ` Ken'ichi Ohmichi
2011-09-07 11:14           ` Mahesh Jagannath Salgaonkar [this message]
2011-09-07 23:35             ` Ken'ichi Ohmichi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E6751FE.5070605@linux.vnet.ibm.com \
    --to=mahesh@linux.vnet.ibm.com \
    --cc=BUENDGEN@de.ibm.com \
    --cc=ananth@in.ibm.com \
    --cc=anderson@redhat.com \
    --cc=kexec@lists.infradead.org \
    --cc=oomichi@mxs.nes.nec.co.jp \
    --cc=prerna@linux.vnet.ibm.com \
    --cc=vsrivatsa@in.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.