From: Petr Mladek <pmladek@suse.com>
To: Miguel Ojeda <ojeda@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>,
Jiri Kosina <jikos@kernel.org>, Miroslav Benes <mbenes@suse.cz>,
Joe Lawrence <joe.lawrence@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Kefeng Wang <wangkefeng.wang@huawei.com>,
Helge Deller <deller@gmx.de>, Stephen Boyd <swboyd@chromium.org>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Masahiro Yamada <masahiroy@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Changbin Du <changbin.du@intel.com>,
Nathan Chancellor <nathan@kernel.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Andi Kleen <ak@linux.intel.com>,
Kees Cook <keescook@chromium.org>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-kernel@vger.kernel.org, live-patching@vger.kernel.org,
linux-perf-users@vger.kernel.org, rust-for-linux@vger.kernel.org,
Alex Gaynor <alex.gaynor@gmail.com>,
Wedson Almeida Filho <wedsonaf@google.com>,
Gary Guo <gary@garyguo.net>, Boqun Feng <boqun.feng@gmail.com>
Subject: Re: [PATCH v1 3/3] kallsyms: increase maximum kernel symbol length to 512
Date: Fri, 6 May 2022 10:34:58 +0200 [thread overview]
Message-ID: <YnTdslR0jhUNo0lu@alley> (raw)
In-Reply-To: <20220505191704.22812-4-ojeda@kernel.org>
On Thu 2022-05-05 21:16:45, 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>(T);
>
> pub trait MyTrait {
> fn my_method() -> u32;
> }
>
> impl MyTrait for MyGenericType<MyType> {
> 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 <alex.gaynor@gmail.com>
> Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
> Co-developed-by: Wedson Almeida Filho <wedsonaf@google.com>
> Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
> Co-developed-by: Gary Guo <gary@garyguo.net>
> Signed-off-by: Gary Guo <gary@garyguo.net>
> Co-developed-by: Boqun Feng <boqun.feng@gmail.com>
> Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
I was primary interested into the livepatching code.
But the entire patch looks good:
Reviewed-by: Petr Mladek <pmladek@suse.com>
I just hope that it will not cause stack overflows
somewhere.
Best Regards,
Petr
next prev parent reply other threads:[~2022-05-06 8:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-05 19:16 [PATCH v1 0/3] kallsyms: Rust requirements Miguel Ojeda
2022-05-05 19:16 ` [PATCH v1 1/3] kallsyms: avoid hardcoding the buffer size Miguel Ojeda
2022-05-05 23:46 ` Kees Cook
2022-05-06 5:26 ` Miguel Ojeda
2022-05-06 11:19 ` James Bottomley
2022-05-06 12:58 ` Miguel Ojeda
2022-05-06 14:48 ` James Bottomley
2022-05-05 19:16 ` [PATCH v1 2/3] kallsyms: support "big" kernel symbols Miguel Ojeda
2022-05-05 23:47 ` Kees Cook
2022-05-05 19:16 ` [PATCH v1 3/3] kallsyms: increase maximum kernel symbol length to 512 Miguel Ojeda
2022-05-05 23:48 ` Kees Cook
2022-05-06 8:34 ` Petr Mladek [this message]
2022-05-06 9:45 ` Geert Stappers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YnTdslR0jhUNo0lu@alley \
--to=pmladek@suse.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=alex.gaynor@gmail.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=boqun.feng@gmail.com \
--cc=changbin.du@intel.com \
--cc=christophe.leroy@csgroup.eu \
--cc=deller@gmx.de \
--cc=gary@garyguo.net \
--cc=gustavoars@kernel.org \
--cc=jikos@kernel.org \
--cc=joe.lawrence@redhat.com \
--cc=jolsa@kernel.org \
--cc=jpoimboe@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=masahiroy@kernel.org \
--cc=mbenes@suse.cz \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=ojeda@kernel.org \
--cc=peterz@infradead.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=senozhatsky@chromium.org \
--cc=swboyd@chromium.org \
--cc=wangkefeng.wang@huawei.com \
--cc=wedsonaf@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).