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: <7e52f57a-2ff8-736e-d6ea-1e61e5f79375@huawei.com>
Date:   Thu, 4 Nov 2021 09:14:17 +0800
From:   Kefeng Wang <wangkefeng.wang@...wei.com>
To:     Alexander Potapenko <glider@...gle.com>
CC:     Russell King <linux@...linux.org.uk>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, "Marco Elver" <elver@...gle.com>,
        Dmitry Vyukov <dvyukov@...gle.com>
Subject: Re: [PATCH v2 3/3] ARM: Support KFENCE for ARM



On 2021/11/4 0:22, Alexander Potapenko wrote:
> On Wed, Nov 3, 2021 at 2:26 PM Kefeng Wang <wangkefeng.wang@...wei.com> wrote:
>>
>> Add architecture specific implementation details for KFENCE and enable
>> KFENCE on ARM. In particular, this implements the required interface in
>>   <asm/kfence.h>.
>>
>> KFENCE requires that attributes for pages from its memory pool can
>> individually be set. Therefore, force the kfence pool to be mapped
>> at page granularity.
>>
>> Testing this patch using the testcases in kfence_test.c and all passed
>> with or without ARM_LPAE.
>>
>> Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
...
>> diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
>> index f7ab6dabe89f..49148b675b43 100644
>> --- a/arch/arm/mm/fault.c
>> +++ b/arch/arm/mm/fault.c
>> @@ -17,6 +17,7 @@
>>   #include <linux/sched/debug.h>
>>   #include <linux/highmem.h>
>>   #include <linux/perf_event.h>
>> +#include <linux/kfence.h>
>>
>>   #include <asm/system_misc.h>
>>   #include <asm/system_info.h>
>> @@ -99,6 +100,11 @@ void show_pte(const char *lvl, struct mm_struct *mm, unsigned long addr)
>>   { }
>>   #endif                                 /* CONFIG_MMU */
>>
>> +static inline bool is_write_fault(unsigned int fsr)
>> +{
>> +       return (fsr & FSR_WRITE) && !(fsr & FSR_CM);
>> +}
> 
> Please don't increase the diff by moving the code around. Consider
> putting is_write_fault() in the right place in "ARM: mm: Provide
> is_write_fault()" instead.
Sure. Let's wait some time to see whether there are any other comments,
and resend, thanks.
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ