Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp808104pxk; Mon, 31 Aug 2020 01:16:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9OmNgs81h+M3r8luQwQB+3miflJCNWEfN325skXUccUpAk1O50Q1mbxNBTATDxWRV7IAD X-Received: by 2002:a17:906:bc52:: with SMTP id s18mr64210ejv.398.1598861762903; Mon, 31 Aug 2020 01:16:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598861762; cv=none; d=google.com; s=arc-20160816; b=u1A+XqPUvs3LSoar2ijJRVBUN7Y1uIhg/IRsZISnpEfjt4dHKj+9uFHKxQQkN9EceJ nIdjlW2LtGWlcZPKwRBNtXSWn/3nC7BbGhqRHY+U95zdJowVx2trySOud8A4E5R7EW3Z VarQbo+ZmLXcpr4oLPsCXVnacjHXOc1ImQboT05kP5jVdVHxi9UV3rxxzrhypXKA0sVn d05wnZUvN4KsDpgnQWvXNdf3N7hCLa0s00WQDtaIJj0UXmFLxDGRY0z3F7KIg6jk0tox 90HtZ4oncvYvaciG7nhf3khJr6LNBcKJsCg9qXD/qg29vYdJB8HcZY0BF3uiEnYFtfol HtQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=4vMqTDXYEA1GZcxjvtYGWV6ANCMNFGxptzPuiLVCxc0=; b=eYIyTvWE/DaTtfwVoY49CTX1kAJqGvcLzVtoeKkpWTK7hkop/Kzr4rPHPgntAETzo3 bNcs0UmuYMJAVSmZA9yYLpaw51bzBbp/zh9WjbRI4etfr6zjSrVFXZZcBmZjMlhUYKqe tdsO7Mnf0nbmRTomxdV0MRqi+fEbi5ocgnBi1BpsTWPdUBAzhqWJOIrNeoqdmREkQ6IN FquFiY83vWwBLxL1Gcr6/Bh6Jdq1G5aIrgrtFqD62H9gDljOTeBpSwIQuKmojnH8cHE8 t182EM4972+Z+mLXMnpDPQpYNbdSErW/Sy1k0eufhXZiq+F+HGRwcovI0BTq/drH+qiJ e58w== ARC-Authentication-Results: i=1; mx.google.com; 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 b14si4573154edv.405.2020.08.31.01.15.38; Mon, 31 Aug 2020 01:16:02 -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; 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 S1727984AbgHaIOB (ORCPT + 99 others); Mon, 31 Aug 2020 04:14:01 -0400 Received: from foss.arm.com ([217.140.110.172]:54892 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725978AbgHaIOB (ORCPT ); Mon, 31 Aug 2020 04:14:01 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 814D531B; Mon, 31 Aug 2020 01:14:00 -0700 (PDT) Received: from [10.57.6.112] (unknown [10.57.6.112]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E224F3F68F; Mon, 31 Aug 2020 01:13:57 -0700 (PDT) Subject: Re: [PATCH 3/4] kselftests/arm64: add PAuth test for whether exec() changes keys To: Boyan Karatotev , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: vincenzo.frascino@arm.com, boian4o1@gmail.com, Shuah Khan , Catalin Marinas , Will Deacon References: <20200828131606.7946-1-boyan.karatotev@arm.com> <20200828131606.7946-4-boyan.karatotev@arm.com> From: Amit Kachhap Message-ID: Date: Mon, 31 Aug 2020 13:43:55 +0530 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: <20200828131606.7946-4-boyan.karatotev@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/28/20 6:46 PM, Boyan Karatotev wrote: > Kernel documentation states that it will change PAuth keys on exec() calls. > > Verify that all keys are correctly switched to new ones. > > Cc: Shuah Khan > Cc: Catalin Marinas > Cc: Will Deacon > Signed-off-by: Boyan Karatotev The changes look fine so, Reviewed-by: Amit Daniel Kachhap > --- > tools/testing/selftests/arm64/pauth/Makefile | 4 + > .../selftests/arm64/pauth/exec_target.c | 35 +++++ > tools/testing/selftests/arm64/pauth/helper.h | 10 ++ > tools/testing/selftests/arm64/pauth/pac.c | 148 ++++++++++++++++++ > 4 files changed, 197 insertions(+) > create mode 100644 tools/testing/selftests/arm64/pauth/exec_target.c > > diff --git a/tools/testing/selftests/arm64/pauth/Makefile b/tools/testing/selftests/arm64/pauth/Makefile > index a017d1c8dd58..2e237b21ccf6 100644 > --- a/tools/testing/selftests/arm64/pauth/Makefile > +++ b/tools/testing/selftests/arm64/pauth/Makefile > @@ -5,6 +5,7 @@ CFLAGS += -mbranch-protection=pac-ret >