Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1597606pxk; Fri, 25 Sep 2020 21:17:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyR4oy4Sp3gL/F3ZAg3q6ysBrunER3lZZVFsM1ezZbTrnJVfc28r+mrculbwNJOaMTOxNIR X-Received: by 2002:a17:906:b097:: with SMTP id x23mr5702757ejy.21.1601093819946; Fri, 25 Sep 2020 21:16:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601093819; cv=none; d=google.com; s=arc-20160816; b=R17EXKA0eVmEMShtdUXuFkFgb0njbPLxjqX7KYVZyLVXvOZMB3H9yPGsk4fYUuOH7a yCuHoggI//qdiTEgzL2XYG0VQfjf80diDBXUjcWWLldvmyVTUrfILOFVbIlULNzQ62Rr oZOgRgVK2uOStqBTa05SVw3lwC0o9RJbbv5KlX2+tfHjry5WGCZDYNIX1eJhcfX3a/8l nmMxvJeHjV7k1cAS4XfUtg1BJl+JPczz1xL180HieU1PZ+xCLeP0j5wg0cCeiFqOb7UK jSVGGUUeYlBfTWb6SYhKTDVoAIrQBf2APE3XmLCoXZo+trNN3WaXJIRAWyoq9uBN2qct Wb2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:in-reply-to:cc:references:message-id:date :subject:mime-version:from:content-transfer-encoding:dkim-signature; bh=KUTsQ4cRgo7tcvKxTzbTra/DQ+skBopOu8YgTTZQp+o=; b=opitqRRo94kC9r9uNVfibf6OHcH96sGiCvwgmiuvfpglP+NAw2Cn7Oazw+FuJhjd2E df8beZhZkbYRvzMnGrgaYwcgLJgZ4PCcuMx8fMMQJ3WzqBzNsrTwiLwz8T9OLOf7FRTi AHK3c9pkAt9e1R4sSpI97BC47JGh+sVYLpE1HYUNW17ySq408G5ObSId62a+D9UcIeH4 dT0mPyFLHpx/+vNdL94OR1ZvQclklLTW9SLis4lYU5/jWgnAPAbSEjOQBnOt9f04HaSD TFiDmHNAINz5F25Q896cde1c3rzrEBc2Ue1HSjwOVhos6EVZAMHDEzELymDj1MxN0m6y Wm4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=BWnMfRXU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g17si3413716ejr.649.2020.09.25.21.16.35; Fri, 25 Sep 2020 21:16:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=BWnMfRXU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730006AbgIZEPY (ORCPT + 99 others); Sat, 26 Sep 2020 00:15:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729986AbgIZEPX (ORCPT ); Sat, 26 Sep 2020 00:15:23 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05B2DC0613D3 for ; Fri, 25 Sep 2020 21:15:23 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id v14so477569pjd.4 for ; Fri, 25 Sep 2020 21:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=KUTsQ4cRgo7tcvKxTzbTra/DQ+skBopOu8YgTTZQp+o=; b=BWnMfRXUFKWpwia+E3QCxxaGzaHx+nORFT5Orpdeojhqss9dXtuYypFi6XTnsJ3WjW WEkjoK65wFyrvC73Uj4kbseBI6mjY8eI00R1vA7WhobCZE/0rP0GNtVPhFli7UV8Dl/h byjFxzHO9ScP+K55Ql6Rk8wrBGTASEGmQ12Kb9PNQ7J90+N7zvbXrlNrBQFcJJV8S2rn xUTWlqa18psooaWuTDDBTjmNpwjnO0T8EU6JYdLZpmN++wFoU6QFG7eeYK1CWTGKq17K RP1E8gLbK+aIf5TJRRCKDWGWep7Saozz5gdF6pyCSCrIAFp0gSKBE91tdnp4Y5Np7IuE b1rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=KUTsQ4cRgo7tcvKxTzbTra/DQ+skBopOu8YgTTZQp+o=; b=Lb01EvSK+bR1lUNDDtVJk0ogPmKB9QBkI/0CioU3784wzkGoF2yiqwuFsSQK2n2YwV XUoaCXHaU6fGlbnm6MwM5tl/L5+Glpi+ibHitxn27yMnr9K1HAk830T9ck94BeNLJf5f aems4VAy7Gdraws32cwokOqhK0dmtee9KPe0JcqQIp19xoXomUkc1WkW/otxFvybcTYN LFeIBU+Y50eSugbza25CosvkHrJNvLvCW5+Y11C5XlFIcCkU07MlAm/SvsikSW1otLVT kEilvO2XsWi1PEade7tuJFpMppviqu6/m97Cwf0wCH4zJZmubxDu6H1zT/w2jPn3HOcn z2Xw== X-Gm-Message-State: AOAM532dGOnD64WDY2p4qZsvDBoYGzsE8uB24F+5Yi82RKUuyNo1/mql v4RFDHZFBiUnnEkeBwj7xlG2eQ== X-Received: by 2002:a17:902:b18f:b029:d2:1ec0:4161 with SMTP id s15-20020a170902b18fb02900d21ec04161mr2444866plr.58.1601093722526; Fri, 25 Sep 2020 21:15:22 -0700 (PDT) Received: from localhost.localdomain ([2601:646:c200:1ef2:65a8:3322:5d17:ae5b]) by smtp.gmail.com with ESMTPSA id gg19sm505756pjb.49.2020.09.25.21.15.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Sep 2020 21:15:21 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Andy Lutomirski Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect() Date: Fri, 25 Sep 2020 21:15:19 -0700 Message-Id: <2321E653-F629-44D7-91C3-F42F42AF4EF6@amacapital.net> References: <230ce6da-7820-976f-f036-a261841d626f@intel.com> Cc: Sean Christopherson , Haitao Huang , Jarkko Sakkinen , Andy Lutomirski , X86 ML , linux-sgx@vger.kernel.org, LKML , Linux-MM , Andrew Morton , Matthew Wilcox , Jethro Beekman , Darren Kenny , Andy Shevchenko , asapek@google.com, Borislav Petkov , "Xing, Cedric" , chenalexchen@google.com, Conrad Parker , cyhanish@google.com, "Huang, Haitao" , Josh Triplett , "Huang, Kai" , "Svahn, Kai" , Keith Moyer , Christian Ludloff , Neil Horman , Nathaniel McCallum , Patrick Uiterwijk , David Rientjes , Thomas Gleixner , yaozhangx@google.com In-Reply-To: <230ce6da-7820-976f-f036-a261841d626f@intel.com> To: Dave Hansen X-Mailer: iPhone Mail (18A373) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Sep 25, 2020, at 12:53 PM, Dave Hansen wrote: >=20 > =EF=BB=BFOn 9/25/20 12:43 PM, Sean Christopherson wrote: >>> That means that the intent argument (SGX_PROT_*) is currently unused. >> No, the intent argument is used (eventually) by SGX's ->mprotect() >> implementation, i.e. sgx_mprotect() enforces that the actual protections a= re a >> subset of the declared/intended protections. >>=20 >> If ->mprotect() is not merged, then it yes, it will be unused. >=20 > OK, I think I've got it. >=20 > I think I'm OK with adding ->mprotect(). As long as folks buy into the > argument that intent needs to be checked at mmap() time, they obviously > need to be checked at mprotect() too. >=20 > Jarkko, if you want to try and rewrite the changelog, capturing the > discussion here and reply, I think I can ack the resulting patch. I > don't know if that will satisfy the request from Boris from an ack from > a "mm person", but we can at least start there. :) I think I agree. ->mprotect seems reasonable to me. FWIW, I don=E2=80=99t think I should ack this particular thing =E2=80=94 it w= as, to a decent extent, my suggestion in the first place, so I=E2=80=99m bia= sed. I think it turned into something reasonable, and the ->mprotect mechani= sm seems easily supportable and plausibly useful for other purposes down the= road. >=20 > Please be judicious in what you include in the changelog. There's been > a lot of detritus in them. Let's keep it as short, sweet, simple and on > topic as we can.