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: <d07abbe5-941d-a27f-d968-e3d14ef9329a@huawei.com>
Date:   Mon, 7 Jun 2021 09:50:31 +0800
From:   Kefeng Wang <wangkefeng.wang@...wei.com>
To:     Mike Rapoport <rppt@...nel.org>
CC:     Andrew Morton <akpm@...ux-foundation.org>,
        <linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
        <linux-snps-arc@...ts.infradead.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-csky@...r.kernel.org>,
        <uclinux-h8-devel@...ts.sourceforge.jp>,
        <linux-m68k@...ts.linux-m68k.org>, <openrisc@...ts.librecores.org>,
        <linuxppc-dev@...ts.ozlabs.org>, <linux-riscv@...ts.infradead.org>,
        <linux-sh@...r.kernel.org>, <linux-s390@...r.kernel.org>,
        <x86@...nel.org>
Subject: Re: [PATCH v2 01/15] mm: add setup_initial_init_mm() helper


On 2021/6/7 5:31, Mike Rapoport wrote:
> Hello Kefeng,
>
> On Fri, Jun 04, 2021 at 03:06:19PM +0800, Kefeng Wang wrote:
>> Add setup_initial_init_mm() helper to setup kernel text,
>> data and brk.
>>
>> Cc: linux-snps-arc@...ts.infradead.org
>> Cc: linux-arm-kernel@...ts.infradead.org
>> Cc: linux-csky@...r.kernel.org
>> Cc: uclinux-h8-devel@...ts.sourceforge.jp
>> Cc: linux-m68k@...ts.linux-m68k.org
>> Cc: openrisc@...ts.librecores.org
>> Cc: linuxppc-dev@...ts.ozlabs.org
>> Cc: linux-riscv@...ts.infradead.org
>> Cc: linux-sh@...r.kernel.org
>> Cc: linux-s390@...r.kernel.org
>> Cc: x86@...nel.org
>> Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
>> ---
>>   include/linux/mm_types.h | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
>> index 5aacc1c10a45..e1d2429089a4 100644
>> --- a/include/linux/mm_types.h
>> +++ b/include/linux/mm_types.h
>> @@ -572,6 +572,14 @@ struct mm_struct {
>>   };
>>   
>>   extern struct mm_struct init_mm;
>> +static inline void setup_initial_init_mm(void *start_code, void *end_code,
>> +					 void *end_data, void *brk)
> I think it's not that performance sensitive to make it inline. It can be
> placed in mm/init-mm.c with a forward declaration in mm.h

Ok, I will send a update one with this change.

>
>> +{
>> +	init_mm.start_code = (unsigned long)start_code;
>> +	init_mm.end_code = (unsigned long)end_code;
>> +	init_mm.end_data = (unsigned long)end_data;
>> +	init_mm.brk = (unsigned long)brk;
>> +}
>    
>>   /* Pointer magic because the dynamic array size confuses some compilers. */
>>   static inline void mm_init_cpumask(struct mm_struct *mm)
>> -- 
>> 2.26.2
>>
>>
>> _______________________________________________
>> linux-riscv mailing list
>> linux-riscv@...ts.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-riscv

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ