From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E0F2C433E0 for ; Thu, 28 May 2020 06:58:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3453C208E4 for ; Thu, 28 May 2020 06:58:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Wr0zlNpd"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="t/IILzIy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3453C208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date: From:In-Reply-To:References:MIME-Version:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9pCGftdaKDlCKPh35aVQLOokv4AEryPXpsRI2+yISf8=; b=Wr0zlNpd6ZRw4h 3g6EVa0fBdDgzeXZ3dP4HtAZ3jEwScmY7vuO/lXmLfIO2aGoVzSVmsiHoRWhMSY6u368ZE8GUR9O4 FuzcgBfoNGK1B9xsUTQ4b5Gc8AaPglkGbaYx6e1cD8Lqtt4IoWby1QjTZSYlpLBPXXtSQJDuUEz34 nlZ2LNRmXR8jbJ+BMTyNpfpcUGQhApja8tQaNaCfobFYiLhTfkmE2QyfqVD5vfzlyqh2lEIrjRNbe iqKTVWwwivuL4uME5hS7SEx9Jd2ppwgXmE8lKMveLvMDTSSUVhOnnJevSmzNmCFRsGacjrBMNyv5d lXtF7DgDTVw4R5Cht6kw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jeCUN-0005tT-QM; Thu, 28 May 2020 06:58:03 +0000 Received: from mail-ej1-x644.google.com ([2a00:1450:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jeCUL-0005sl-KK for linux-arm-kernel@lists.infradead.org; Thu, 28 May 2020 06:58:03 +0000 Received: by mail-ej1-x644.google.com with SMTP id k11so5634969ejr.9 for ; Wed, 27 May 2020 23:58:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=l30+XH7GIqcPUFeaZG9f/zXlLL1cUH8oN11gUUpIQH8=; b=t/IILzIyVUFJKLVaKcWqmVulVV3hiYboHW7owxFQMjo4HkTxeqiIsWaaSi3tTSXQGG JyD/vL32GnFKt7rYUM1qP4DY80SPsqSSuI2uxfO1vn+MwSc1L5ijQ6E62up8o9IT0NBW UWBqRM499LidI+guRHky7fd5LI/B9TwFXwQYqLa0Rt8jNCFftaM8QM1DrWDjje9TcDWx F2d62XVAKpy6CAMNUDe1YEBMiD7GOdU2wUX2wKiQWMXcI9hSto4X9kcyiZ0R7u9uHdJo x1utqSDzWcHW+N8BB20XbgfeOQTBLrU+50zkBsPrZjmLnfHUw+CagIdoSgh6Jy0SRJ2L ++uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=l30+XH7GIqcPUFeaZG9f/zXlLL1cUH8oN11gUUpIQH8=; b=DNHPCdcqOI+KQns+8itpAZAloO3/KdtM8IccYmpdU5TjwPDglp2rGzi9pw3Mylw/9y iP93I4PSRN/pIPrr57La9yXy+pMBm+le4TonavK5ITNX/QzeNRoDeiRz/aVz26aTxagH TIvFr10jC1/noqhx4b+1/QLrqAT5vtDUqrPuMC6NUqavoFKri8/AupAqQ62emk2Hxmid XYaEWB6xyHIUsc5aWrXC3i5Gt/MjO66QH1TQXvwefL6O5lZDfZaqwlieZr8YqvP0Js7Y wDQmPV9ifW9tFv62n5Fk/lUUFdsLMfHshsfseG56OH296LsTSOS2ftoxtBDOC7mNd/lb 9ryA== X-Gm-Message-State: AOAM532swazPScxID5+hqMW6mYurxJegtn32VEdG1zjsiElChL7vqdAr 7sTT5yu20WLaPA/B4Xxkgnk2So24kSeokvBm93c= X-Google-Smtp-Source: ABdhPJwIUqdDsy4Ne4drAA5CiYn8Fuz53Xu/Z9G4g6JWO0nsFtF7JHCXsyBvqrV+JFPNGYy9fdNYyuD2DqhoY2pJa/g= X-Received: by 2002:a17:906:8492:: with SMTP id m18mr1660565ejx.168.1590649080199; Wed, 27 May 2020 23:58:00 -0700 (PDT) MIME-Version: 1.0 References: <1590614258-24728-1-git-send-email-Dave.Martin@arm.com> <1590614258-24728-4-git-send-email-Dave.Martin@arm.com> In-Reply-To: <1590614258-24728-4-git-send-email-Dave.Martin@arm.com> From: "Michael Kerrisk (man-pages)" Date: Thu, 28 May 2020 08:57:49 +0200 Message-ID: Subject: Re: [PATCH v2 3/6] prctl.2: Add PR_SPEC_DISABLE_NOEXEC for SPECULATION_CTRL prctls To: Dave Martin X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200527_235801_684735_01704FF8 X-CRM114-Status: GOOD ( 16.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: mtk.manpages@gmail.com Cc: linux-arch , linux-man , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Waiman Long Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Dave, On Wed, 27 May 2020 at 23:18, Dave Martin wrote: > > Add the PR_SPEC_DISABLE_NOEXEC mode added in Linux 5.1 > for the PR_SPEC_STORE_BYPASS "misfeature" of > PR_SET_SPECULATION_CTRL and PR_GET_SPECULATION_CTRL. > > Signed-off-by: Dave Martin > Cc: Waiman Long > Cc: Thomas Gleixner I had already applied your earlier send of this patch (in a private branch). I'll push those changes shortly. Cheers, Michael > --- > man2/prctl.2 | 22 ++++++++++++++++++++-- > 1 file changed, 20 insertions(+), 2 deletions(-) > > diff --git a/man2/prctl.2 b/man2/prctl.2 > index b6fb51c..cab9915 100644 > --- a/man2/prctl.2 > +++ b/man2/prctl.2 > @@ -1187,6 +1187,12 @@ The speculation feature is disabled, mitigation is enabled. > Same as > .B PR_SPEC_DISABLE > but cannot be undone. > +.TP > +.BR PR_SPEC_DISABLE_NOEXEC " (since Linux 5.1)" > +Same as > +.BR PR_SPEC_DISABLE , > +but but the state will be cleared on > +.BR execve (2). > .RE > .IP > If all bits are 0, > @@ -1251,6 +1257,17 @@ with the same value for > .I arg2 > will fail with the error > .BR EPERM . > +.\" commit 71368af9027f18fe5d1c6f372cfdff7e4bde8b48 > +.TP > +.BR PR_SPEC_DISABLE_NOEXEC " (since Linux 5.1)" > +Same as > +.BR PR_SPEC_DISABLE , > +but but the state will be cleared on > +.BR execve (2). > +Currently only supported for > +.I arg2 > +equal to > +.B PR_SPEC_STORE_BYPASS. > .RE > .IP > Any unsupported value in > @@ -1899,11 +1916,12 @@ was > .BR PR_SET_SPECULATION_CTRL > and > .IR arg3 > -is neither > +is not > .BR PR_SPEC_ENABLE , > .BR PR_SPEC_DISABLE , > +.BR PR_SPEC_FORCE_DISABLE , > nor > -.BR PR_SPEC_FORCE_DISABLE . > +.BR PR_SPEC_DISABLE_NOEXEC . > .SH VERSIONS > The > .BR prctl () > -- > 2.1.4 > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel