Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp14290141rwb; Sun, 27 Nov 2022 21:46:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf5WyQ78wkvl61bMJ3YyFusMLxdDbDW8IYEWWgWJubUwPj2x6i25UTQOG805r5WWGtwDEEY3 X-Received: by 2002:a17:906:9153:b0:7a0:7333:8f1e with SMTP id y19-20020a170906915300b007a073338f1emr39389060ejw.493.1669614392299; Sun, 27 Nov 2022 21:46:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669614392; cv=none; d=google.com; s=arc-20160816; b=IM/7nlibLxTDF128rodKeVwEmMUDOLPBOpu7X/BhO+SF6eUTCzpHtc8JM+36SQg3Al paFwu6fPVffrqCaoKhF9ENFo2IE4D2pimVNtUiltfvR3k+puJRgfrJadr4xmR67kr08W jzarSLJt8DwsrV0njlvunNWad62uIqIbv+sAK145EcbNXXWQOzOLr3+nwHya/8i6AWgD sRTYtxKgtnYLXygU7aPogTf6ATTvvjaQJtqlQWGSqSZyJZU48PbeYolJR+VQGHOfLtOj 8XOx0RoLiy86MlvTOrJg9LEbZoBWhhSShoDMhrBtma11PGsnOuGbBwYJC4nNdtrghkdp C7SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=H1zE2v0u7Jw666HYaH0IZnXkKAiXC9cX8tI+hIdebbY=; b=PtKpjlgdBWOhYlVVWsS5oTTmKQ0NEwG1qQy6EZNUs8J3sAG7yW5sSTqhx4KmX6qvyF Mik52i4YFtsbAP6N7mumyVRdPXYewoOPgywVmozcZ+iiXr6P0EPS13988ClTkCWsCZSG 6+1G+zu/rwlxv+3y9y1YFZmoZ+nEmodL5YjiBWYq1g0mzchDZseyXtoPfbh/u6Go6gRQ Efud7KR9hedLnSgykKLHJW0SCVeAuesiw1ZFcc3OLLs0X6TtrL/qFECMsnj240dQys/L rr4AANcfpyYraiS1a60LEuvFrw0vUigNVS46Tbha/iGt1HGPxqnt+16ueY9fYa2h7w/Z R7uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NWBoPRoB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he39-20020a1709073da700b007309a570223si7892446ejc.609.2022.11.27.21.46.11; Sun, 27 Nov 2022 21:46:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NWBoPRoB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229627AbiK1Fbd (ORCPT + 85 others); Mon, 28 Nov 2022 00:31:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbiK1Fbc (ORCPT ); Mon, 28 Nov 2022 00:31:32 -0500 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 597F0FD00 for ; Sun, 27 Nov 2022 21:31:31 -0800 (PST) Received: by mail-lf1-x12e.google.com with SMTP id g12so15709462lfh.3 for ; Sun, 27 Nov 2022 21:31:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=H1zE2v0u7Jw666HYaH0IZnXkKAiXC9cX8tI+hIdebbY=; b=NWBoPRoBxoNA0uIccD1pUOR8b0TxDFC/WsmwJqaqjX6QJZY1oDc+PCJqIZaVv4KHPg 92ua2jVseAkoJP3W2SmnLw4O9wFSqYFPo4ketn138GZgMnSY6wo92Cn6wYtcQGsdRiRt iPL3uMV6nN0zrIQX0N2fFnlhYUMgRafZBb5wQ6ADdS2f1KV1nRuGZKPDVahiRvh8exR/ wHw6f9pipszPieKQ09IgCVUD0rVe/wn75VESYPOgEkL6E4t2CDL42MeLZn8AcXdEJDUb oYtrVKBeng1Dxgk7AxWA3+pMiKUinoWlZmayE6P+WQXlIUFWe37Z92eIOjP8SCpISimq N7vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=H1zE2v0u7Jw666HYaH0IZnXkKAiXC9cX8tI+hIdebbY=; b=09eDCXcMU93aOHfv1tfjAG4RM9L708YNboBmlPN6UdoKU5Q3rNuELG9NeNQ5Ml+Auj +rGcQQpyOKmDJjE+TkXUK8OKtiUjNeXBOpHVgpdKqob+3Ew2c+iE1ZTX6E6JNzrIz0Yr VN6dIoBh1rATWOtAjb0r2WiEdygeyNFkkZwpeU75C+kwhMtQDafMHCvG7SRgXb6U4F+c CtpE/PQrnQFqkGPpuIfwislewpA5UmQoaBCx2dGOfdv2g7MoyjVf/Ur6PxNDBZ8aMNov CIKeyIOFexg0vF3hGUrMipVzPk0hBsfgeapeB9zG33FkpASIUv7jBfuleMEu8HhMiigJ Rctw== X-Gm-Message-State: ANoB5pmes2uzLmKr1iYaPvtQoRNwl1jTvqGzW21nNAmM4YCdV5JKQBmh FOkXi4GRhHR7IuF/XFeQfQej+aeYoX65Tt+zEacchVWtnJI= X-Received: by 2002:a05:6512:3603:b0:4b4:b5d8:880d with SMTP id f3-20020a056512360300b004b4b5d8880dmr15252103lfs.121.1669613489430; Sun, 27 Nov 2022 21:31:29 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Yun Levi Date: Mon, 28 Nov 2022 14:31:17 +0900 Message-ID: Subject: Re: [Question] About UNWIND_HINT_ENTRY on entry_SYSCALL_64. To: Peter Zijlstra Cc: Linux Kernel Mailing List , jpoimboe@kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks Peter and Sorry for the late answer. I got the same result on the vmlinux.o file when I compiled the recent version. But when I try to test on some of distribution version of linux, (ex) debian. and When I try to on vmlinux not on vmlinux.o I got some different results like below. $ readelf -Ws /usr/lib/debug/boot/vmlinux-5.18.0-0.deb11.4-amd64 | grep entry_SYSCALL_64 123448: ffffffff81a00000 404 NOTYPE GLOBAL DEFAULT 1 entry_SYSCALL_64 $ readelf -WS /usr/lib/debug/boot/vmlinux-5.18.0-0.deb11.4-amd64 | grep "\[1\]" [ 1] .text PROGBITS ffffffff81000000 200000 c01988 00 AX 0 0 4096 123448: ffffffff81a00000 404 NOTYPE GLOBAL DEFAULT 1 entry_SYSCALL_64 123448: ffffffff81a00000 404 NOTYPE GLOBAL DEFAULT 1 entry_SYSCALL_64 $ tools/objtool/objtool --dump=orc /usr/lib/debug/boot/vmlinux-5.18.0-0.deb11.4-amd64 | grep "text+a00000" .text+a00000: sp:(und) bp:(und) type:call end:0 Am I wrong? Thanks! On Fri, Nov 25, 2022 at 10:06 PM Peter Zijlstra wrote: > > On Fri, Nov 25, 2022 at 07:41:46PM +0900, Yun Levi wrote: > > Hello. > > > > While I try to see the information related to ORC in vmlinux, > > I'm trying to find out ORC information related to entry_SYSCALL_64's address. > > > > For this, I've tried to take the following step: > > 1. booting the kernel with the "nokaslr" option. > > 2. Getting ORC information by "objdump orc dump vmlinux" > > 3. cat /proc/kallsyms and check the address of "entry_SYSCALL_64" > > - In my kernel, It's address .text + a00000 > > 4. Find out related ORC entry gotten in step 2. > > > > But, I couldn't find the reason why entry_SYSCALL_64's orc info isn't > > encoded with end =1. > > Instead, It was encoded as INVALID ORC entry like: > > > > .text+a00000: sp:(und) bp:(und) type:call end:0 > > > > IIUC, Some of the code is started with UNWIND_HINT_ENTRY or UNWIND_HINT_EMPTY, > > it should be encoded with end = 1. But it doesn't. > > > > Am I wrong? > > $ readelf -Ws defconfig-build/vmlinux.o | grep entry_SYSCALL_64 > 178466: 0000000000000029 0 NOTYPE GLOBAL DEFAULT 18 entry_SYSCALL_64_safe_stack > 188596: 0000000000000000 422 NOTYPE GLOBAL DEFAULT 18 entry_SYSCALL_64 > 210374: 0000000000000038 0 NOTYPE GLOBAL DEFAULT 18 entry_SYSCALL_64_after_hwframe > > $ readelf -WS defconfig-build/vmlinux.o | grep "\[18\]" > [18] .entry.text PROGBITS 0000000000000000 e59f00 001838 00 AX 0 0 64 > > $ tools/objtool/objtool --dump=orc defconfig-build/vmlinux.o | grep ".entry.text+0" > .entry.text+0: sp:(und) bp:(und) type:call end:1 > >