Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3991544pxb; Sat, 5 Feb 2022 00:31:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJwY0DEqoZ4J1qrKuh8o6xy3y7Y/ERgRTywZeluoGsGzFfB3MzQfXElTTqhVKrQ/a05KcdLy X-Received: by 2002:a17:906:58c8:: with SMTP id e8mr2246297ejs.706.1644049879950; Sat, 05 Feb 2022 00:31:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644049879; cv=none; d=google.com; s=arc-20160816; b=uI9uYcFZB+SDOdNsA93pyFWxbSEXziziQ0Y+n9djd9Skr14ajBLZEy13sEdyJlt4EJ 0hwmJGylWkbs5AXYUlMfg3QFXpJmLbm5/KjeDbjBQQDq4pgtTK6STPAa+AfZkRBzj1D1 ThRhF0HtVibvREKDCxjje5PmdfW1OyoXiOtXtDAyxHc5lG41ogAlTrVpdXbpPBObPFOP 8cXlqhLgoRld1m0csvie1wOHKSDeenjG7s87XllQ97cLLMJhNumHqdMF3jdxm0+xbZe8 OXaFhUQN3390fPbeoW+3tiNI7aXXGVvkJwdxQUtGQWlqdb5lcQQdil6EMA+wya0t/s9y it+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Mw2mTYd1EA4mqj3Y4u5Ue6ccwfT5N3jmz03Fjl83bCU=; b=pWhBTc6d1CaX4nRIUMsOo4Cy+eMZrtyKSwxGERaQUkZ2qoNSFu88Pu4SAki76MKPdU haJXtQtz/5Bv8a1Hb4eDZJ5YisKoyHoUlFGQNe/G3ZhYOL50JaFUnVrIHTVF3SW0fa3y +SLXhi6XDcd+Bo9z8DBK3J7EZ2xSdyrZdXdvOBWzQ9CdT9V4F1hDUWzAS9VwstvreYro q04OYe9ho9FekmOAU4vzqig/Lhw89R4Dv+4svkfwIoSV+C76TbOwpzb2LyUW9mLMHPdM jyY9I5HVu0kMHg2q9xj8o7ZxhZSocwi8moUpdzNtKJa6ZibIA3K+MAyiWcC9OUajbcdo kv+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=eXZ63+a1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z13si3459512edd.111.2022.02.05.00.30.54; Sat, 05 Feb 2022 00:31:19 -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=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=eXZ63+a1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376999AbiBDRmM (ORCPT + 99 others); Fri, 4 Feb 2022 12:42:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235897AbiBDRmL (ORCPT ); Fri, 4 Feb 2022 12:42:11 -0500 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE3A4C061714 for ; Fri, 4 Feb 2022 09:42:10 -0800 (PST) Received: by mail-pj1-x102d.google.com with SMTP id o16-20020a17090aac1000b001b62f629953so13741403pjq.3 for ; Fri, 04 Feb 2022 09:42:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Mw2mTYd1EA4mqj3Y4u5Ue6ccwfT5N3jmz03Fjl83bCU=; b=eXZ63+a1lsDWDQRsOLXVJsnfLq/T94bBQbtG2VSM6hWcEGd2c3kiVmPhjjtYB+R676 rkEaPFYX5U1ven+VCgHmCha20Y8LYxpO/9S1b0kb/WWLCJZpKi7BFo4nhuGxkJCc9GRe Puco1/iHoAktkjG+LtLJSXWG9EvmSm+TWXyIRyNhWGugQ6CONuWNsjJuCk2QWXRVYkf3 FxCJr8VaU/Kbk74pf8WcRIrlxRF7QNpAHc0a8lyHU+OSMfEDVJRQVcg5jMeZWoPyYz9L Oa0PYy4YemePwGFF1YbLDQiBLoaeD7Ig9LLQs1HK8Jdk9XMWExOtIpMlEFakXV58Loca l3HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Mw2mTYd1EA4mqj3Y4u5Ue6ccwfT5N3jmz03Fjl83bCU=; b=owrFD5J+41RKCQzH/tfeYk1TvRMg38nkub9UD0BowXNuzfyxmzUV3Bsg5N6aRd/LXJ 1eTm/RHLp6DkWjIOqtnwJJTHD+TqFF6jiplK4IDj5Fmz0JojvrxPFqwmbWP0JooJK9N+ Th4YWoLFB4iyVnB+qHByBHxoxYYZgdwNb6gTTHub2eLkrlfuOd9TweBNUKTcq4tWZRAt i3Mh4VAiQ8+56n/Pt6q9Vyepka1l73s72wZLXDUsZ8pWWWa2RAuRFdOkSN9/jbARKl8W dsPuITd8/hEC4/oT4rFHsfgw7MPGf/gal/IglX9yUHclSn5yKWYs89r1cZDgSHG8whKM 0rXQ== X-Gm-Message-State: AOAM530Hp7RiipifRCfRDwLVZap/DY765XQ2n1QVWWaMroqiYUPwvd1m JK5PIAwZm9eH01s/gnZ2oa1s4pxfL4avnh+EIVUaHg== X-Received: by 2002:a17:902:d705:: with SMTP id w5mr4408362ply.34.1643996530392; Fri, 04 Feb 2022 09:42:10 -0800 (PST) MIME-Version: 1.0 References: <20220127175505.851391-1-ira.weiny@intel.com> <20220127175505.851391-38-ira.weiny@intel.com> In-Reply-To: <20220127175505.851391-38-ira.weiny@intel.com> From: Dan Williams Date: Fri, 4 Feb 2022 09:41:59 -0800 Message-ID: Subject: Re: [PATCH V8 37/44] memremap_pages: Set PKS PKey in PTEs if PGMAP_PROTECTIONS is requested To: "Weiny, Ira" Cc: Dave Hansen , "H. Peter Anvin" , Fenghua Yu , Rick Edgecombe , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 27, 2022 at 9:55 AM wrote: > > From: Ira Weiny > > When the user requests protections the dev_pagemap mappings need to have > a PKEY set. > > Define devmap_protection_adjust_pgprot() to add the PKey to the page > protections. Call it when PGMAP_PROTECTIONS is requested when remapping > pages. > > Signed-off-by: Ira Weiny > --- Does this patch have a reason to exist independent of the patch that introduced devmap_protection_enable()? Otherwise looks ok.