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: <3a64efcc-9a9d-4973-92f8-d76899f01868@linux.ibm.com>
Date: Mon, 19 Feb 2024 20:48:31 +0530
From: Donet Tom <donettom@...ux.ibm.com>
To: Michal Hocko <mhocko@...e.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, Aneesh Kumar <aneesh.kumar@...nel.org>,
        Huang Ying <ying.huang@...el.com>,
        Dave Hansen
 <dave.hansen@...ux.intel.com>,
        Mel Gorman <mgorman@...e.de>, Ben Widawsky <ben.widawsky@...el.com>,
        Feng Tang <feng.tang@...el.com>,
        Andrea Arcangeli <aarcange@...hat.com>,
        Peter Zijlstra
 <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
        Rik van Riel <riel@...riel.com>, Johannes Weiner <hannes@...xchg.org>,
        Matthew Wilcox <willy@...radead.org>,
        Mike Kravetz
 <mike.kravetz@...cle.com>,
        Vlastimil Babka <vbabka@...e.cz>,
        Dan Williams <dan.j.williams@...el.com>,
        Hugh Dickins <hughd@...gle.com>,
        Kefeng Wang <wangkefeng.wang@...wei.com>,
        Suren Baghdasaryan <surenb@...gle.com>
Subject: Re: [PATCH 2/3] mm/mempolicy: Avoid the fallthrough with MPOLD_BIND
 in mpol_misplaced.


On 2/19/24 17:32, Michal Hocko wrote:
> On Sat 17-02-24 01:31:34, Donet Tom wrote:
>> We will update MPOL_PREFERRED_MANY in the follow up patch. This change
>> is required for that.
> Why is it a separate patch then? Does it make review of the next patch
> easier? If so make it explicit in the changelog.

Hi Michal

In this patch there is no functional changes. This is just re-arrangement of code. Patch 3 is the actual fix .It will not look nice if we mix these patches. As you said it is easy for reviewing also. That's why we kept it as a separate patch.

Thanks
Donet Tom

>
>> Signed-off-by: Aneesh Kumar K.V (IBM) <aneesh.kumar@...nel.org>
>> Signed-off-by: Donet Tom <donettom@...ux.ibm.com>
>> ---
>>   mm/mempolicy.c | 10 +++++++++-
>>   1 file changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/mm/mempolicy.c b/mm/mempolicy.c
>> index 8478574c000c..73d698e21dae 100644
>> --- a/mm/mempolicy.c
>> +++ b/mm/mempolicy.c
>> @@ -2515,7 +2515,15 @@ int mpol_misplaced(struct folio *folio, struct vm_area_struct *vma,
>>   				break;
>>   			goto out;
>>   		}
>> -		fallthrough;
>> +
>> +		if (node_isset(curnid, pol->nodes))
>> +			goto out;
>> +		z = first_zones_zonelist(
>> +				node_zonelist(thisnid, GFP_HIGHUSER),
>> +				gfp_zone(GFP_HIGHUSER),
>> +				&pol->nodes);
>> +		polnid = zone_to_nid(z->zone);
>> +		break;
>>   
>>   	case MPOL_PREFERRED_MANY:
>>   		/*
>> -- 
>> 2.39.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ