Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1068083rwb; Tue, 27 Sep 2022 08:03:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4kG0fRCBOOyNNNbG084EdVOn802yDY11d4yT7//1pjLDPWV5nS74JUQCXv3HZzXk5GziFo X-Received: by 2002:a17:906:6a25:b0:782:1ce3:7e94 with SMTP id qw37-20020a1709066a2500b007821ce37e94mr22903367ejc.507.1664291019818; Tue, 27 Sep 2022 08:03:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664291019; cv=none; d=google.com; s=arc-20160816; b=mBQyci6gcvJpVMJTyPVr9VoaDROz1yo9x7lp2DRINLkUAHTd1d1VLTiypUlHcCNIIq vHrhw8fqROsG8lOCmdOH9dGdxprL6KCezIkL4F1JDQJsHFCW+ms4BtKx3fn0vKXR8ATb xrPK5s8/v86WITtM2Zt9rUaWsr1xWJqHt8FHxmBLmQucXNslbzsmm9QZ7FvQL2czl9Bm 9GHv2NqX7F0XwbOknNzABbJMSuPVcBfcAVfWmbwOVHbooTSTe7AjcMJK1JJleR/oRq0m +o/CYKMO7hpS/aeWHkyd2e91cmSkxKbEo1UmqfOsjhmwjx/0Uh0YaWjEBPky6DT2quTC aYUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mVs0Dxz0ym/WYyH2e2S3hJWVvdLsOFFTGLxt2hi7rYQ=; b=Uuvl9mUyCQ13thiiy7i4JY8vAm5RNytDpC0PZLzXVdfTdGsRaa8XZx6SsPkl2Mzw8r Jh89ALMYGgTsh72asE1zsUxPHS/2sVTaG9kjraJVXhR6v3sLgO4CnFzeH2/0rr8BDQKB rqVBXiftoGfrGedtf6jVDZ3GdvRuXikX/mMkcZJFcBBuNfbc85ogPckkN9cEaLgTAN2J ByrrnNN1o24XefC5gTnOG6d4fb30kuLAcSVA/6CBmjIk2nzAuZK8aHdogNqd5WJxvws7 xFMBNtHUjVx77hAurkGiWER0dcx05QhB7o9iCCgOsNLsZja/Yvy1FVESMUplHdyujX0x 5JYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kesYukV+; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id co17-20020a0564020c1100b0044880feac6csi1843925edb.163.2022.09.27.08.03.13; Tue, 27 Sep 2022 08:03:39 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=kesYukV+; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231509AbiI0O5P (ORCPT + 99 others); Tue, 27 Sep 2022 10:57:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231221AbiI0O4q (ORCPT ); Tue, 27 Sep 2022 10:56:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1691F49; Tue, 27 Sep 2022 07:56:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7C7FF619FF; Tue, 27 Sep 2022 14:56:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66E8DC433D6; Tue, 27 Sep 2022 14:56:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664290571; bh=Qk0G/WZDcN4dxcPpiCPen6zY2HKM55TAGgtnQZvZuMs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kesYukV+JBTN/u2lya1V3baZinP/iQcxgujh4O9bleZt7H6tANJtmTPV2ZZ6B7+l3 1QuECVkV8T2qteCdXOmLDkjN5nI7CGOYGV+sAjF6Lw4o/4I9We97/5GGQiCHaMN1xf 0wfkAzvUAX4sXPJ5KC2hknKlp9wq1EKj32/Rn5FI= Date: Tue, 27 Sep 2022 16:56:09 +0200 From: Greg Kroah-Hartman To: Miguel Ojeda Cc: Linus Torvalds , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, patches@lists.linux.dev, Jarkko Sakkinen , Kees Cook , Petr Mladek , 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 v10 05/27] kallsyms: increase maximum kernel symbol length to 512 Message-ID: References: <20220927131518.30000-1-ojeda@kernel.org> <20220927131518.30000-6-ojeda@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220927131518.30000-6-ojeda@kernel.org> X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 On Tue, Sep 27, 2022 at 03:14:36PM +0200, 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. > > Reviewed-by: Kees Cook > Reviewed-by: Petr Mladek > 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 > --- > include/linux/kallsyms.h | 2 +- > kernel/livepatch/core.c | 4 ++-- > scripts/kallsyms.c | 4 ++-- > tools/include/linux/kallsyms.h | 2 +- > tools/lib/perf/include/perf/event.h | 2 +- > tools/lib/symbol/kallsyms.h | 2 +- > 6 files changed, 8 insertions(+), 8 deletions(-) Reviewed-by: Greg Kroah-Hartman