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 9561FC433EF for ; Tue, 24 May 2022 14:29:00 +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=/zcinKcE698F5PXRnYuch2Yj1iIMS8b70C5sy/59aZA=; b=dU0qS3x6I7uyQx Q1qtwvyJ+8eGW/KNneAg6p4WPuR/NAIweCJVC+6oFgwzJvse8D9VIeYQhzYlUARiwhMxCr+bhZLgU JuPIT9gPQBYn6BSUyeBfPWLfcw8Uv/fMssXymaQJj07wkGfY8F54w9WtOvnbWQF2CyRHyFw/+idwV egMlTI4QDdY3xMSIHEod4qcTe/iMLwX85aMO/QPwbcHLojv187Ozgh4ld5vYJXJLVe1FUnvxQ5C+r MFmJ6JvGpe4/uVk6FjGdWadMngK48Xpp55a6A8ZMGz213mi3PaKkQz7Koy6OlYsMpqQRcqU/Sy3Qp hMgi0ytOmfecPAjrXOrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ntVVn-008FPO-DH; Tue, 24 May 2022 14:27:51 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ntVVk-008FOj-2M for linux-arm-kernel@lists.infradead.org; Tue, 24 May 2022 14:27:49 +0000 Received: from dggpemm500021.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4L6xN63gKdzjX1H; Tue, 24 May 2022 22:26:46 +0800 (CST) Received: from dggpemm500013.china.huawei.com (7.185.36.172) by dggpemm500021.china.huawei.com (7.185.36.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 24 May 2022 22:27:44 +0800 Received: from [127.0.0.1] (10.67.108.67) by dggpemm500013.china.huawei.com (7.185.36.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 24 May 2022 22:27:44 +0800 Message-ID: Date: Tue, 24 May 2022 22:27:44 +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: [RFC PATCH v2 05/20] objtool: Reorganize ORC types Content-Language: en-US To: , , , , , , , , , , , , References: <20220524001637.1707472-1-madvenka@linux.microsoft.com> <20220524001637.1707472-6-madvenka@linux.microsoft.com> From: Chen Zhongjin In-Reply-To: <20220524001637.1707472-6-madvenka@linux.microsoft.com> X-Originating-IP: [10.67.108.67] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500013.china.huawei.com (7.185.36.172) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220524_072748_360486_BA483A1F X-CRM114-Status: GOOD ( 15.99 ) 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 On 2022/5/24 8:16, madvenka@linux.microsoft.com wrote: > From: "Madhavan T. Venkataraman" > > The ORC code needs to be reorganized into arch-specific and generic parts > so that architectures other than X86 can use the generic parts. > > orc_types.h contains the following ORC definitions shared between objtool > and the kernel: > > - ORC register definitions which are arch-specific. > - orc_entry structure which is generic. ... > diff --git a/include/linux/orc_entry.h b/include/linux/orc_entry.h > new file mode 100644 > index 000000000000..3d49e3b9dabe > --- /dev/null > +++ b/include/linux/orc_entry.h > @@ -0,0 +1,39 @@ > +/* SPDX-License-Identifier: GPL-2.0-or-later */ > +/* > + * Copyright (C) 2017 Josh Poimboeuf > + */ > + > +#ifndef _ORC_ENTRY_H > +#define _ORC_ENTRY_H > + > +#ifndef __ASSEMBLY__ > +#include > + > +/* > + * This struct is more or less a vastly simplified version of the DWARF Call > + * Frame Information standard. It contains only the necessary parts of DWARF > + * CFI, simplified for ease of access by the in-kernel unwinder. It tells the > + * unwinder how to find the previous SP and BP (and sometimes entry regs) on > + * the stack for a given code address. Each instance of the struct corresponds > + * to one or more code locations. > + */ > +struct orc_entry { > + s16 sp_offset; > + s16 fp_offset; > +#if defined(__LITTLE_ENDIAN_BITFIELD) > + unsigned sp_reg:4; > + unsigned fp_reg:4; Are sp_reg & fp_reg & end needed? I noticed that they are not used in reliability checking. > + unsigned type:3; > + unsigned end:1; > +#elif defined(__BIG_ENDIAN_BITFIELD) > + unsigned fp_reg:4; > + unsigned sp_reg:4; > + unsigned unused:4; > + unsigned end:1; > + unsigned type:3; > +#endif > +} __packed; > + > +#endif /* __ASSEMBLY__ */ > + > +#endif /* _ORC_ENTRY_H */ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel