From: Peter Zijlstra <peterz@infradead.org>
To: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Jason Wessel <jason.wessel@windriver.com>,
Douglas Anderson <dianders@chromium.org>,
sumit.garg@linaro.org, pmladek@suse.com,
sergey.senozhatsky@gmail.com, will@kernel.org,
kgdb-bugreport@lists.sourceforge.net,
linux-kernel@vger.kernel.org, patches@linaro.org,
Masami Hiramatsu <mhiramat@kernel.org>
Subject: Re: [RFC PATCH 0/4] kgdb: Honour the kprobe blacklist when setting breakpoints
Date: Fri, 5 Jun 2020 16:29:53 +0200 [thread overview]
Message-ID: <20200605142953.GP2750@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20200605132130.1411255-1-daniel.thompson@linaro.org>
On Fri, Jun 05, 2020 at 02:21:26PM +0100, Daniel Thompson wrote:
> kgdb has traditionally adopted a no safety rails approach to breakpoint
> placement. If the debugger is commanded to place a breakpoint at an
> address then it will do so even if that breakpoint results in kgdb
> becoming inoperable.
>
> A stop-the-world debugger with memory peek/poke does intrinsically
> provide its operator with the means to hose their system in all manner
> of exciting ways (not least because stopping-the-world is already a DoS
> attack ;-) ) but the current no safety rail approach is not easy to
> defend, especially given kprobes provides us with plenty of machinery to
> mark parts of the kernel where breakpointing is discouraged.
>
> This patchset introduces some safety rails by using the existing
> kprobes infrastructure. It does not cover all locations where
> breakpoints can cause trouble but it will definitely block off several
> avenues, including the architecture specific parts that are handled by
> arch_within_kprobe_blacklist().
>
> This patch is an RFC because:
>
> 1. My workstation is still chugging through the compile testing.
>
> 2. Patch 4 needs more runtime testing.
>
> 3. The code to extract the kprobe blacklist code (patch 4 again) needs
> more review especially for its impact on arch specific code.
>
> To be clear I do plan to do the detailed review of the kprobe blacklist
> stuff but would like to check the direction of travel first since the
> change is already surprisingly big and maybe there's a better way to
> organise things.
Thanks for doing these patches, esp 1-3 look very good to me.
I've taken the liberty to bounce the entire set to Masami-San, who is
the kprobes maintainer for comments as well.
next prev parent reply other threads:[~2020-06-05 14:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-05 13:21 [RFC PATCH 0/4] kgdb: Honour the kprobe blacklist when setting breakpoints Daniel Thompson
2020-06-05 13:21 ` [RFC PATCH 1/4] " Daniel Thompson
2020-06-05 13:21 ` [RFC PATCH 2/4] kgdb: Use the kprobe blacklist to limit single stepping Daniel Thompson
2020-06-05 13:21 ` [RFC PATCH 3/4] kgdb: Add NOKPROBE labels on the trap handler functions Daniel Thompson
2020-06-11 12:43 ` Masami Hiramatsu
2020-06-05 13:21 ` [RFC PATCH 4/4] kprobes: Allow the kprobes blacklist to be compiled independently Daniel Thompson
2020-06-05 14:29 ` Peter Zijlstra [this message]
2020-06-05 14:44 ` [RFC PATCH 0/4] kgdb: Honour the kprobe blacklist when setting breakpoints Peter Zijlstra
2020-06-08 13:50 ` Daniel Thompson
2020-06-08 12:43 ` Daniel Thompson
2020-06-11 12:42 ` Masami Hiramatsu
2020-06-11 14:32 ` Daniel Thompson
2020-06-12 10:13 ` Masami Hiramatsu
2020-06-12 11:04 ` Daniel Thompson
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=20200605142953.GP2750@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=daniel.thompson@linaro.org \
--cc=dianders@chromium.org \
--cc=jason.wessel@windriver.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=patches@linaro.org \
--cc=pmladek@suse.com \
--cc=sergey.senozhatsky@gmail.com \
--cc=sumit.garg@linaro.org \
--cc=will@kernel.org \
/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