Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp159432pxm; Fri, 4 Mar 2022 18:52:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJwmAz6WOxO8gdpQwEDpsmIsjA/U7AQkR0R/BNFPbuhzhovd5lPBJhc44f/t4Y3IQdUQAsFV X-Received: by 2002:a17:902:da8a:b0:151:6240:b877 with SMTP id j10-20020a170902da8a00b001516240b877mr1710509plx.22.1646448728451; Fri, 04 Mar 2022 18:52:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1646448728; cv=pass; d=google.com; s=arc-20160816; b=cbYHLT7oNJ4G3OzRMDT0J+Pyhy8OKS9PBGJ1htBlSIhgrqcVeVy1hz7e8Pn6a/vzJw vcKIDzdnS9gQ7q68VSB2zXZHu6owSXhLNgaHZyU9FroceDnwhRbC+wwadNUC3+p4/M8R Dn6dsOMOEyxfxnb/GjdA3fykf5BzSqvOQECmYAw9ekoOiwXrbp3T1DRVlcFKmhcCISCp qtNxReTsZ4rZmwj8zW+HB09DrPjRhc579wz8gqW1ExwLk6o9MfO8+tQlJdVyPUAFpQ6b FiEg4oWk+PqglgsAA1T2dc4jkJ+EIuy92i5ZQ/tDeyi6AJw2tSzM59uS6lFFXktafm0w zHVA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature:dkim-signature; bh=aKVfx2lM8Ay0JmedgskP0yiufw6RWJKpcRONevNA7KY=; b=DTjx1MLFliHH7Z9wom+XHTUSU8B5//6GxAwSOa/mmg7Zit7uoWjXI8hKHEHHTa3uj4 tZsrgj4eD+cdDb6/VS6Z5yP7oHiicIBzsgb1KE37wWBIU/qxWlGNPFmBd888ZNC8lRtj tRbypTDtZM1bTDGcqok67wHRVyYTGrIt8VMGtRQQtjWSY14/VNimsqN6Smsew8cVvB12 hy/Ng4uqSAa01CbOLhayxmvltiSoM2DHMpm644oUOXnhn38+ytY5msm7o1awzKS9YYfd BydRdvVRWeExxSbDg8F30Izy+6V/zfzHCdLaOtrQNSUO6ZCLT80nykFu50s3puKn84Ku 0jyg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=ZwletwQX; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=jQm+Vw67; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l9-20020a056a0016c900b004c5d194b2c6si7109719pfc.282.2022.03.04.18.51.51; Fri, 04 Mar 2022 18:52:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=ZwletwQX; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=jQm+Vw67; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230416AbiCECBh (ORCPT + 99 others); Fri, 4 Mar 2022 21:01:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229545AbiCECBg (ORCPT ); Fri, 4 Mar 2022 21:01:36 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E08353B65 for ; Fri, 4 Mar 2022 18:00:47 -0800 (PST) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 2251VaKk010128; Sat, 5 Mar 2022 02:00:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=aKVfx2lM8Ay0JmedgskP0yiufw6RWJKpcRONevNA7KY=; b=ZwletwQXn1Yd9eZS9V3KLDCTt2QbS1x2hC/PwAHNboOrgl7Uh68XxN2ofW+1bfHsoXNu qZXPB6xYHPft+u1zGIZGEU/o1lLrmMbARHwGHuAS34obL9UCR/Ntw89nwP97whIUSlbL BUL7EzK+jqIEaADilBWX/RRsoCE5vJOmo+llOTRfcT9qQn88XmJ+MOuG7cLy+OpHzrzb +kJQzZm99vervBt3N5Gwt1HxurfC1CGfH49l0pr1daWPw853HZ+cCnA3C29F4Bk8NH7O ExfDpP1U87imT0M5t+AQS5PGu94J8KeHGXo14itcpKypKK5JaNUnktct34kGkE3BMfAd sA== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3ekx9c80t0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 05 Mar 2022 02:00:42 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 2251uAWk050833; Sat, 5 Mar 2022 02:00:41 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2109.outbound.protection.outlook.com [104.47.58.109]) by userp3030.oracle.com with ESMTP id 3ekvyr3smw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 05 Mar 2022 02:00:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ShV1blyYBRJhHILxb6PpN9oF2hsUxBtlEQdwkcStD+94dtv+TbqwRBvgOu2EfxIa5Wn0K9C3vYozGTBTILKt+2JMn4gps/6q4+bfwdGe8Xqff6VIuEd+Vx0nVLgfEkoqjvQLolB1pfNxS3w1XSUhLAjuWYWcToNP549gYPVY/pQUE8I7T6PTh+PqSq1MdECeqIjIH+TpPzJ0H8h36EygaJF/6wmTp/QTVKnf1SB+ZjTYoecKCFR0sRmfOVSr5djT7XsK/sdmrFzldabQSvinYdh2h5+u7sDwZ5if3McXbgYmNvcCcgNZG5zmjpQOIFxmcWu6Lo35iR622S2C2uNDQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aKVfx2lM8Ay0JmedgskP0yiufw6RWJKpcRONevNA7KY=; b=dXxRx1zhQ2gQVwwRmbqkBbE7+fBX6BL4Za/yQ6HOkZJcFX1+pTASCG7qmgMFh0k6Jd0R+hTUMHX1xqsEaccBF1F6gIRTvuCer6OSN2JIoByeLRmXHyIJ0VmjYWWp5ofeFu3JJGQjRFCnbYwC9yBIqcpgUYPya/wKNhYEAttMuiOdiRSk2WY0xhDnwx46fIk4ku9MMHc7NLfTdzW+RSoTFhDO40QJ2lMnKLiTvyjh8hJ0u8SsnFEMrCC67EB/w1VncKdVeIyfzsHrGioPGFjV/PXn3q4ljB0n3G5Ua1CmdnU/ntlRP3uYj/5/XYUp7dRe9l5u439TRfsJnirzEEDyDQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aKVfx2lM8Ay0JmedgskP0yiufw6RWJKpcRONevNA7KY=; b=jQm+Vw67c/zWVPYDorJZZj9C89l4GCjaVZ9DCR3bmng1RNmhjaPJ3XoGSyUH+cALks9cDmTB6yBnj+zMVGBTMDVMsklXLX8J2AWawl5S4DdxYI1sdBTFxbZxyGCYX3n3ewPKaMftDS9GLKdlzvMoLT/W17kMgaWOxFSxyTm6MnQ= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by BYAPR10MB3672.namprd10.prod.outlook.com (2603:10b6:a03:128::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.24; Sat, 5 Mar 2022 02:00:39 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::8df4:1db9:57f2:a96a]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::8df4:1db9:57f2:a96a%3]) with mapi id 15.20.5038.016; Sat, 5 Mar 2022 02:00:39 +0000 From: Liam Howlett To: Hugh Dickins CC: Andrew Morton , Oleg Nesterov , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [PATCH mmotm] mempolicy: mbind_range() set_policy() after vma_merge() Thread-Topic: [PATCH mmotm] mempolicy: mbind_range() set_policy() after vma_merge() Thread-Index: AQHYL4FzWFkyFnZUSku+xBH1UQyT+KyvkiKAgAAEfoCAAD4yAIAANciA Date: Sat, 5 Mar 2022 02:00:39 +0000 Message-ID: <20220305020021.qmwg5dkham4lyz6v@revolver> References: <319e4db9-64ae-4bca-92f0-ade85d342ff@google.com> <20220304184927.vkq6ewn6uqtcesma@revolver> <20220304190531.6giqbnnaka4xhovx@revolver> <6038ebc2-bc88-497d-a3f3-5936726fb023@google.com> In-Reply-To: <6038ebc2-bc88-497d-a3f3-5936726fb023@google.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a669264b-8261-4e02-eb48-08d9fe4bf28e x-ms-traffictypediagnostic: BYAPR10MB3672:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: LQKBrhcE3RYBnFMELhSH6ophaxUb1KCVXrEATh2qFrqTyU9qwEjclwo6MKTxnaRTZnHjFL5OwqqNLsyy9QOb2RenpiC+cLjybDjsPmKwsfHJpONmaXkGK94OPNLdOFvU0jpJkIGu2P+JYAg4IPpcSzRG3U2cf0PzEscRPAEDMysuvJefd6tJSnf5AkzqlboArRorwHdrOUkAaJdRssgmxlL/lWvvtyFqblbGzfj4TNuFVkdvFLEgC6iGKy/Us5V9j6xWWXe/8hveA6W+RwBbjLfCc8a7qbJd3fn9olfKFVcl4x0FdROi5HGhSZTkYGVn+dQwFa2ZoHfncE5y9gJwJMpmMH5EkHIbQJo4LdEqcVNzs1VmJ/SGETqjOfPngCUnP9INUEeRk5Ofu4Jxj7lJySY2CATcWQWKLtCYmN3+ngSjarRCLb35N00cGj9UvqBT1SRkn0yooUTdQ5M1gSnVPSN6Mh1rM6L/BpmMkNHjiNcBtF4WEtarf4UBJzwvm1ERRnP7zPF2zYoDA2J9aQU8nwD8Y8ZPoWvoGiBO+gzRRTbXm+Bt6RkO9Zv2xGekudEXgjufFQ40r+Fx745q3nlVGtQhV2MUFPg3f4U18yD7el9n1YVOoQP9u6Qfuxc6hfPGVEdgxlQPXbADoAHXyGcT0cPzNTASVD1VXtivX0u0hJgBrQlv5PaWVyBRPavntrVsIDx/K1/ZeoenlRmQpR/hJw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR10MB3022.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(7916004)(366004)(86362001)(6486002)(508600001)(38070700005)(66946007)(66556008)(76116006)(66446008)(64756008)(8676002)(66476007)(91956017)(4326008)(316002)(83380400001)(54906003)(6916009)(186003)(26005)(6506007)(122000001)(71200400001)(9686003)(38100700002)(6512007)(33716001)(5660300002)(44832011)(2906002)(8936002)(1076003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?bExTQ/WTkl6158u2AaUiuTcAJBGdWhh1COtjjaS3epmQQKpB5Vy3oc/leX4p?= =?us-ascii?Q?yl/e3dt4N5NzT+80k7Mh+nf2R7Hz4byCRlpdDE0q7rzrkJtTyPxiNcdJ3uw3?= =?us-ascii?Q?TvprGGwS+nt98XILyCmQh788G9WckHnfuEfdFJqwvuPbH8MWdG7t/vxcHVWY?= =?us-ascii?Q?uuqfdHlhGXfxseRhdlUH14WQ9X1WVXDfX0G092tP5g7xCknPXyw9x6fWkLx8?= =?us-ascii?Q?UDkLrhg9qCuPohH/6CQ/k6utkYA6kXvDQSgcqXHWyhcs16ToictSQ7C+/8Sr?= =?us-ascii?Q?MFXx4eGx9RqbksZ4P9D1ZswywR0rX7a5cxyX/ADFcWf82t69vIfZqG+RjdKc?= =?us-ascii?Q?8Jfl11BVgr3SnseBzdfAj+4C6Hqp6+QfShphlJeA9YRDLBK+9zs+0kdrT3Py?= =?us-ascii?Q?Sypa67YYVxLXamcVEt8qlHSLxZ9/ZzEFoCWYZshrp3vTKdPC5e3FRiGfQrqx?= =?us-ascii?Q?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YVzSKJgyFJ2mjaH+V?= =?us-ascii?Q?AleabN8/P8BOpeggFod5Bco0oAQ2w7rLQPBCnW6lNUMmDdHhbdX/nn5Q0Xwn?= =?us-ascii?Q?iU6OIRYsoOBRgB/wF6R6s+oZbiUnn7Qe1gCkZ8gN+Q/uW/Btk01RhC5hGquy?= =?us-ascii?Q?PQHQF++WHIskLo18HlN1n/Phlx1YUtc/mAsvH7ZKPHT0Cr9QCTNQzBQBar0t?= =?us-ascii?Q?Gp8Pyisf7s40eziPlfuPZfjHxhaGXadqqFQXBOFRKoA2cP00jn++l61JJgmt?= =?us-ascii?Q?onS1qVsiYJs3AKn/cb7vmM8=3D?= Content-Type: text/plain; charset="us-ascii" Content-ID: <9594EEC17D301243B07ECE08F890FB28@namprd10.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a669264b-8261-4e02-eb48-08d9fe4bf28e X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Mar 2022 02:00:39.4309 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: X/PxBut3mEOCqAyX/L8WxfAScYd7BplADawhUokBfchhGaXeD6q9gzWVr2/Tps3PwIdwN77yr5FXZ09v3r13aA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB3672 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10276 signatures=690470 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 suspectscore=0 bulkscore=0 mlxlogscore=999 adultscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203050005 X-Proofpoint-ORIG-GUID: 2ypbhft9Es5zsMAGTDwoDw9x8_R_AJXK X-Proofpoint-GUID: 2ypbhft9Es5zsMAGTDwoDw9x8_R_AJXK X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Hugh Dickins [220304 17:48]: > On Fri, 4 Mar 2022, Liam Howlett wrote: > > * Liam R. Howlett [220304 13:49]: > > > * Hugh Dickins [220303 23:36]: > >=20 > > I just thought of something after my initial email > >=20 > > How does the ->set_policy() requirement on tmpfs play out for the > > mpol_equal() check earlier in that for loop? >=20 > It took me a while to page all this back in (and remind myself of > what is case 8) to answer that question! >=20 > The answer is that the mpol_equal() check at the top of the loop is on > an existing, unmodified vma; so it's right to assume that any necessary > set_policy() has already been done. >=20 > Whereas the mpol_equal() check being removed in this patch, is being > done on a vma which may have just been extended to cover a greater range: > so although the relevant set_policy() may have already been done on a par= t > of its range, there is now another part which needs the policy applied. Doesn't the policy get checked during vma_merge()? Specifically the mpol_equal(policy, vma_policy(next)) check? >=20 > > > Reviewed-by: Liam R. Howlett >=20 > Thank you, your review is very welcome (but mainly I Cc'ed to alert > you to how I'm probably stepping on your toes a little here - sorry). Yes, I figured as much and I really appreciate it. I'm quite confident I translated this bug to my patch set. Thanks, Liam=