lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200902191637.72307d7ec6d493a6c0678346@kernel.org>
Date:   Wed, 2 Sep 2020 19:16:37 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     peterz@...radead.org
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org, rostedt@...dmis.org,
        bristot@...hat.com, jbaron@...mai.com,
        torvalds@...ux-foundation.org, tglx@...utronix.de,
        mingo@...nel.org, namit@...are.com, hpa@...or.com, luto@...nel.org,
        ard.biesheuvel@...aro.org, jpoimboe@...hat.com,
        pbonzini@...hat.com, mathieu.desnoyers@...icios.com,
        linux@...musvillemoes.dk
Subject: Re: [PATCH v7 08/18] static_call: Avoid kprobes on inline
 static_call()s

On Wed, 2 Sep 2020 11:48:20 +0200
peterz@...radead.org wrote:

> On Wed, Sep 02, 2020 at 10:35:08AM +0900, Masami Hiramatsu wrote:
> > On Tue, 18 Aug 2020 15:57:43 +0200
> > Peter Zijlstra <peterz@...radead.org> wrote:
> > 
> > > Similar to how we disallow kprobes on any other dynamic text
> > > (ftrace/jump_label) also disallow kprobes on inline static_call()s.
> > 
> > Looks good to me. 
> > 
> > Acked-by: Masami Hiramatsu <mhiramat@...nel.org>
> > 
> > BTW, here we already have 5 subsystems which reserves texts
> > (ftrace, alternatives, jump_label, static_call and kprobes.)
> > 
> > Except for the kprobes and ftrace, we can generalize the reserved-text
> > code because those are section-based static address-areas (or lists).
> 
> Doesn't ftrace also have a section where it lists all the mcount
> locations?

Is the data format in the section same as others?

> 
> On top of that ftrace probably registers its trampolines.

Good point. I think trampolines are filtered by kernel_text() check.

> 
> Do we support adding kprobes to BPF-JIT'ed code or should we blacklist
> them too?

No, we should blacklist it, because JIT'ed code will be used in
kprobes context. In that case, I think it is better to provide
partially execute non-JIT code and interrupt the interpreter. 

Thank you,

-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ