public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chen Zhongjin <chenzhongjin@huawei.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: <alexander.sverdlin@nokia.com>, <ardb@kernel.org>,
	<linus.walleij@linaro.org>, <nico@fluxnic.net>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] ARM: module: Add all unwind tables when load module
Date: Fri, 1 Apr 2022 10:10:30 +0800	[thread overview]
Message-ID: <05f01c58-d592-84ce-dd46-e9b281a82d47@huawei.com> (raw)
In-Reply-To: <YkWEpC4R1roLwlN/@shell.armlinux.org.uk>

Very appreciate for your patient review! For my first patch it really 
helps a lot :D

v3 update pushed now.

Sorry forgot CC for last mail.


On 2022/3/31 18:38, Russell King (Oracle) wrote:
> On Thu, Mar 31, 2022 at 05:09:09PM +0800, Chen Zhongjin wrote:
>>   	for (s = sechdrs; s < sechdrs_end; s++) {
>>   		const char *secname = secstrs + s->sh_name;
>> +		const Elf_Shdr *txt_sec = find_mod_section(hdr, sechdrs,
>> +				strcmp(".ARM.exidx", secname) ?
>> +				secname + strlen(".ARM.exidx") : ".text");
> In addition to my comments on the above...
>
>>   
>> -		if (!(s->sh_flags & SHF_ALLOC))
>> +		if (!(s->sh_flags & SHF_ALLOC) ||
>> +			s->sh_type != ELF_SECTION_UNWIND)
> Please align "s->sh_type" with the ! on the line above (don't use a tab
> for this!)
>
>>   			continue;
>>   
>> -		if (strcmp(".ARM.exidx.init.text", secname) == 0)
>> -			maps[ARM_SEC_INIT].unw_sec = s;
>> -		else if (strcmp(".ARM.exidx", secname) == 0)
>> -			maps[ARM_SEC_CORE].unw_sec = s;
>> -		else if (strcmp(".ARM.exidx.exit.text", secname) == 0)
>> -			maps[ARM_SEC_EXIT].unw_sec = s;
>> -		else if (strcmp(".ARM.exidx.text.unlikely", secname) == 0)
>> -			maps[ARM_SEC_UNLIKELY].unw_sec = s;
>> -		else if (strcmp(".ARM.exidx.text.hot", secname) == 0)
>> -			maps[ARM_SEC_HOT].unw_sec = s;
>> -		else if (strcmp(".init.text", secname) == 0)
>> -			maps[ARM_SEC_INIT].txt_sec = s;
>> -		else if (strcmp(".text", secname) == 0)
>> -			maps[ARM_SEC_CORE].txt_sec = s;
>> -		else if (strcmp(".exit.text", secname) == 0)
>> -			maps[ARM_SEC_EXIT].txt_sec = s;
>> -		else if (strcmp(".text.unlikely", secname) == 0)
>> -			maps[ARM_SEC_UNLIKELY].txt_sec = s;
>> -		else if (strcmp(".text.hot", secname) == 0)
>> -			maps[ARM_SEC_HOT].txt_sec = s;
>> +		if (txt_sec) {
>> +			struct unwind_table *table =
>> +				unwind_table_add(s->sh_addr,
>> +						s->sh_size,
>> +						txt_sec->sh_addr,
>> +						txt_sec->sh_size);
> blank line here please.
>
>> +			list_add(&table->mod_list, &unwind_list->mod_list);
> and here.
>
> Otherwise, looks good. Thanks.
>


      reply	other threads:[~2022-04-01  2:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31  9:09 [PATCH v2] ARM: module: Add all unwind tables when load module Chen Zhongjin
2022-03-31 10:38 ` Russell King (Oracle)
2022-04-01  2:10   ` Chen Zhongjin [this message]

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=05f01c58-d592-84ce-dd46-e9b281a82d47@huawei.com \
    --to=chenzhongjin@huawei.com \
    --cc=alexander.sverdlin@nokia.com \
    --cc=ardb@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=nico@fluxnic.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox