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: <3e4bdf67-bd11-e839-7852-36e91f54b4df@huawei.com>
Date:   Fri, 29 Apr 2022 11:17:45 +0800
From:   Chen Zhongjin <chenzhongjin@...wei.com>
To:     Linus Walleij <linus.walleij@...aro.org>
CC:     <linux@...linux.org.uk>, <alexander.sverdlin@...ia.com>,
        <ardb@...nel.org>, <nico@...xnic.net>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4] ARM: module: Add all unwind tables when load module

Added,
9204/1 	module: Add all unwind tables when load module

Thanks!
Chen

On 2022/4/29 6:45, Linus Walleij wrote:
> On Fri, Apr 1, 2022 at 3:16 PM Chen Zhongjin <chenzhongjin@...wei.com> wrote:
> 
>> For EABI stack unwinding, when loading .ko module
>> the EXIDX sections will be added to a unwind_table list.
>>
>> However not all EXIDX sections are added because EXIDX
>> sections are searched by hardcoded section names.
>>
>> For functions in other sections such as .ref.text
>> or .kprobes.text, gcc generates seprated EXIDX sections
>> (such as .ARM.exidx.ref.text or .ARM.exidx.kprobes.text).
>>
>> These extra EXIDX sections are not loaded, so when unwinding
>> functions in these sections, we will failed with:
>>
>>         unwind: Index not found xxx
>>
>> To fix that, I refactor the code for searching and adding
>> EXIDX sections:
>>
>> - Check section type to search EXIDX tables (0x70000001)
>> instead of strcmp() the hardcoded names. Then find the
>> corresponding text sections by their section names.
>>
>> - Add a unwind_table list in module->arch to save their own
>> unwind_table instead of the fixed-lenth array.
>>
>> - Save .ARM.exidx.init.text section ptr, because it should
>> be cleaned after module init.
>>
>> Now all EXIDX sections of .ko can be added correctly.
>>
>> Signed-off-by: Chen Zhongjin <chenzhongjin@...wei.com>
> 
> This looks reasonable to me:
> Acked-by: Linus Walleij <linus.walleij@...aro.org>
> 
> If no one else comments I would say you should put this
> into Russell's patch tracker for consideration.
> 
> Yours,
> Linus Walleij
> .

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ