Skip to content

KDB: Kiosk (reduced capabilities) mode

Anton Vorontsov lkml 1 version In review

Get series with b4
b4 am 20120726142514.GA32158@lizard

Versions newest first

  1. v1 Latest7 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7kdb: Remove currently unused kdbtab_t->cmd_flagskernel/debug/kdb/kdb_main.c kernel/debug/kdb/kdb_private.h+0 -20 replies
2/7kdb: Rename kdb_repeat_t to kdb_cmdflags_t, cmd_repeat to cmd_flagsinclude/linux/kdb.h kernel/debug/kdb/kdb_main.c kernel/debug/kdb/kdb_private.h+6 -60 replies
3/7kdb: Rename kdb_register_repeat() to kdb_register_flags()include/linux/kdb.h kernel/debug/kdb/kdb_bp.c kernel/debug/kdb/kdb_main.c +1 more+55 -550 replies
4/7kdb: Use KDB_REPEAT_* values as flagsinclude/linux/kdb.h kernel/debug/kdb/kdb_main.c+9 -160 replies
5/7kdb: Remove KDB_REPEAT_NONE flaginclude/linux/kdb.h kernel/debug/kdb/kdb_bp.c kernel/debug/kdb/kdb_main.c +1 more+33 -350 replies
6/7kdb: Mark safe commands as KDB_SAFE and KDB_SAFE_NO_ARGSinclude/linux/kdb.h kernel/debug/kdb/kdb_bp.c kernel/debug/kdb/kdb_main.c +1 more+34 -313 replies
7/7kdb: Add kiosk modeinclude/linux/kdb.h kernel/debug/kdb/kdb_main.c+20 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] KDB: Kiosk (reduced capabilities) mode

Hi all,

Here is a patchset that implements "kiosk" mode for KDB debugger. The mode provides reduced set of features, so that it is no longer possible to leak sensitive data via the debugger, and not possible to change program flow in a predefined manner.

The are two use-cases for the mode, one is evil, but another is quite legitimate.

The evil use case is used by some (ahem) phone manufaturers that want to have a debuging facilities on a production device, but still don't want you to use the debugger to gain root access. I don't like locked phones, and I would not touch this/get my hands dirty by implementing the feature just for this evil (IMHO) use case.

But there is another non-evil use case: limitting access to public devices, i.e. "kiosks", ATMs (is that too much?) or just public computers w/ guest access. I can imagine that an administrator would want to setup a kernel so that upon an oops (or a sysrq event) the kernel would enter KDB, but at the same time, he would not want to leak sensitive data from the PC by means of the debugger.

There are seven patches, the first five of them are just cleanups and preparations. I believe these five patches are good even if not considering the kiosk mode. And the rest of patches actually implement the mode -- it is pretty straightforward.

Note that we might impelement the same mode for KGDB stub, but so far we don't bother.

Thanks!

--

 include/linux/kdb.h            |   16 ++--
 kernel/debug/kdb/kdb_bp.c      |   35 ++++----
 kernel/debug/kdb/kdb_main.c    |  183 +++++++++++++++++++++-------------------
 kernel/debug/kdb/kdb_private.h |    3 +-
 kernel/trace/trace_kdb.c       |    4 +-
 5 files changed, 126 insertions(+), 115 deletions(-)
Signature · 2 lines
Anton Vorontsov
Email: [email protected]