From: Amit Kachhap <amit.kachhap@arm.com>
To: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Bhupesh Sharma <bhsharma@redhat.com>,
kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
James Morse <james.morse@arm.com>,
Vincenzo Frascino <Vincenzo.Frascino@arm.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 1/2] arm64/crash_core: Export KERNELPACMASK in vmcoreinfo
Date: Wed, 6 May 2020 18:34:20 +0530 [thread overview]
Message-ID: <590176f0-802b-f71a-0c1e-00283808e1d8@arm.com> (raw)
In-Reply-To: <20200506123112.GF8043@willie-the-truck>
Hi,
On 5/6/20 6:01 PM, Will Deacon wrote:
> On Wed, May 06, 2020 at 05:32:56PM +0530, Amit Kachhap wrote:
>> On 5/4/20 10:47 PM, Will Deacon wrote:
>>> On Mon, Apr 27, 2020 at 11:55:01AM +0530, Amit Daniel Kachhap wrote:
>>>> diff --git a/arch/arm64/include/asm/compiler.h b/arch/arm64/include/asm/compiler.h
>>>> index eece20d..32d5900 100644
>>>> --- a/arch/arm64/include/asm/compiler.h
>>>> +++ b/arch/arm64/include/asm/compiler.h
>>>> @@ -19,6 +19,9 @@
>>>> #define __builtin_return_address(val) \
>>>> (void *)(ptrauth_clear_pac((unsigned long)__builtin_return_address(val)))
>>>> +#else /* !CONFIG_ARM64_PTR_AUTH */
>>>> +#define ptrauth_user_pac_mask() 0ULL
>>>> +#define ptrauth_kernel_pac_mask() 0ULL
>>>
>>> This doesn't look quite right to me, since you still have to take into
>>> account the case where CONFIG_ARM64_PTR_AUTH=y but the feature is not
>>> available at runtime:
>>
>> Yes agree with you here. However the config gaurd is saving some extra
>> computation for __builtin_return_address. There are some compiler
>> support being added in __builtin_extract_return_address to mask the PAC.
>> Hopefully that will improve this code. In the meantime let it be like this.
>
> Does the extra computation matter? Isn't it just a couple of instructions?
ok sure. I will push v3 as you suggested.
Thanks,
Amit
>
> Will
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2020-05-06 13:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-27 6:25 [PATCH v2 1/2] arm64/crash_core: Export KERNELPACMASK in vmcoreinfo Amit Daniel Kachhap
2020-04-27 6:25 ` [PATCH v2 2/2] Documentation/vmcoreinfo: Add documentation for 'KERNELPACMASK' Amit Daniel Kachhap
2020-05-04 17:34 ` Will Deacon
2020-05-06 12:07 ` Amit Kachhap
2020-04-30 11:35 ` [PATCH v2 1/2] arm64/crash_core: Export KERNELPACMASK in vmcoreinfo Amit Kachhap
2020-04-30 11:44 ` Amit Kachhap
2020-05-04 17:17 ` Will Deacon
2020-05-06 12:02 ` Amit Kachhap
2020-05-06 12:31 ` Will Deacon
2020-05-06 13:04 ` Amit Kachhap [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=590176f0-802b-f71a-0c1e-00283808e1d8@arm.com \
--to=amit.kachhap@arm.com \
--cc=Vincenzo.Frascino@arm.com \
--cc=bhsharma@redhat.com \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=kexec@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox