From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from CAN01-YT3-obe.outbound.protection.outlook.com (mail-yt3can01on2092.outbound.protection.outlook.com [40.107.115.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 584772E9EDB; Wed, 23 Jul 2025 15:07:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.115.92 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753283252; cv=fail; b=HvGnU4FfRHNfdUjwvGNKStuWUSPmf2k3YheNMSOhW4Z/7B+i9H6RZDT17dh/O/V5kN9yNdTMVNKngRKZm/0Xedil+X9KUHQp2rARMTyX9XPLS6ULPqoq7clCNrtHpX4NIxoSPQEBZaB3n3Mf+61KYbaSKamNPNKDg/CjMpAhI0k= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753283252; c=relaxed/simple; bh=f7aUGNsrSwcqI1z3KsTKFKZNZuNiwoMaGau6s2YjD9s=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=hAAI5jdsL7veF+IOTReUtgSkaXhI3eozlvpWnBaNklCfvE1nfpoK6elYQ9dY1/Wozm//oWay5+Io/arzOylL7mjzicgiozGegP14hLFJYY+sZpdTrekwYBxc5tZFXZYtNUSECp24uQzu8ZozrICyT4Jd0h86xh0vir7QS4ZDEEo= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com; spf=pass smtp.mailfrom=efficios.com; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b=kDJO7xSp; arc=fail smtp.client-ip=40.107.115.92 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=efficios.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="kDJO7xSp" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=LHMTp3sWWStevnyKC5RS4UH/czzh7gE8mWiStt8n56/BdhOQHDEp9ifC0Ogo13fwsQnboopDKUhpeAyWgIoRWEwIvnZ6iw9oLdMXdr0XfFKgaDtLBCpMjpADTc3tzlXQac3fZt+axZtj3aqVqp5gKk6cN6GgEhlMXtxP9pximGxBUri+/0lr3TRXOiTLGTZTifMbTQ2uqhjw2qsLaObt4nLPfydFSd1YUmftMrlkX6+8S2P52QiFKOLSpxGyo2ERWTmz51D5xK8keTmXCtwjb2n0MGnfye9/tDCW/OIlzK5bynEqqi+lLkWt5BhXwReh/hcMkIJ3fansE7QE+EntpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HSBoAhZZ21SDzPW1cvsFxs77O4tJKmn5GB+gOGIFd/4=; b=rBQAK7A7fOU98HM3u9CbuWjCaMk5kWPwJytf5TXMlD5FsdjhlQU9gsojmRulE/zwjQjvcZwNgx30+7xX8jOgF6O8nq8lhJxt/Yo3XknEZfKGY8ktyyliDxRL+aCBa3EzupmVz5HF1ttbRmCaMxWempsepHcRwFg8nO5YdLJXCOzHbhLqxU1j4l80Rx+Xhp2ge+I3R8WRhwwRlqmTe3tgwvcUI2t+p+cGHifePNRAIsRtiB5cY8nay0/VEDMomV+n+pjcGsPOoa1IHN3CLCBXy0ElquNuMYo4f9kW8LE0RUIzwc8hJ4tgNVXPUgdVqNO0RCcu/hic4ZX4i/vuhM3k3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=efficios.com; dmarc=pass action=none header.from=efficios.com; dkim=pass header.d=efficios.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HSBoAhZZ21SDzPW1cvsFxs77O4tJKmn5GB+gOGIFd/4=; b=kDJO7xSpdyJiUCkRykkc1yIQsi4Hb+Z3/SvdLZ8RTmVvhNmPZWXkucKJIciX58oGpoSvkvhI/x8PrVtsT05panat53NwN3qfNz/Z9Z9HaaCSTlnv+EembpHC/MJo0+VyH9QMCwsxu5rU8ioxV2DFpDftvUU8j3A0QTJanw3re8enaCHJlfu7RVomJBeo+u7LvbT8xoxYH13+dnDdWImE0hlRP5YHSn5xjFq8do+cEUNA8IdlAiG3V6PR6clJfxGvmjwJP+AJyTQGpfKon7Fy/6xQKLoWOBJj8RVZTqVtP4/RAGdbihj9Tk214I9lITK31FpKZ1ymwo/bg9l833JXaQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=efficios.com; Received: from YT2PR01MB9175.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:be::5) by YT2PR01MB8279.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:b2::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8964.21; Wed, 23 Jul 2025 15:07:27 +0000 Received: from YT2PR01MB9175.CANPRD01.PROD.OUTLOOK.COM ([fe80::50f1:2e3f:a5dd:5b4]) by YT2PR01MB9175.CANPRD01.PROD.OUTLOOK.COM ([fe80::50f1:2e3f:a5dd:5b4%3]) with mapi id 15.20.8964.019; Wed, 23 Jul 2025 15:07:26 +0000 Message-ID: <4c09177b-119b-43b9-8d86-09d4af93c283@efficios.com> Date: Wed, 23 Jul 2025 11:07:24 -0400 User-Agent: Mozilla Thunderbird Subject: Re: [RFC] New codectl(2) system call for sframe registration To: Indu Bhagat , Steven Rostedt , "Jose E. Marchesi" Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, bpf@vger.kernel.org, x86@kernel.org, Masami Hiramatsu , Josh Poimboeuf , Peter Zijlstra , Ingo Molnar , Jiri Olsa , Namhyung Kim , Thomas Gleixner , Andrii Nakryiko , Beau Belgrave , Jens Remus , Linus Torvalds , Andrew Morton , Jens Axboe , Florian Weimer , Sam James , Brian Robbins , Elena Zannoni References: <2fa31347-3021-4604-bec3-e5a2d57b77b5@efficios.com> <20250721145343.5d9b0f80@gandalf.local.home> <20250721171559.53ea892f@gandalf.local.home> <1c00790c-66c4-4bce-bd5f-7c67a3a121be@efficios.com> <20250722122538.6ce25ca2@batman.local.home> <87jz40hx5c.fsf@gnu.org> <20250722151759.616bd551@batman.local.home> From: Mathieu Desnoyers Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: YQBPR01CA0015.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01::23) To YT2PR01MB9175.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:be::5) Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: YT2PR01MB9175:EE_|YT2PR01MB8279:EE_ X-MS-Office365-Filtering-Correlation-Id: 3c182cf5-3133-45dd-4cfc-08ddc9faa2ba X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|7416014|376014|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?B?eXJTL0lLVTFVbmpRUWsrNFJwc2JCMEVnYUhkMWJESWdhV2U3bkJ6OG12YlFy?= =?utf-8?B?YURBa3F5cmlKWDZXbzl5a2dQaG9rZklnSzdMNU1vd1pnZ0Qwa3R6eTlHL2li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CL:1;SRV:;IPV:NLI;SFV:NSPM;H:YT2PR01MB9175.CANPRD01.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(7416014)(376014)(366016);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MDlML2tvTVdHRDQ4L2JuQkwrSmJSR3RPOHg2aHJGWlpEUEFLa3RValBpaEpM?= =?utf-8?B?bWs2VThyazQwS0IxSDdtN3NXU0hlV0xDa1BhMkRmYlBtM3U0a3NPTWVtNmVi?= =?utf-8?B?bklZY1BCUVk3MDNHdXc4T1NhSEFFcTRiaDFsVXVjbEo1dmN6M1Z6dXkzWEdv?= =?utf-8?B?a3JlRUR0aVE4OG40NTUxNGdWUmkyYitxTDlINlpjV3piZHFMOE4rMFROenFz?= =?utf-8?B?dHBmdEw4SHY2SFBkeDlHMktmUW1mVldNWTBpcXZJSzE4V3BEMktxSjZDLzNp?= =?utf-8?B?R0J1MHQ5b1V5MEtSQ0NtbldxTUFJSjNVL1U3OGhxODVmN3paUWhHbGpCQ0JP?= =?utf-8?B?TDkvU0ZOdG9lOGMyS2M0TC95MUJZK2ZtY2N6Sk1ic2V3UHh1ZklnREdqUFMz?= =?utf-8?B?K3JXdDRCWUhUYzRFMVdtajdNL3BMV0grbFJRSFFUZnYzSVpSb2pTT3NrZ1Rl?= =?utf-8?B?Q1A5ZWxaNk53YVIrZGtUcWtuWUwrSE8zODVheEVvV1N6YWlYZkVzMEl3NWpn?= =?utf-8?B?enVRaTF4WG9tMldMZW1venNGamRrSnBQQUgya3gyaURtN2NtWkcxak40OW1Y?= =?utf-8?B?eUtwYnNteXNKd1F1Wjdnb0s4TDV2Z211WUp2aDlhalo4MnQzZGxrNTQxRGtI?= =?utf-8?B?Q1lyR1M0L3B2QklCa2MzUzBsUUxDYkwyQkFzZ0VodE8yV1FVN3FySnFWSDZw?= =?utf-8?B?SlcwL09IM0d5M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Z0krS3hRRCtFZHJwUlY2MlhGQ2kra05OZ01POHMyWjQ2cDdYRjREeFZyN2sr?= =?utf-8?B?cGw2Q1FQNEx6UFJKU2EyT1JxWFlabCs4L3lIcmFZQm5PSlZETXU2UnR6S2k1?= =?utf-8?B?aWlCVHNGN1M0ZUhmakwxbFpSb05yQ3dudisxMnBvSndtOHFoN0Y4cnc4OVZy?= =?utf-8?B?Y1Y0QnRuVmdUS0w2cFF5Yk9GU3p4WTJtYmZZWFFqOTVVcnF1aVRuVmZNaTJH?= =?utf-8?B?dCtRQm11NmNvNWhsSkRQV1htVDZiWGNmdXM1RlVGbGM2TzQyeDZhdEJ5YzZ5?= =?utf-8?B?YUlFRktSeEtkT3MrenFZUlFxRzVCMkxyMUh1eTE2YVEwUWxJNFRSV2Zwemo5?= =?utf-8?B?WUFwUUxvcTVzUnljN0Zqb1VTd2tvMXdyOURGMFNicTU3eEJ6VjlmVitiUWxz?= =?utf-8?B?WkV4RXFHWHpWV0Z6VVorTWxaaVN0VWlTYnAzQjlRVUVRMXQxNlZqTk1tNjdR?= =?utf-8?B?am5maGExR25wNjltS0Z2Zk1SbHlsUjhrUU5STy94K0V1RUZPOE0yNVFzM2xt?= =?utf-8?Q?kSaFY9E4a5JWqctIc0l5XZo=3D?= X-OriginatorOrg: efficios.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3c182cf5-3133-45dd-4cfc-08ddc9faa2ba X-MS-Exchange-CrossTenant-AuthSource: YT2PR01MB9175.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jul 2025 15:07:26.7265 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4f278736-4ab6-415c-957e-1f55336bd31e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DIaFsdW6OvK3iBjo5WzUVCwVZIb1r7jDeQBS21NNrt+ycZzbny6cDGcxFE8of66H7vyMd0h6GfHUBQgd42t1yjv1218ai8n61I+m6YEa40c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: YT2PR01MB8279 On 2025-07-22 17:04, Indu Bhagat wrote: > On 7/22/25 12:17 PM, Steven Rostedt wrote: >> On Tue, 22 Jul 2025 20:56:47 +0200 >> "Jose E. Marchesi" wrote: >> >>> I think glibc could "register" loaded SFrame data by just pointing the >>> kernel to the VM address where it got loaded, "you got some SFrame >>> there".  Starting from that address it is then possible to find the >>> referred code locations just by applying the offsets, without needing >>> any additional information nor ELF foobar... >>> >>> Or thats how I understand it.  Indu will undoubtly correct me if I am >>> wrong 8-) >> >> Maybe I'm wrong, but if you know where the text is loaded (the final >> location it is in memory), it is possible to figure out the relocations >> in the sframe section. >> > > (FWIW, What Jose wrote is correct.) > > Some details which may help clear up some confusion here.  The SFrame > sections are of type SHT_GNU_SFRAME and currently have SEC_ALLOC| > SEC_LOAD flags set.  This means that they are allocated memory and > loaded at application start up time.  These sections appear in a PT_LOAD > segment in the linked binaries. > > Then there is a PT_GNU_SFRAME, which is a new program header type for > SFrame.  PT_GNU_SFRAME by itself does not trigger the loading of SFrame > sections.  But the .sframe sections being present in the PT_LOAD segment > does. > >>> >>>> In the future, if we wants to compress the sframe section, it will not >>>> even be a loadable ELF section. But the system call can tell the >>>> kernel: "there's a sframe compressed section at this offset/size in >>>> this file" for this text address range and then the kernel will do the >>>> rest. >>> >>> I think supporting compressed SFrame will probably require to do some >>> sort of relocation of the offsets in the uncompressed data, depending on >>> where the uncompressed data will get eventually loaded. >> >> Assuming that all the text is at a given offset, would that be enough >> to fill in the blanks? >> > > Yes and No.  The offset at which the text is loaded is _one_ part of the > information to "fill in the blanks".  The other part is what to do with > that information (text_vma) or how to relocate the SFrame section itself > a.k.a. the relocation entries.  To know the relocations, one will need > to get access to the respective relocation section, and hence access to > the ELF section headers. So AFAIU we have three main scenarios: 1) The dynamic loader allocates the sframe section, and possibly applies relocations before passing pointers to the start/end of that section to the kernel. 2) The dynamic loader only maps memory for the sframe section, without actually populating its content. It would register the sframe section to the kernel by providing a pathname and offset allowing the kernel to find the sframe information and populate it via the page fault handler. In that scenario, the kernel would be responsible to perform the relocations. Ideally the sframe layout would always contain offsets that are relative to the text_vma base, so the kernel could easily do the relocs. Is that the case ? 3) Variation on scenario 2: the sframe data is compressed in the file. The page fault handler is responsible to uncompress and apply relocs if need be. Am I missing something ? Thanks, Mathieu > >> As the text would have already been linked into memory before the >> system call is made. If this is not the case, then we definitely need >> the linker to load the sframe into memory before it does the system >> call, and just give the kernel that address. >> -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com