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 28967C433F5 for ; Sun, 29 May 2022 15:30:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231150AbiE2PaO (ORCPT ); Sun, 29 May 2022 11:30:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbiE2PaL (ORCPT ); Sun, 29 May 2022 11:30:11 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BD4CA3FBC4; Sun, 29 May 2022 08:30:10 -0700 (PDT) Received: from [192.168.254.32] (unknown [47.189.24.195]) by linux.microsoft.com (Postfix) with ESMTPSA id 9F1F920BA5B8; Sun, 29 May 2022 08:30:09 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9F1F920BA5B8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1653838210; bh=pdXpNwS5tSP0aX9qQcLAkwzcKjd/aClB5ao6pff2Q0I=; h=Date:Subject:To:References:From:In-Reply-To:From; b=YVWltzDq0xT0imdsQDszhe82aLx+DIJ9wUPZO0fPx/c5zvPMypEHnW+dssG+ibi8f qGNWYSYabf5K2UJUCYCe1xoq0woOn7HcRoGubaict2eIBavQLQeM8KfyvCzrY9VFSv wqygMdB/fvltIODqmhU58Be0YbwNfkt4BsYsn7l8= Message-ID: <2b8d8fbe-e596-91bf-a63b-938c9ff4140a@linux.microsoft.com> Date: Sun, 29 May 2022 10:30:08 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [RFC PATCH v2 00/20] arm64: livepatch: Use ORC for dynamic frame pointer validation Content-Language: en-US To: Chen Zhongjin , jpoimboe@redhat.com, peterz@infradead.org, mark.rutland@arm.com, broonie@kernel.org, nobuta.keiya@fujitsu.com, sjitindarsingh@gmail.com, catalin.marinas@arm.com, will@kernel.org, jamorris@linux.microsoft.com, linux-arm-kernel@lists.infradead.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220524001637.1707472-1-madvenka@linux.microsoft.com> <061a4299-114f-96e0-86a4-6ab255778498@huawei.com> From: "Madhavan T. Venkataraman" In-Reply-To: <061a4299-114f-96e0-86a4-6ab255778498@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for taking the time to review my patches. On 5/24/22 09:24, Chen Zhongjin wrote: > Hi Madvenka, > > I have a brief look at your patch and the idea that using CFA metadata to > validate FP is reasonable to me. And I found a problem when I used 'pv dump' to > check the orc value and I replied your commit 11/20 for that. > I have responded to that comment in another email. Please take a look. > I think it's not necessary that you rewrite the arm64 decoder(there is already a > decoder in my patch) and insn check(objtool check can just make it) by yourself. > This is a fair point. I will think about this a little bit and respond to this in a separate email. > For me it's also a trouble that objtool runs too much unnecessary work. I advise > that we should move some check for x86 as arch specific and refactor the cmdline > options, they doesn't turn off everything perfectly now. > So, Josh has done what you have mentioned. He has reorganized all of that code. I am working on syncing up to his changes. I will send out version 3. > Other than that I have an advise: We only use orc for reliable stacktrace and > normal FP unwind doesn't depends on it. Should we only load these data for > livepatch (or other scenario needs reliable stacktrace)? It can save the memory > and time consuming for kernel. > Yes. For ARM64, that is what I am trying to do. STACK_VALIDATION is optional and it is off by default. It needs to be turned on only if reliable stack trace is required. > That's all. And if you don't mind, can I incorporate some commit into my set? > Appreciate for it. > Please feel free to use any and all of my code. I am also looking at merging our two decoders so that there is only one decoder. I need to think about this a little bit. So, stay tuned. Thanks! Madhavan 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 13438C433F5 for ; Sun, 29 May 2022 15:31:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=i1ibZa05AMNVCMcaeJiExnxuPQi1HTp4WT/OLQkaT6Y=; b=UjS4JB4lR0GZs1 8fE/emswNEMxsF9zTYL+AhP3bebBaijRQQAL3V8VzmRksJjTsz4h1lbZ9FqOw/9temJUoaZQYEDiM 3A2gam218iVD5cTYSjwn9cadDkg9OCcjhZZiUnlfBDREm6o1EDZuTSRE54VqSiEo150T459GFdUQY QvBMxn+PUe/CNTZ+RtnNPV54h7encLX2nQVbfjBRxwHE2868gAZ81Ta7Par129mu9y0PUKQMsG3yC SzhW8VbtCNGvCMj47h1o23Kj1CFf0Xbr1/s2aEf0dB/davoVmg53LypPU3RNg3Eo6iMpOH7EM+v4W 6Y8NmaVcXFVKvhQ81r7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvKru-004Aco-Hv; Sun, 29 May 2022 15:30:14 +0000 Received: from linux.microsoft.com ([13.77.154.182]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvKrr-004Ac9-JD for linux-arm-kernel@lists.infradead.org; Sun, 29 May 2022 15:30:12 +0000 Received: from [192.168.254.32] (unknown [47.189.24.195]) by linux.microsoft.com (Postfix) with ESMTPSA id 9F1F920BA5B8; Sun, 29 May 2022 08:30:09 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9F1F920BA5B8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1653838210; bh=pdXpNwS5tSP0aX9qQcLAkwzcKjd/aClB5ao6pff2Q0I=; h=Date:Subject:To:References:From:In-Reply-To:From; b=YVWltzDq0xT0imdsQDszhe82aLx+DIJ9wUPZO0fPx/c5zvPMypEHnW+dssG+ibi8f qGNWYSYabf5K2UJUCYCe1xoq0woOn7HcRoGubaict2eIBavQLQeM8KfyvCzrY9VFSv wqygMdB/fvltIODqmhU58Be0YbwNfkt4BsYsn7l8= Message-ID: <2b8d8fbe-e596-91bf-a63b-938c9ff4140a@linux.microsoft.com> Date: Sun, 29 May 2022 10:30:08 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [RFC PATCH v2 00/20] arm64: livepatch: Use ORC for dynamic frame pointer validation Content-Language: en-US To: Chen Zhongjin , jpoimboe@redhat.com, peterz@infradead.org, mark.rutland@arm.com, broonie@kernel.org, nobuta.keiya@fujitsu.com, sjitindarsingh@gmail.com, catalin.marinas@arm.com, will@kernel.org, jamorris@linux.microsoft.com, linux-arm-kernel@lists.infradead.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220524001637.1707472-1-madvenka@linux.microsoft.com> <061a4299-114f-96e0-86a4-6ab255778498@huawei.com> From: "Madhavan T. Venkataraman" In-Reply-To: <061a4299-114f-96e0-86a4-6ab255778498@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220529_083011_728922_33F69B80 X-CRM114-Status: GOOD ( 21.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Thanks for taking the time to review my patches. On 5/24/22 09:24, Chen Zhongjin wrote: > Hi Madvenka, > > I have a brief look at your patch and the idea that using CFA metadata to > validate FP is reasonable to me. And I found a problem when I used 'pv dump' to > check the orc value and I replied your commit 11/20 for that. > I have responded to that comment in another email. Please take a look. > I think it's not necessary that you rewrite the arm64 decoder(there is already a > decoder in my patch) and insn check(objtool check can just make it) by yourself. > This is a fair point. I will think about this a little bit and respond to this in a separate email. > For me it's also a trouble that objtool runs too much unnecessary work. I advise > that we should move some check for x86 as arch specific and refactor the cmdline > options, they doesn't turn off everything perfectly now. > So, Josh has done what you have mentioned. He has reorganized all of that code. I am working on syncing up to his changes. I will send out version 3. > Other than that I have an advise: We only use orc for reliable stacktrace and > normal FP unwind doesn't depends on it. Should we only load these data for > livepatch (or other scenario needs reliable stacktrace)? It can save the memory > and time consuming for kernel. > Yes. For ARM64, that is what I am trying to do. STACK_VALIDATION is optional and it is off by default. It needs to be turned on only if reliable stack trace is required. > That's all. And if you don't mind, can I incorporate some commit into my set? > Appreciate for it. > Please feel free to use any and all of my code. I am also looking at merging our two decoders so that there is only one decoder. I need to think about this a little bit. So, stay tuned. Thanks! Madhavan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel