linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "hch@lst.de" <hch@lst.de>
To: "jarkko@kernel.org" <jarkko@kernel.org>
Cc: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>,
	"hch@lst.de" <hch@lst.de>,
	"christophe.leroy@csgroup.eu" <christophe.leroy@csgroup.eu>,
	"mcgrof@kernel.org" <mcgrof@kernel.org>,
	"svens@linux.ibm.com" <svens@linux.ibm.com>,
	"palmer@dabbelt.com" <palmer@dabbelt.com>,
	"jpoimboe@kernel.org" <jpoimboe@kernel.org>,
	"paulus@samba.org" <paulus@samba.org>,
	"zepan@sipeed.com" <zepan@sipeed.com>,
	"iii@linux.ibm.com" <iii@linux.ibm.com>,
	"deller@gmx.de" <deller@gmx.de>,
	"aou@eecs.berkeley.edu" <aou@eecs.berkeley.edu>,
	"joey.gouly@arm.com" <joey.gouly@arm.com>,
	"anemo@mba.ocn.ne.jp" <anemo@mba.ocn.ne.jp>,
	"egorenar@linux.ibm.com" <egorenar@linux.ibm.com>,
	"ast@kernel.org" <ast@kernel.org>,
	"ardb@kernel.org" <ardb@kernel.org>,
	"mpe@ellerman.id.au" <mpe@ellerman.id.au>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
	"npiggin@gmail.com" <npiggin@gmail.com>,
	"thomas.lendacky@amd.com" <thomas.lendacky@amd.com>,
	"bp@alien8.de" <bp@alien8.de>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"x86@kernel.org" <x86@kernel.org>,
	"luis.machado@linaro.org" <luis.machado@linaro.org>,
	"ebiederm@xmission.com" <ebiederm@xmission.com>,
	"mbenes@suse.cz" <mbenes@suse.cz>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"jniethe5@gmail.com" <jniethe5@gmail.com>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
	"paul.walmsley@sifive.com" <paul.walmsley@sifive.com>,
	"andreyknvl@gmail.com" <andreyknvl@gmail.com>,
	"dja@axtens.net" <dja@axtens.net>,
	"liaochang1@huawei.com" <liaochang1@huawei.com>,
	"linux-modules@vger.kernel.org" <linux-modules@vger.kernel.org>,
	"huschle@linux.ibm.com" <huschle@linux.ibm.com>,
	"will@kernel.org" <will@kernel.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"James.Bottomley@hansenpartnership.com" 
	<James.Bottomley@hansenpartnership.com>,
	"song@kernel.org" <song@kernel.org>,
	"guoren@kernel.org" <guoren@kernel.org>,
	"nathan@kernel.org" <nathan@kernel.org>,
	"dave.anglin@bell.net" <dave.anglin@bell.net>,
	"rostedt@goodmis.org" <rostedt@goodmis.org>,
	"atomlin@redhat.com" <atomlin@redhat.com>,
	"bristot@redhat.com" <bristot@redhat.com>,
	"naveen.n.rao@linux.ibm.com" <naveen.n.rao@linux.ibm.com>,
	"anup@brainfault.org" <anup@brainfault.org>,
	"javierm@redhat.com" <javierm@redhat.com>,
	"linux@roeck-us.net" <linux@roeck-us.net>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"philipp.tomsich@vrull.eu" <philipp.tomsich@vrull.eu>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"ndesaulniers@google.com" <ndesaulniers@google.com>,
	"samitolvanen@google.com" <samitolvanen@google.com>,
	"yangtiezhu@loongson.cn" <yangtiezhu@loongson.cn>,
	"aneesh.kumar@linux.ibm.com" <aneesh.kumar@linux.ibm.com>,
	"geert@linux-m68k.org" <geert@linux-m68k.org>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"heiko@sntech.de" <heiko@sntech.de>,
	"nathaniel@profian.com" <nathaniel@profian.com>,
	"michael.roth@amd.com" <michael.roth@amd.com>,
	"rmk+kernel@armlinux.org.uk" <rmk+kernel@armlinux.org.uk>,
	"Sakkinen, Jarkko" <jarkko@profian.com>,
	"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
	"borntraeger@linux.ibm.com" <borntraeger@linux.ibm.com>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"wangkefeng.wang@huawei.com" <wangkefeng.wang@huawei.com>,
	"tmricht@linux.ibm.com" <tmricht@linux.ibm.com>,
	"hca@linux.ibm.com" <hca@linux.ibm.com>,
	"linux-parisc@vger.kernel.org" <linux-parisc@vger.kernel.org>,
	"gor@linux.ibm.com" <gor@linux.ibm.com>,
	"atishp@atishpatra.org" <atishp@atishpatra.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"kirill.shutemov@linux.intel.com"
	<kirill.shutemov@linux.intel.com>,
	"sparclinux@vger.kernel.org" <sparclinux@vger.kernel.org>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"tsbogend@alpha.franken.de" <tsbogend@alpha.franken.de>,
	"nico@fluxnic.net" <nico@fluxnic.net>,
	"masahiroy@kernel.org" <masahiroy@kernel.org>,
	"agordeev@linux.ibm.com" <agordeev@linux.ibm.com>,
	"kernel@esmil.dk" <kernel@esmil.dk>,
	"ashimida@linux.alibaba.com" <ashimida@linux.alibaba.com>,
	"elver@google.com" <elver@google.com>,
	"keescook@chromium.org" <keescook@chromium.org>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"mhiramat@kernel.org" <mhiramat@kernel.org>,
	"Keshavamurthy, Anil S" <anil.s.keshavamurthy@intel.com>,
	"linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>,
	"chenzhongjin@huawei.com" <chenzhongjin@huawei.com>,
	"andrealmeid@igalia.com" <andrealmeid@igalia.com>,
	"changbin.du@intel.com" <changbin.du@intel.com>,
	"benh@kernel.crashing.org" <benh@kernel.crashing.org>,
	"linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>
Subject: Re: [PATCH] kprobes: Enable tracing for mololithic kernel images
Date: Wed, 15 Jun 2022 08:37:07 +0200	[thread overview]
Message-ID: <20220615063707.GA22930@lst.de> (raw)
In-Reply-To: <Yqh/5nn0AhdwaCm8@iki.fi>

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.

  reply	other threads:[~2022-06-15  6:37 UTC|newest]

Thread overview: 31+ 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 [this message]
2022-06-15 21:29                       ` jarkko
2022-06-09 13:12         ` Jarkko Sakkinen
2022-06-09 13:23           ` Ard Biesheuvel
2022-06-12 12:18             ` Masami Hiramatsu
2022-06-14 10:54             ` Jarkko Sakkinen
     [not found]         ` <f7ff2a8d-4128-dac9-9768-1d98bfb06a06@csgroup.eu>
2022-06-09 22:23           ` Song Liu
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
     [not found]       ` <144b7e90-5d75-7e2c-4e54-8a73f914dfdf@csgroup.eu>
2022-06-15 21:24         ` Jarkko Sakkinen
     [not found] ` <f2030fb4-4978-068b-6250-5bd5b2746675@csgroup.eu>
2022-06-09 12:57   ` Jarkko Sakkinen

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=20220615063707.GA22930@lst.de \
    --to=hch@lst.de \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=agordeev@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=andrealmeid@igalia.com \
    --cc=andreyknvl@gmail.com \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=anup@brainfault.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=ardb@kernel.org \
    --cc=ashimida@linux.alibaba.com \
    --cc=ast@kernel.org \
    --cc=atishp@atishpatra.org \
    --cc=atomlin@redhat.com \
    --cc=benh@kernel.crashing.org \
    --cc=borntraeger@linux.ibm.com \
    --cc=bp@alien8.de \
    --cc=bristot@redhat.com \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=changbin.du@intel.com \
    --cc=chenzhongjin@huawei.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=dave.anglin@bell.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=deller@gmx.de \
    --cc=dja@axtens.net \
    --cc=dmitry.torokhov@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=egorenar@linux.ibm.com \
    --cc=elver@google.com \
    --cc=geert@linux-m68k.org \
    --cc=gor@linux.ibm.com \
    --cc=guoren@kernel.org \
    --cc=hca@linux.ibm.com \
    --cc=heiko@sntech.de \
    --cc=hpa@zytor.com \
    --cc=huschle@linux.ibm.com \
    --cc=iii@linux.ibm.com \
    --cc=jarkko@kernel.org \
    --cc=jarkko@profian.com \
    --cc=javierm@redhat.com \
    --cc=jniethe5@gmail.com \
    --cc=joey.gouly@arm.com \
    --cc=jpoimboe@kernel.org \
    --cc=keescook@chromium.org \
    --cc=kernel@esmil.dk \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=liaochang1@huawei.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linux@roeck-us.net \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=luis.machado@linaro.org \
    --cc=mark.rutland@arm.com \
    --cc=masahiroy@kernel.org \
    --cc=mbenes@suse.cz \
    --cc=mcgrof@kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=michael.roth@amd.com \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=nathan@kernel.org \
    --cc=nathaniel@profian.com \
    --cc=naveen.n.rao@linux.ibm.com \
    --cc=ndesaulniers@google.com \
    --cc=nico@fluxnic.net \
    --cc=npiggin@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=philipp.tomsich@vrull.eu \
    --cc=rick.p.edgecombe@intel.com \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=rostedt@goodmis.org \
    --cc=samitolvanen@google.com \
    --cc=song@kernel.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=svens@linux.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=tmricht@linux.ibm.com \
    --cc=tsbogend@alpha.franken.de \
    --cc=wangkefeng.wang@huawei.com \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    --cc=yangtiezhu@loongson.cn \
    --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).