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 6EF30C433F5 for ; Tue, 22 Feb 2022 08:19:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229735AbiBVITp (ORCPT ); Tue, 22 Feb 2022 03:19:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229730AbiBVITo (ORCPT ); Tue, 22 Feb 2022 03:19:44 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BC18154706; Tue, 22 Feb 2022 00:19:19 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 9BF2221112; Tue, 22 Feb 2022 08:19:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1645517957; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Djpi2wqg5KZNuxo5tXaJwLf7ivkdFtpr27BC3EwWuGg=; b=UWKGI6yvKyZY26UvlDfM3wsvaAujuAK4TrF9o82hgRQEUaCpds/6xAs2YERbuyn9gK2gLl XLf9Wp96tvXbWlRb/D3YJEx/Ty7WRlSl1aYE8SG8+9NbMhEDRk8cSDIqc1QVl+IyV2/M1x trWI3sEP0GWo5DTyAk4usGMG58quqKA= Received: from suse.cz (unknown [10.100.224.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 65AEAA3B84; Tue, 22 Feb 2022 08:19:17 +0000 (UTC) Date: Tue, 22 Feb 2022 09:19:14 +0100 From: Petr Mladek To: Miguel Ojeda Cc: Linus Torvalds , Greg Kroah-Hartman , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Alex Gaynor , Wedson Almeida Filho , Gary Guo , Boqun Feng , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Joe Lawrence , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , live-patching@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH v4 02/20] kallsyms: increase maximum kernel symbol length to 512 Message-ID: References: <20220212130410.6901-1-ojeda@kernel.org> <20220212130410.6901-3-ojeda@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220212130410.6901-3-ojeda@kernel.org> Precedence: bulk List-ID: X-Mailing-List: rust-for-linux@vger.kernel.org On Sat 2022-02-12 14:03:28, Miguel Ojeda wrote: > Rust symbols can become quite long due to namespacing introduced > by modules, types, traits, generics, etc. For instance, > the following code: > > pub mod my_module { > pub struct MyType; > pub struct MyGenericType(T); > > pub trait MyTrait { > fn my_method() -> u32; > } > > impl MyTrait for MyGenericType { > fn my_method() -> u32 { > 42 > } > } > } > > generates a symbol of length 96 when using the upcoming v0 mangling scheme: > > _RNvXNtCshGpAVYOtgW1_7example9my_moduleINtB2_13MyGenericTypeNtB2_6MyTypeENtB2_7MyTrait9my_method > > At the moment, Rust symbols may reach up to 300 in length. > Setting 512 as the maximum seems like a reasonable choice to > keep some headroom. > > Co-developed-by: Alex Gaynor > Signed-off-by: Alex Gaynor > Co-developed-by: Wedson Almeida Filho > Signed-off-by: Wedson Almeida Filho > Co-developed-by: Gary Guo > Signed-off-by: Gary Guo > Co-developed-by: Boqun Feng > Signed-off-by: Boqun Feng > Signed-off-by: Miguel Ojeda The livepatch selftest still pass. Feel free to add: Tested-by: Petr Mladek # livepatch Acked-by: Petr Mladek # livepatch Best Regards, Petr