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=-5.0 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 A8016C433DF for ; Tue, 9 Jun 2020 11:36:48 +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 7B6782064C for ; Tue, 9 Jun 2020 11:36:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Upcoq0j1"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="P2R1mKLh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B6782064C 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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VFdSp4rWbnYfSUo3L8aZugZe3fi7dMJdqdLpau0Rhcw=; b=Upcoq0j1i0bpr+ vcNcom+JYu7iQSKU8F6OOMIxNrrXEW2IivH53vbkPkPUsiyHGMdlrQ7LycWiFUfglxR7LaIwB9FPs 09Z6m3vqQXZZqrye8z4vUX+f7EciVhlpGBSHgO1/HOh9bVfS/eKCxjhsrwVsZpmDUxlGITEaJL5Nn NYHtErr4dTMIyVLEzSH6iLU0ijTukJnguPdZbktctoPjdCSUM9eFoSNZt7omD1Xie74AUesZ5Iawj yaMEmQDo63RBpQ1nmAeB9u1tW0wijorBD2TKmdYAZ5vE2bFY4rMFslBeIRRUyCbj3WSaLemYKJ0qR doQ3kam28mx0Lfa8BPFw==; 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 1jicYi-0007NF-0i; Tue, 09 Jun 2020 11:36:48 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jicYf-0007Mr-Bu for linux-arm-kernel@lists.infradead.org; Tue, 09 Jun 2020 11:36:46 +0000 Received: by mail-wm1-x342.google.com with SMTP id g10so2485458wmh.4 for ; Tue, 09 Jun 2020 04:36:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=cc:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=fJYvnclAzUmRLcosHFWh9bntbC7vT1JGF1oeBQ8Fq+s=; b=P2R1mKLhXQWVtCHOxyai+DAZG41BWFjzm6j5avzQXpSxNuWLd0zI2ZAIIc4x6l13KB GEcfW60U9ZqCVsXLm6z7mcme2KgyqBb5RWZc70Hk0AZ6Mtu+pis4mraUV6zQJH8zljMV qYWcjAv1XASWjh+/rDLdQNtMWElHzIr/os7SwX0XTelKWCK5SeyY1cJuyvsrbCneQa9F aC6/pkYQzN7xovrsGRi9bT5EkdkW63s+3+44tBo9v9cQWQrRqCQlpxOSqUVmholNMdDP shbRCf93kJQnue9etZw6zuflr/vzK0Nn9J8yiv593lo4AHo3RmMikB9eQjXZAGG1PiEm patA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:cc:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fJYvnclAzUmRLcosHFWh9bntbC7vT1JGF1oeBQ8Fq+s=; b=KmBl0Ne40MSNXKdgm5JNuJQ77VWDwZdwXDDW4wOuXogNMNPQwe/lDsDoklv3yVwn14 ywV2aMdYqzhoClp7vz36ha3iBW4FZ5hSBJ+hHpJdSuH3EzvcFyS7odm5hvBpNSAExPIt 3kLgvtsZON797v5jeaaq5L5+AV+LCHs+bepqkSscXExLe6jUvgoTN11IAvXokelDVt+Q VKhiFICMvxapNxRK37QtCti9kbjEtsTjPCXyojcHKF3dwdsCkCc0U0gm4LyDH1Kx52qx oIO7Tk1Rovvjr1Y6vPCWk/lLq6/YL76RwbB0+hBMT0V5fZ9ExFPiVNtIq8jksYJ82fUn wzBg== X-Gm-Message-State: AOAM5332ox2uEmgRiXHSPLTyVb6uV9zdpRWVrZhO/80CIZBgrE2m1skY 258d5XQ9vUoRV0ZO8wipYVQ= X-Google-Smtp-Source: ABdhPJyM2GfdDSPkYVRuDWbPh+MpdEr3Po9Fi8MZXny0ZoMELo/Ho+aLHDQS1ZFhLdAvqQECBsw8NQ== X-Received: by 2002:a1c:4d11:: with SMTP id o17mr3447033wmh.37.1591702604028; Tue, 09 Jun 2020 04:36:44 -0700 (PDT) Received: from ?IPv6:2001:a61:253c:8201:b2fb:3ef8:ca:1604? ([2001:a61:253c:8201:b2fb:3ef8:ca:1604]) by smtp.gmail.com with ESMTPSA id z206sm2699467wmg.30.2020.06.09.04.36.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Jun 2020 04:36:43 -0700 (PDT) Subject: Re: [PATCH v2 5/6] prctl.2: Add PR_PAC_RESET_KEYS (arm64) To: Dave Martin References: <1590614258-24728-1-git-send-email-Dave.Martin@arm.com> <1590614258-24728-6-git-send-email-Dave.Martin@arm.com> From: "Michael Kerrisk (man-pages)" Message-ID: <1084d017-54f3-475c-be1b-aabc801d9a71@gmail.com> Date: Tue, 9 Jun 2020 13:36:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <1590614258-24728-6-git-send-email-Dave.Martin@arm.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200609_043645_405427_73EECE6E X-CRM114-Status: GOOD ( 16.71 ) 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: , Cc: linux-arch@vger.kernel.org, linux-man@vger.kernel.org, Catalin Marinas , mtk.manpages@gmail.com, Amit Daniel Kachhap , Mark Rutland , Will Deacon , linux-arm-kernel@lists.infradead.org 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 Hello Dave, I've applied this patch (manually, because 4/6 is not yet applied). I have a question below. On 5/27/20 11:17 PM, Dave Martin wrote: > Add documentation for the PR_PAC_RESET_KEYS ioctl added in Linux > 5.0 for arm64. > > Signed-off-by: Dave Martin > Cc: Will Deacon > Cc: Catalin Marinas > Cc: Amit Daniel Kachhap > Cc: Mark Rutland > > --- > > Since v1: > > * Clarify explicitly that PR_PAC_RESET_KEYS is redundant when combined > with execve(). > > * Move error condition details into the prctl description, to avoid > excessive duplication while keeping keeping related pieces of text > closer together. > > * In lieu of having a separate man page to cross reference for detailed > guidance, cross-reference the kernel documentation. > > * Add safety warning. This is deliberately vague, pending ongoing > discussions with libc folks. > --- > man2/prctl.2 | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 80 insertions(+) > [...] > +.IP > +.B Warning: > +Because the compiler or run-time environment > +may be using some or all of the keys, > +a successful Things got a bit garbled here. I think the next few lines should have been at the end. > +.IP > +For more information, see the kernel source file > +.I Documentation/arm64/pointer\-authentication.rst > +.\"commit b693d0b372afb39432e1c49ad7b3454855bc6bed > +(or > +.I Documentation/arm64/pointer\-authentication.txt > +before Linux 5.3). > +.B PR_PAC_RESET_KEYS > +may crash the calling process. > +The conditions for using it safely are complex and system-dependent. > +Don't use it unless you know what you are doing. I applied the following change after your patch; is it okay? .IP .B Warning: Because the compiler or run-time environment may be using some or all of the keys, a successful +may crash the calling process. +The conditions for using it safely are complex and system-dependent. +Don't use it unless you know what you are doing. .IP For more information, see the kernel source file .I Documentation/arm64/pointer\-authentication.rst @@ -1020,9 +1023,6 @@ For more information, see the kernel source file .I Documentation/arm64/pointer\-authentication.txt before Linux 5.3). .B PR_PAC_RESET_KEYS -may crash the calling process. -The conditions for using it safely are complex and system-dependent. -Don't use it unless you know what you are doing. .\" prctl PR_SET_PDEATHSIG .TP .BR PR_SET_PDEATHSIG " (since Linux 2.1.57)" [...] Thanks, Michael -- 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