Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30976862rwd; Thu, 6 Jul 2023 13:40:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlFPEDI+goW2XwKkXWLCSvMCtXx1Pc4WsCfJ1yY2GDFm1JYuS5h67zLfxaxuAowjd4bGVucs X-Received: by 2002:a05:6a20:26a5:b0:11f:2714:f70d with SMTP id h37-20020a056a2026a500b0011f2714f70dmr1923175pze.9.1688676033180; Thu, 06 Jul 2023 13:40:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688676033; cv=none; d=google.com; s=arc-20160816; b=S3/uIrtggteNtAe+Y8gdqUVMB8geEf78P/ZfCr2fJJ3kM2EK427Qy6ZbId6MaqPwYp zn3REGVyHwn3mcwju8n5gR14y0v/B5mL2GOGASnNPcFBiIAhTCVhmTOnMGK+Kyhe/XJ0 64W7YUvX4OVbhmcqRUfAj7+L5zsK4WbNumBbl5XWU5tJTa4hwlRGDZfecFYYESRwcll0 zFbScDaEGvutTyHTvR7Frs1GpggoNnR5S0yh4FqkYAG/3f8T4B3vND4GnWApbPYXHMxc 6AVtkryYb3MhLYInQZAi6CeGaG6OTCXoJ2OkYrP9fApBWPFBrc7ePx28k/vyy58/CAke 96eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=gWOQqakoZqzCWe3j5esuZLBOmbkLOkQAymhYFAOynco=; fh=eW82FStBjnEKsB+p6s3kKkq6tHv9F0HN7AU8Tdmv0NU=; b=T56ww9+U6ezfO160U1OBO1T8fA15/RnVqPm64/QpGqhPFcWVesjIcYneHLVZJOetR9 wGVdxWqrJ5pJWr6hccpID8xwYy02vxacSe3xKteMRTY9pLMUdeYDbaLacjTAL/yCA9Yo OoqR/ef8H9taPX83N4wI4p5fn8G8TCHzDd8JouYGf71ngDwEjbRdFYWgSEU8tNG7Kro9 fuUSJc/tp3QkMJCColdZPYoChRnpC6RqRG+JjWLsYSu1yxhisjsRoKMNp+ezWg67HhT5 AsA3zkCq87BrfZqOY/NLVNR8xgjcjfwX1hSjNUfud547Xqc59NTnVMvjIwSOoG/jG5SW HJmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=ZhE4tZph; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b="OTund/UU"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k73-20020a62844c000000b00666b8536d8asi2030332pfd.305.2023.07.06.13.40.17; Thu, 06 Jul 2023 13:40:33 -0700 (PDT) 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=@arndb.de header.s=fm2 header.b=ZhE4tZph; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b="OTund/UU"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232680AbjGFUW5 (ORCPT + 99 others); Thu, 6 Jul 2023 16:22:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229787AbjGFUW4 (ORCPT ); Thu, 6 Jul 2023 16:22:56 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B66AD173F for ; Thu, 6 Jul 2023 13:22:54 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id F1C2E32004E7; Thu, 6 Jul 2023 16:22:49 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Thu, 06 Jul 2023 16:22:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1688674969; x=1688761369; bh=gW OQqakoZqzCWe3j5esuZLBOmbkLOkQAymhYFAOynco=; b=ZhE4tZph3V/LB4k634 OM6QlpOqYnRKa59ql3C/YFIHJWZyIQJOZUrepOaW810Ykuj3CtxA66VXZtahQPLN HnmxRfIGBMIB6YR4U9UQMkMzM2xA7kaY7RPtr/TfwvVRe8d2NroLouqAFrtum5by e0pgDY4loK3GfgmCXpLtqQV6BhkQU+W1KChBdCd+ovXMlGQPR93db4pHXknhxGgj iYJhjZQX31gBd2zqHD5ckp6o1Ev//IzvvLBEKcRTKXYgxCu0IN4eVdWFRJ9VW3s2 r0MUinnT6v3shU6Hk1vNjBi6GkjuEkmdbhmpwoT2LMsmfRTFR5SyPl7BhdbPKVYk F91A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1688674969; x=1688761369; bh=gWOQqakoZqzCW e3j5esuZLBOmbkLOkQAymhYFAOynco=; b=OTund/UUD/UF67LU9cGIrcDy1DPOM Bf2U4la6lULU78z+h7JawJVWerFRi/qh3Gfuir7KS3YyOrjEY9T95bgDb5nV/GXC QSUJDGb7SEgI+gcKBbIYSWTKwL0UAMOMywbF2Bbwrw48YCX3y89Z2IIvTJlj2HBY U0uMSZu++SANSirr2gAqrYE0k7+8QZU2KTWlQInaO7oOnug2BZY+fxkyh8z8Gi9j sh/s08g9h3CAxsHnwwsqbN2IL/JgDlcmZTHuo5+wP+SXQSCzeMHk5PzCX33ILDns vjYoapCBOcv4yb7/FlhsbGPvVDL3LhfI9+42iLIac/8yUn57TaCa4DQAQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudelgddugeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id DCA47B60086; Thu, 6 Jul 2023 16:22:47 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-531-gfdfa13a06d-fm-20230703.001-gfdfa13a0 Mime-Version: 1.0 Message-Id: <2d9bb146-e1ec-4fc2-a4bc-e1c67cfda723@app.fastmail.com> In-Reply-To: <20230706190217.371721-1-thuth@redhat.com> References: <20230706190217.371721-1-thuth@redhat.com> Date: Thu, 06 Jul 2023 22:22:07 +0200 From: "Arnd Bergmann" To: "Thomas Huth" , "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , "Dave Hansen" Cc: x86@kernel.org, "H. Peter Anvin" , "Nicolas Schier" , "Masahiro Yamada" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86: Remove the arch_calc_vm_prot_bits() macro from the uapi Content-Type: text/plain 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,SPF_HELO_PASS, SPF_PASS,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 On Thu, Jul 6, 2023, at 21:02, Thomas Huth wrote: > The arch_calc_vm_prot_bits() macro uses VM_PKEY_BIT0 etc. which are > not part of the uapi, so the macro is completely useless for userspace. > It is also hidden behind the CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS > config switch which we shouldn't expose to userspace. Thus let's move > this macro into a new internal header instead. > > Signed-off-by: Thomas Huth Fixes: 8f62c883222c9 ("x86/mm/pkeys: Add arch-specific VMA protection bits") Reviewed-by: Arnd Bergmann It looks like this was introduced right after the uapi split, and probably is the result of an incorrect rebase. Arnd