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] [day] [month] [year] [list]
Date:   Thu, 16 Feb 2017 07:42:46 +0530
From:   "Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Rik van Riel <riel@...riel.com>,
        Mel Gorman <mgorman@...hsingularity.net>, paulus@...abs.org,
        benh@...nel.crashing.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH 2/2] powerpc/mm/autonuma: Switch ppc64 to its own
 implementeation of saved write



On Thursday 16 February 2017 03:16 AM, Andrew Morton wrote:
> On Thu,  9 Feb 2017 08:30:59 +0530 "Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com> wrote:
>
>> With this our protnone becomes a present pte with READ/WRITE/EXEC bit cleared.
>> By default we also set _PAGE_PRIVILEGED on such pte. This is now used to help
>> us identify a protnone pte that as saved write bit. For such pte, we will clear
>> the _PAGE_PRIVILEGED bit. The pte still remain non-accessible from both user
>> and kernel.
> I don't see how these patches differ from the ones which are presently
> in -mm.
>
> It helps to have a [0/n] email for a patch series and to put a version
> number in there as well.
>
>> +#define pte_mk_savedwrite pte_mk_savedwrite
>> +static inline pte_t pte_mk_savedwrite(pte_t pte)
>> +{
>> +	/*
>> +	 * Used by Autonuma subsystem to preserve the write bit
>> +	 * while marking the pte PROT_NONE. Only allow this
>> +	 * on PROT_NONE pte
>> +	 */
>> +	VM_BUG_ON((pte_raw(pte) & cpu_to_be64(_PAGE_PRESENT | _PAGE_RWX | _PAGE_PRIVILEGED)) !=
>> +		  cpu_to_be64(_PAGE_PRESENT | _PAGE_PRIVILEGED));
>> +	return __pte(pte_val(pte) & ~_PAGE_PRIVILEGED);
>> +}
>> +
>> +#define pte_savedwrite pte_savedwrite
>> +static inline bool pte_savedwrite(pte_t pte)
>> +{
>> +	/*
>> +	 * Saved write ptes are prot none ptes that doesn't have
>> +	 * privileged bit sit. We mark prot none as one which has
>> +	 * present and pviliged bit set and RWX cleared. To mark
>> +	 * protnone which used to have _PAGE_WRITE set we clear
>> +	 * the privileged bit.
>> +	 */
>> +	return !(pte_raw(pte) & cpu_to_be64(_PAGE_RWX | _PAGE_PRIVILEGED));
>> +}
>> +
>>   static inline pte_t pte_mkdevmap(pte_t pte)
>>   {
>>   	return __pte(pte_val(pte) | _PAGE_SPECIAL|_PAGE_DEVMAP);
> arch/powerpc/include/asm/book3s/64/pgtable.h doesn't have
> pte_mkdevmap().  What tree are you patching here?
>
>

I did post a V2 of this for which you replied
https://lkml.kernel.org/r/20170214162008.bd592c747fc5e167c10ce7b8@linux-foundation.org

I actually found the issue with this patch. I will be sending V3 after 
more testing.

-aneesh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ