From: "jarkko@kernel.org" <jarkko@kernel.org>
To: "hch@lst.de" <hch@lst.de>
Cc: "ashimida@linux.alibaba.com" <ashimida@linux.alibaba.com>,
"heiko@sntech.de" <heiko@sntech.de>,
"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
"paulus@samba.org" <paulus@samba.org>,
"agordeev@linux.ibm.com" <agordeev@linux.ibm.com>,
"javierm@redhat.com" <javierm@redhat.com>,
"geert@linux-m68k.org" <geert@linux-m68k.org>,
"borntraeger@linux.ibm.com" <borntraeger@linux.ibm.com>,
"linux@roeck-us.net" <linux@roeck-us.net>,
"andrealmeid@igalia.com" <andrealmeid@igalia.com>,
"michael.roth@amd.com" <michael.roth@amd.com>,
"npiggin@gmail.com" <npiggin@gmail.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"andreyknvl@gmail.com" <andreyknvl@gmail.com>,
"ndesaulniers@google.com" <ndesaulniers@google.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"mcgrof@kernel.org" <mcgrof@kernel.org>,
"svens@linux.ibm.com" <svens@linux.ibm.com>,
"zepan@sipeed.com" <zepan@sipeed.com>,
"guoren@kernel.org" <guoren@kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
"luis.machado@linaro.org" <luis.machado@linaro.org>,
"anemo@mba.ocn.ne.jp" <anemo@mba.ocn.ne.jp>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"joey.gouly@arm.com" <joey.gouly@arm.com>,
"James.Bottomley@hansenpartnership.com"
<James.Bottomley@hansenpartnership.com>,
"song@kernel.org" <song@kernel.org>,
"linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>,
"iii@linux.ibm.com" <iii@linux.ibm.com>,
"anup@brainfault.org" <anup@brainfault.org>,
"deller@gmx.de" <deller@gmx.de>,
"Keshavamurthy, Anil S" <anil.s.keshavamurthy@intel.com>,
"mhiramat@kernel.org" <mhiramat@kernel.org>,
"thomas.lendacky@amd.com" <thomas.lendacky@amd.com>,
"gor@linux.ibm.com" <gor@linux.ibm.com>,
"philipp.tomsich@vrull.eu" <philipp.tomsich@vrull.eu>,
"dave.anglin@bell.net" <dave.anglin@bell.net>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"dja@axtens.net" <dja@axtens.net>,
"nico@fluxnic.net" <nico@fluxnic.n
Subject: Re: [PATCH] kprobes: Enable tracing for mololithic kernel images
Date: Thu, 16 Jun 2022 00:29:18 +0300 [thread overview]
Message-ID: <YqpPLqW6/AWEQhGr@iki.fi> (raw)
In-Reply-To: <20220615063707.GA22930@lst.de>
et>, "ebiederm@xmission.com" <ebiederm@xmission.com>, "aneesh.kumar@linux.ibm.com" <aneesh.kumar@linux.ibm.com>, "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>, "bristot@redhat.com" <bristot@redhat.com>, "wangkefeng.wang@huawei.com" <wangkefeng.wang@huawei.com>, "kernel@esmil.dk" <kernel@esmil.dk>, "jniethe5@gmail.com" <jniethe5@gmail.com>, "paul.walmsley@sifive.com" <paul.walmsley@sifive.com>, "ast@kernel.org" <ast@kernel.org>, "will@kernel.org" <will@kernel.org>, "masahiroy@kernel.org" <masahiroy@kernel.org>, "Sakkinen, Jarkko" <jarkko@profian.com>, "samitolvanen@google.com" <samitolvanen@google.com>, "naveen.n.rao@linux.ibm.com" <naveen.n.rao@linux.ibm.com>, "elver@google.com" <elver@google.com>, "keescook@chromium.org" <keescook@chromium.org>, "rostedt@goodmis.org" <rostedt@goodmis.org>, "nathan@kernel.org" <nathan@kernel.org>, "rmk+kernel@armlinux.org.uk" <rmk+kernel@armlinux.org.uk>, "broonie@kernel.org" <broonie@kernel.org>, "bp@alien8.de" <bp@alien8.de>, "egorenar@linux.ibm
.com" <egorenar@linux.ibm.com>, "tsbogend@alpha.franken.de" <tsbogend@alpha.franken.de>, "linux-parisc@vger.kernel.org" <linux-parisc@vger.kernel.org>, "nathaniel@profian.com" <nathaniel@profian.com>, "dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>, "davem@davemloft.net" <davem@davemloft.net>, "kirill.shutemov@linux.intel.com" <kirill.shutemov@linux.intel.com>, "huschle@linux.ibm.com" <huschle@linux.ibm.com>, "peterz@infradead.org" <peterz@infradead.org>, "hpa@zytor.com" <hpa@zytor.com>, "sparclinux@vger.kernel.org" <sparclinux@vger.kernel.org>, "yangtiezhu@loongson.cn" <yangtiezhu@loongson.cn>, "mbenes@suse.cz" <mbenes@suse.cz>, "chenzhongjin@huawei.com" <chenzhongjin@huawei.com>, "ardb@kernel.org" <ardb@kernel.org>, "x86@kernel.org" <x86@kernel.org>, "linux@armlinux.org.uk" <linux@armlinux.org.uk>, "linux-riscv@lists.infradead.org" <linux-riscv@lists.infradead.org>, "mingo@redhat.com" <mingo@redhat.com>, "atomlin@redhat.com" <atomlin@redhat.com>, "aou@eecs.berkeley.edu" <a
ou@eecs.berkeley.edu>, "hca@linux.ibm.com" <hca@linux
.ibm.com>, "liaochang1@huawei.com" <liaochang1@huawei.com>, "atishp@atishpatra.org" <atishp@atishpatra.org>, "jpoimboe@kernel.org" <jpoimboe@kernel.org>, "tmricht@linux.ibm.com" <tmricht@linux.ibm.com>, "linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>, "changbin.du@intel.com" <changbin.du@intel.com>, "palmer@dabbelt.com" <palmer@dabbelt.com>, "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>, "linux-modules@vger.kernel.org" <linux-modules@vger.kernel.org>
Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org
Sender: "Linuxppc-dev" <linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org>
On Wed, Jun 15, 2022 at 08:37:07AM +0200, hch@lst.de wrote:
> On Tue, Jun 14, 2022 at 03:32:38PM +0300, jarkko@kernel.org wrote:
> > > Like say for a next step we moved prog pack out of bpf into core code,
> > > gave it it's own copy of module_alloc(), and then made kprobes use it.
> > > Then we would have something with improved W^X guard rails, and kprobes
> > > would not depend on modules anymore. I think maybe it's a step in the
> > > right direction, even if it's not perfect.
> >
> > So you're saying that I should (as a first step) basically clone
> > module_alloc() implementation for kprobes, and future for BPF
> > use, in order to get a clean starting point?
>
> I don't think cloning the code helps anyone. The fact that except
> for the eBPF mess everyone uses module_alloc and the related
> infrastructure is a feature and not a bug. The interface should
> become better than what we have right now, but there is few enough
> users that this can be done in one go.
>
> So assuming we really care deeply enough about fancy tracing without
> modules (and I'm not sure we do, even if you don't use modules it
> doesn't hurt to just build the modules code, I do that all the time
> for my test machines), the general approach in your series is the
> right one.
OK, thanks for the elaboration!
However I bake it, I doubt that next version is going to be the final
version, given all the angles. Therefore, I mostly Christophe's
suggestions on compilation flags, and also split this into per-arch
patches.
That should be at least to the right direction.
BR, Jarkko
next prev parent reply other threads:[~2022-06-16 2:00 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-07 23:59 [PATCH] kprobes: Enable tracing for mololithic kernel images Jarkko Sakkinen
2022-06-08 2:35 ` Guo Ren
2022-06-08 5:25 ` Jarkko Sakkinen
2022-06-08 14:21 ` Masami Hiramatsu
2022-06-08 16:12 ` Song Liu
2022-06-08 18:20 ` Song Liu
2022-06-08 20:26 ` Luis Chamberlain
2022-06-09 3:48 ` Christoph Hellwig
2022-06-09 13:24 ` Luis Chamberlain
2022-06-09 18:41 ` Edgecombe, Rick P
2022-06-09 22:48 ` Song Liu
2022-06-14 12:32 ` jarkko
2022-06-15 6:37 ` hch
2022-06-15 21:29 ` jarkko [this message]
2022-06-09 8:33 ` Christophe Leroy
2022-06-09 22:23 ` Song Liu
2022-06-09 13:12 ` Jarkko Sakkinen
2022-06-09 13:23 ` Ard Biesheuvel
2022-06-12 12:18 ` Masami Hiramatsu
2022-06-12 15:59 ` Christophe Leroy
2022-06-13 0:01 ` Masami Hiramatsu
2022-06-14 10:54 ` Jarkko Sakkinen
2022-06-09 12:59 ` Jarkko Sakkinen
2022-06-08 16:27 ` Ard Biesheuvel
2022-06-08 18:19 ` Song Liu
2022-06-12 12:30 ` Masami Hiramatsu
2022-06-14 12:30 ` Jarkko Sakkinen
2022-06-09 5:37 ` Jarkko Sakkinen
2022-06-09 7:47 ` Russell King (Oracle)
2022-06-09 11:48 ` Jarkko Sakkinen
2022-06-09 13:44 ` Luis Chamberlain
2022-06-14 12:26 ` Jarkko Sakkinen
2022-06-14 12:36 ` Christophe Leroy
2022-06-15 21:24 ` Jarkko Sakkinen
2022-06-09 8:30 ` Christophe Leroy
2022-06-09 12:57 ` Jarkko Sakkinen
2022-06-09 13:42 ` Christophe Leroy
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=YqpPLqW6/AWEQhGr@iki.fi \
--to=jarkko@kernel.org \
--cc=James.Bottomley@hansenpartnership.com \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=andrealmeid@igalia.com \
--cc=andreyknvl@gmail.com \
--cc=anemo@mba.ocn.ne.jp \
--cc=anil.s.keshavamurthy@intel.com \
--cc=anup@brainfault.org \
--cc=ashimida@linux.alibaba.com \
--cc=borntraeger@linux.ibm.com \
--cc=catalin.marinas@arm.com \
--cc=dave.anglin@bell.net \
--cc=dave.hansen@linux.intel.com \
--cc=deller@gmx.de \
--cc=dja@axtens.net \
--cc=geert@linux-m68k.org \
--cc=gor@linux.ibm.com \
--cc=guoren@kernel.org \
--cc=hch@lst.de \
--cc=heiko@sntech.de \
--cc=iii@linux.ibm.com \
--cc=javierm@redhat.com \
--cc=joey.gouly@arm.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=luis.machado@linaro.org \
--cc=mark.rutland@arm.com \
--cc=mcgrof@kernel.org \
--cc=mhiramat@kernel.org \
--cc=michael.roth@amd.com \
--cc=ndesaulniers@google.com \
--cc=nico@fluxnic.n \
--cc=npiggin@gmail.com \
--cc=paulus@samba.org \
--cc=philipp.tomsich@vrull.eu \
--cc=song@kernel.org \
--cc=svens@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=zepan@sipeed.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).