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 04EC4C433F5 for ; Sat, 2 Apr 2022 15:07:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357075AbiDBPIy (ORCPT ); Sat, 2 Apr 2022 11:08:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348745AbiDBPIu (ORCPT ); Sat, 2 Apr 2022 11:08:50 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9EE1165BE; Sat, 2 Apr 2022 08:06:57 -0700 (PDT) Received: from kwepemi500013.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4KW0dg1S0BzBrgq; Sat, 2 Apr 2022 23:02:47 +0800 (CST) Received: from [10.67.111.192] (10.67.111.192) by kwepemi500013.china.huawei.com (7.221.188.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.21; Sat, 2 Apr 2022 23:06:53 +0800 Message-ID: <7845dd59-d877-e528-74f6-6c7a101b0282@huawei.com> Date: Sat, 2 Apr 2022 23:06:39 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH bpf-next] bpf, arm64: sign return address for jited code Content-Language: en-US To: Daniel Borkmann , , , , 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: Xu Kuohai In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.111.192] X-ClientProxiedBy: dggeme705-chm.china.huawei.com (10.1.199.101) To kwepemi500013.china.huawei.com (7.221.188.120) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/2/2022 4:22 AM, Daniel Borkmann wrote: > 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 > . updated in v2, thanks.