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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B17B2C433EF for ; Fri, 1 Apr 2022 20:24:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352455AbiDAU0i (ORCPT ); Fri, 1 Apr 2022 16:26:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352624AbiDAU03 (ORCPT ); Fri, 1 Apr 2022 16:26:29 -0400 Received: from www62.your-server.de (www62.your-server.de [213.133.104.62]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD4CCDB1; Fri, 1 Apr 2022 13:22:57 -0700 (PDT) Received: from sslproxy01.your-server.de ([78.46.139.224]) by www62.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1naNnI-0005fS-ID; Fri, 01 Apr 2022 22:22:52 +0200 Received: from [85.1.206.226] (helo=linux.home) by sslproxy01.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1naNnI-000HUg-57; Fri, 01 Apr 2022 22:22:52 +0200 Subject: Re: [PATCH bpf-next] bpf, arm64: sign return address for jited code To: Xu Kuohai , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Alexei Starovoitov , Zi Shen Lim , Catalin Marinas , Will Deacon , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh References: <20220318102936.838459-1-xukuohai@huawei.com> From: Daniel Borkmann Message-ID: Date: Fri, 1 Apr 2022 22:22:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20220318102936.838459-1-xukuohai@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.103.5/26499/Fri Apr 1 10:20:48 2022) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/18/22 11:29 AM, Xu Kuohai wrote: > Sign return address for jited code when the kernel is built with pointer > authentication enabled. > > 1. Sign lr with paciasp instruction before lr is pushed to stack. Since > paciasp acts like landing pads for function entry, no need to insert > bti instruction before paciasp. > > 2. Authenticate lr with autiasp instruction after lr is poped from stack. > > Signed-off-by: Xu Kuohai This would need a rebase, but please also use the commit description to provide some more details how this inter-operates wrt BPF infra such as tail calls and BPF-2-BPF calls when we look back into this in few months from now. Thanks, Daniel