linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC v2 00/10] kdb: Kiosk (reduced capabilities) mode
@ 2014-04-02 15:43 Daniel Thompson
  2014-04-02 15:43 ` [RFC v2 01/10] sysrq: Implement __handle_sysrq_nolock to avoid recursive locking in kdb Daniel Thompson
                   ` (10 more replies)
  0 siblings, 11 replies; 76+ messages in thread
From: Daniel Thompson @ 2014-04-02 15:43 UTC (permalink / raw)
  To: kgdb-bugreport, Jason Wessel
  Cc: patches, linaro-kernel, Daniel Thompson, linux-kernel,
	Greg Kroah-Hartman, Jiri Slaby, Steven Rostedt,
	Frederic Weisbecker, Ingo Molnar, John Stultz, Anton Vorontsov,
	Colin Cross, kernel-team

This patchset implements "kiosk" mode for KDB debugger and is a 
continuation of previous work by Anton Vorontsov (dating back to late
2012).

When kiosk mode is engaged several kdb commands become disabled leaving
only status reporting functions working normally. In particular arbitrary
memory read/write is prevented and it is no longer possible to alter
program flow.

Note that the commands that remain enabled are sufficient to run the
post-mortem macro commands, dumpcommon, dumpall and dumpcpu. One of the
motivating use-cases for this work is to realize post-mortem on embedded
devices (such as phones) without allowing the debug facility to be easily
exploited to compromise user privacy. In principle this means the feature
can be enabled on production devices.

There are a few patches, some are just cleanups, some are churn-ish
cleanups, but inevitable. And the rest implements the mode -- after all
the preparations, everything is pretty straightforward. The first patch
is actually a pure bug fix (arguably unrelated to kiosk mode) but
collides with the kiosk code to honour the sysrq mask so I have included
it here.

Changes since v1 (circa 2012):

 * ef (Display exception frame) is essentially an overly complex peek
   and has therefore been marked unsafe
 * bt (Stack traceback) has been marked safe only with no arguments
 * sr (Magic SysRq key) honours the sysrq mask when called in kiosk
   mode
 * Fixed over-zealous blocking of macro commands
 * Symbol lookup is forbidden by kdbgetaddrarg (more robust, better 
   error reporting to user)
 * Fix deadlock in sr (Magic SysRq key)
 * Better help text in kiosk mode
 * Default (kiosk on/off) can be changed From the config file.

Anton Vorontsov (7):
  kdb: Remove currently unused kdbtab_t->cmd_flags
  kdb: Rename kdb_repeat_t to kdb_cmdflags_t, cmd_repeat to cmd_flags
  kdb: Rename kdb_register_repeat() to kdb_register_flags()
  kdb: Use KDB_REPEAT_* values as flags
  kdb: Remove KDB_REPEAT_NONE flag
  kdb: Mark safe commands as KDB_SAFE and KDB_SAFE_NO_ARGS
  kdb: Add kiosk mode

Daniel Thompson (3):
  sysrq: Implement __handle_sysrq_nolock to avoid recursive locking in
    kdb
  kdb: Improve usability of help text when running in kiosk mode
  kdb: Allow access to sensitive commands to be restricted by default

 drivers/tty/sysrq.c            |  11 ++-
 include/linux/kdb.h            |  20 ++--
 include/linux/sysrq.h          |   1 +
 kernel/debug/kdb/kdb_bp.c      |  22 ++---
 kernel/debug/kdb/kdb_main.c    | 207 +++++++++++++++++++++++------------------
 kernel/debug/kdb/kdb_private.h |   3 +-
 kernel/trace/trace_kdb.c       |   4 +-
 lib/Kconfig.kgdb               |  21 +++++
 8 files changed, 172 insertions(+), 117 deletions(-)

-- 
1.9.0


^ permalink raw reply	[flat|nested] 76+ messages in thread

end of thread, other threads:[~2015-01-07 16:46 UTC | newest]

Thread overview: 76+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-02 15:43 [RFC v2 00/10] kdb: Kiosk (reduced capabilities) mode Daniel Thompson
2014-04-02 15:43 ` [RFC v2 01/10] sysrq: Implement __handle_sysrq_nolock to avoid recursive locking in kdb Daniel Thompson
2014-04-02 15:43 ` [RFC v2 02/10] kdb: Remove currently unused kdbtab_t->cmd_flags Daniel Thompson
2014-04-02 15:43 ` [RFC v2 03/10] kdb: Rename kdb_repeat_t to kdb_cmdflags_t, cmd_repeat to cmd_flags Daniel Thompson
2014-04-02 15:43 ` [RFC v2 04/10] kdb: Rename kdb_register_repeat() to kdb_register_flags() Daniel Thompson
2014-04-02 15:43 ` [RFC v2 05/10] kdb: Use KDB_REPEAT_* values as flags Daniel Thompson
2014-04-02 15:43 ` [RFC v2 06/10] kdb: Remove KDB_REPEAT_NONE flag Daniel Thompson
2014-04-02 15:43 ` [RFC v2 07/10] kdb: Mark safe commands as KDB_SAFE and KDB_SAFE_NO_ARGS Daniel Thompson
2014-04-02 15:43 ` [RFC v2 08/10] kdb: Add kiosk mode Daniel Thompson
2014-04-02 15:43 ` [RFC v2 09/10] kdb: Improve usability of help text when running in " Daniel Thompson
2014-04-02 15:44 ` [RFC v2 10/10] kdb: Allow access to sensitive commands to be restricted by default Daniel Thompson
2014-04-25 16:29 ` [RFC v3 0/9] kdb: Allow selective reduction in capabilities (was "kiosk mode") Daniel Thompson
2014-04-25 16:29   ` [RFC v3 1/9] sysrq: Implement __handle_sysrq_nolock to avoid recursive locking in kdb Daniel Thompson
2014-04-25 16:45     ` Steven Rostedt
2014-04-28 10:24       ` Daniel Thompson
2014-04-28 17:44         ` Colin Cross
2014-04-28 20:12           ` Daniel Thompson
2014-04-29  8:59           ` Daniel Thompson
2014-04-29 16:33             ` Colin Cross
2014-04-25 16:29   ` [RFC v3 2/9] kdb: Remove currently unused kdbtab_t->cmd_flags Daniel Thompson
2014-04-25 16:29   ` [RFC v3 3/9] kdb: Rename kdb_repeat_t to kdb_cmdflags_t, cmd_repeat to cmd_flags Daniel Thompson
2014-04-25 16:29   ` [RFC v3 4/9] kdb: Rename kdb_register_repeat() to kdb_register_flags() Daniel Thompson
2014-04-25 16:29   ` [RFC v3 5/9] kdb: Use KDB_REPEAT_* values as flags Daniel Thompson
2014-04-25 16:29   ` [RFC v3 6/9] kdb: Remove KDB_REPEAT_NONE flag Daniel Thompson
2014-04-25 16:29   ` [RFC v3 7/9] kdb: Categorize kdb commands (similar to SysRq categorization) Daniel Thompson
2014-04-25 16:57     ` Steven Rostedt
2014-04-28 10:30       ` Daniel Thompson
2014-04-25 16:29   ` [RFC v3 8/9] kdb: Add enable mask for groups of commands Daniel Thompson
2014-04-25 16:29   ` [RFC v3 9/9] kdb: Allow access to sensitive commands to be restricted by default Daniel Thompson
2014-05-06 13:03   ` [PATCH v4 0/9] kdb: Allow selective reduction in capabilities (was "kiosk mode") Daniel Thompson
2014-05-06 13:03     ` [PATCH v4 1/9] sysrq: Implement __handle_sysrq_nolock to avoid recursive locking in kdb Daniel Thompson
2014-05-06 13:03     ` [PATCH v4 2/9] kdb: Remove currently unused kdbtab_t->cmd_flags Daniel Thompson
2014-05-06 13:03     ` [PATCH v4 3/9] kdb: Rename kdb_repeat_t to kdb_cmdflags_t, cmd_repeat to cmd_flags Daniel Thompson
2014-05-06 13:03     ` [PATCH v4 4/9] kdb: Rename kdb_register_repeat() to kdb_register_flags() Daniel Thompson
2014-05-06 13:03     ` [PATCH v4 5/9] kdb: Use KDB_REPEAT_* values as flags Daniel Thompson
2014-05-06 13:03     ` [PATCH v4 6/9] kdb: Remove KDB_REPEAT_NONE flag Daniel Thompson
2014-05-06 13:03     ` [PATCH v4 7/9] kdb: Categorize kdb commands (similar to SysRq categorization) Daniel Thompson
2014-05-06 13:03     ` [PATCH v4 8/9] kdb: Add enable mask for groups of commands Daniel Thompson
2014-05-06 13:03     ` [PATCH v4 9/9] kdb: Allow access to sensitive commands to be restricted by default Daniel Thompson
2014-06-19 13:19     ` [PATCH v5 0/8] kdb: Allow selective reduction in capabilities (was "kiosk mode") Daniel Thompson
2014-06-19 13:19       ` [PATCH v5 1/8] kdb: Remove currently unused kdbtab_t->cmd_flags Daniel Thompson
2014-06-19 13:19       ` [PATCH v5 2/8] kdb: Rename kdb_repeat_t to kdb_cmdflags_t, cmd_repeat to cmd_flags Daniel Thompson
2014-06-19 13:19       ` [PATCH v5 3/8] kdb: Rename kdb_register_repeat() to kdb_register_flags() Daniel Thompson
2014-06-19 13:19       ` [PATCH v5 4/8] kdb: Use KDB_REPEAT_* values as flags Daniel Thompson
2014-06-19 13:19       ` [PATCH v5 5/8] kdb: Remove KDB_REPEAT_NONE flag Daniel Thompson
2014-06-19 13:19       ` [PATCH v5 6/8] kdb: Categorize kdb commands (similar to SysRq categorization) Daniel Thompson
2014-06-19 13:19       ` [PATCH v5 7/8] kdb: Add enable mask for groups of commands Daniel Thompson
2014-06-19 13:19       ` [PATCH v5 8/8] kdb: Allow access to sensitive commands to be restricted by default Daniel Thompson
2014-07-11 11:33     ` [RESEND PATCH v5 3.16-rc4 0/8] kdb: Allow selective reduction in capabilities Daniel Thompson
2014-07-11 11:33       ` [RESEND PATCH v5 3.16-rc4 1/8] kdb: Remove currently unused kdbtab_t->cmd_flags Daniel Thompson
2014-07-11 11:33       ` [RESEND PATCH v5 3.16-rc4 2/8] kdb: Rename kdb_repeat_t to kdb_cmdflags_t, cmd_repeat to cmd_flags Daniel Thompson
2014-07-11 11:33       ` [RESEND PATCH v5 3.16-rc4 3/8] kdb: Rename kdb_register_repeat() to kdb_register_flags() Daniel Thompson
2014-07-11 11:33       ` [RESEND PATCH v5 3.16-rc4 4/8] kdb: Use KDB_REPEAT_* values as flags Daniel Thompson
2014-07-11 11:33       ` [RESEND PATCH v5 3.16-rc4 5/8] kdb: Remove KDB_REPEAT_NONE flag Daniel Thompson
2014-07-11 11:33       ` [RESEND PATCH v5 3.16-rc4 6/8] kdb: Categorize kdb commands (similar to SysRq categorization) Daniel Thompson
2014-07-11 11:33       ` [RESEND PATCH v5 3.16-rc4 7/8] kdb: Add enable mask for groups of commands Daniel Thompson
2014-07-11 11:33       ` [RESEND PATCH v5 3.16-rc4 8/8] kdb: Allow access to sensitive commands to be restricted by default Daniel Thompson
2014-07-11 13:16       ` [RESEND PATCH v5 3.16-rc4 0/8] kdb: Allow selective reduction in capabilities Jason Wessel
2014-08-19 14:01     ` [RESEND PATCH v5 3.17-rc1 " Daniel Thompson
2014-08-19 14:01       ` [RESEND PATCH v5 3.17-rc1 1/8] kdb: Remove currently unused kdbtab_t->cmd_flags Daniel Thompson
2014-08-19 14:01       ` [RESEND PATCH v5 3.17-rc1 2/8] kdb: Rename kdb_repeat_t to kdb_cmdflags_t, cmd_repeat to cmd_flags Daniel Thompson
2014-08-19 14:01       ` [RESEND PATCH v5 3.17-rc1 3/8] kdb: Rename kdb_register_repeat() to kdb_register_flags() Daniel Thompson
2014-08-19 14:01       ` [RESEND PATCH v5 3.17-rc1 4/8] kdb: Use KDB_REPEAT_* values as flags Daniel Thompson
2014-08-19 14:01       ` [RESEND PATCH v5 3.17-rc1 5/8] kdb: Remove KDB_REPEAT_NONE flag Daniel Thompson
2014-08-19 14:02       ` [RESEND PATCH v5 3.17-rc1 6/8] kdb: Categorize kdb commands (similar to SysRq categorization) Daniel Thompson
2014-08-19 14:02       ` [RESEND PATCH v5 3.17-rc1 7/8] kdb: Add enable mask for groups of commands Daniel Thompson
2014-08-19 14:02       ` [RESEND PATCH v5 3.17-rc1 8/8] kdb: Allow access to sensitive commands to be restricted by default Daniel Thompson
2015-01-07 16:34     ` [RESEND PATCH v5 3.19-rc2 0/8] kdb: Allow selective reduction in capabilities Daniel Thompson
2015-01-07 16:34       ` [RESEND PATCH v5 3.19-rc2 1/8] kdb: Remove currently unused kdbtab_t->cmd_flags Daniel Thompson
2015-01-07 16:34       ` [RESEND PATCH v5 3.19-rc2 2/8] kdb: Rename kdb_repeat_t to kdb_cmdflags_t, cmd_repeat to cmd_flags Daniel Thompson
2015-01-07 16:34       ` [RESEND PATCH v5 3.19-rc2 3/8] kdb: Rename kdb_register_repeat() to kdb_register_flags() Daniel Thompson
2015-01-07 16:34       ` [RESEND PATCH v5 3.19-rc2 4/8] kdb: Use KDB_REPEAT_* values as flags Daniel Thompson
2015-01-07 16:34       ` [RESEND PATCH v5 3.19-rc2 5/8] kdb: Remove KDB_REPEAT_NONE flag Daniel Thompson
2015-01-07 16:34       ` [RESEND PATCH v5 3.19-rc2 6/8] kdb: Categorize kdb commands (similar to SysRq categorization) Daniel Thompson
2015-01-07 16:34       ` [RESEND PATCH v5 3.19-rc2 7/8] kdb: Add enable mask for groups of commands Daniel Thompson
2015-01-07 16:34       ` [RESEND PATCH v5 3.19-rc2 8/8] kdb: Allow access to sensitive commands to be restricted by default Daniel Thompson

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).