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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 26 Aug 2020 23:59:11 +1000
From:   Nicholas Piggin <npiggin@...il.com>
To:     "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
        Vineet Gupta <Vineet.Gupta1@...opsys.com>
Cc:     Arnd Bergmann <arnd@...db.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH 01/24] asm-generic: add generic versions of mmu context
 functions

Excerpts from Vineet Gupta's message of July 28, 2020 2:01 pm:
> On 7/27/20 8:33 PM, Nicholas Piggin wrote:
>> Many of these are no-ops on many architectures, so extend mmu_context.h
>> to cover MMU and NOMMU, and split the NOMMU bits out to nommu_context.h
>> 
> 
>> -static inline void switch_mm(struct mm_struct *prev,
>> -			struct mm_struct *next,
>> -			struct task_struct *tsk)
>> +/**
>> + * activate_mm - called after exec switches the current task to a new mm, to switch to it
>> + * @prev_mm: previous mm of this task
>> + * @next_mm: new mm
>> + */
>> +#ifndef activate_mm
>> +static inline void activate_mm(struct mm_struct *prev_mm,
>> +			       struct mm_struct *next_mm)
>>  {
>> +	switch_mm(prev_mm, next_mm, current);
>>  }
>> +#endif
> 
> Is activate_mm() really needed now. It seems most arches have
>    activate_mm(p, n) -> switch_mm(p, n, NULL)

Alpha, nios2, parisc, s390, um, x86 have non-trivial differences,
so it seems to be still needed.

Thanks,
Nick

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ