public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] KDB: Kiosk (reduced capabilities) mode
@ 2012-07-26 14:25 Anton Vorontsov
  2012-07-26 14:26 ` [PATCH 1/7] kdb: Remove currently unused kdbtab_t->cmd_flags Anton Vorontsov
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Anton Vorontsov @ 2012-07-26 14:25 UTC (permalink / raw)
  To: Jason Wessel
  Cc: Andrew Morton, Steven Rostedt, John Stultz, arve, linux-kernel,
	linaro-kernel, patches, kernel-team, kgdb-bugreport

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

-- 
Anton Vorontsov
Email: cbouatmailru@gmail.com

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [PATCH 0/7] KDB: Kiosk (reduced capabilities) mode
@ 2012-10-16  1:17 Anton Vorontsov
  2012-10-16  1:18 ` [PATCH 6/7] kdb: Mark safe commands as KDB_SAFE and KDB_SAFE_NO_ARGS Anton Vorontsov
  0 siblings, 1 reply; 17+ messages in thread
From: Anton Vorontsov @ 2012-10-16  1:17 UTC (permalink / raw)
  To: Jason Wessel
  Cc: Colin Cross, Alan Cox, John Stultz, linux-kernel, linaro-kernel,
	patches, kernel-team, kgdb-bugreport

Hello Jason,

Just as promised, I'm resending the series after the merge window.

This patchset implements "kiosk" mode for KDB debugger. The mode reduces
kdb 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 by an ordinary user. Root can control the capability.

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.

Thanks!
Anton.

--
 include/linux/kdb.h            |  20 ++--
 kernel/debug/kdb/kdb_bp.c      |  24 ++---
 kernel/debug/kdb/kdb_main.c    | 189 ++++++++++++++++++----------------
 kernel/debug/kdb/kdb_private.h |   3 +-
 kernel/trace/trace_kdb.c       |   4 +-
 5 files changed, 125 insertions(+), 115 deletions(-)

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [PATCH resend 0/7] KDB: Kiosk (reduced capabilities) mode
@ 2012-11-23  0:53 Anton Vorontsov
  2012-11-23  0:53 ` [PATCH 6/7] kdb: Mark safe commands as KDB_SAFE and KDB_SAFE_NO_ARGS Anton Vorontsov
  0 siblings, 1 reply; 17+ messages in thread
From: Anton Vorontsov @ 2012-11-23  0:53 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jason Wessel, John Stultz, linux-kernel, linaro-kernel, patches,
	kernel-team, kgdb-bugreport

Hi Andrew, Jason,

And yet another set that folks seem to be too busy to look into. :)

The rationale for the series is this:

This patchset implements "kiosk" mode for KDB debugger. The mode reduces
kdb 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 by an ordinary user. The root can control the capability.

It is useful on phones with an easy access to a debugger console (e.g.
thru a headphone mini-jack), or on a public PCs (but we still want to let
the user somewhat diagnose the problem via KDB-via-KMS).

Later we might want to implement password-protected "unlock" command (with
the hash of the password passed via some sysfs attribute).

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.

Thanks!
Anton.

--
 include/linux/kdb.h            |  20 ++--
 kernel/debug/kdb/kdb_bp.c      |  24 ++---
 kernel/debug/kdb/kdb_main.c    | 189 +++++++++++++++++----------------
 kernel/debug/kdb/kdb_private.h |   3 +-
 kernel/trace/trace_kdb.c       |   4 +-
 5 files changed, 125 insertions(+), 115 deletions(-)

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

end of thread, other threads:[~2012-11-23  0:57 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-26 14:25 [PATCH 0/7] KDB: Kiosk (reduced capabilities) mode Anton Vorontsov
2012-07-26 14:26 ` [PATCH 1/7] kdb: Remove currently unused kdbtab_t->cmd_flags Anton Vorontsov
2012-07-26 14:26 ` [PATCH 2/7] kdb: Rename kdb_repeat_t to kdb_cmdflags_t, cmd_repeat to cmd_flags Anton Vorontsov
2012-07-26 14:26 ` [PATCH 3/7] kdb: Rename kdb_register_repeat() to kdb_register_flags() Anton Vorontsov
2012-07-26 14:26 ` [PATCH 4/7] kdb: Use KDB_REPEAT_* values as flags Anton Vorontsov
2012-07-26 14:26 ` [PATCH 5/7] kdb: Remove KDB_REPEAT_NONE flag Anton Vorontsov
2012-07-26 14:26 ` [PATCH 6/7] kdb: Mark safe commands as KDB_SAFE and KDB_SAFE_NO_ARGS Anton Vorontsov
2012-07-26 17:07   ` Alan Cox
2012-07-26 17:39     ` Anton Vorontsov
2012-07-30 12:04       ` [PATCH v2 " Anton Vorontsov
2012-07-26 14:26 ` [PATCH 7/7] kdb: Add kiosk mode Anton Vorontsov
2012-07-27 19:30 ` [PATCH 0/7] KDB: Kiosk (reduced capabilities) mode Colin Cross
2012-07-28  1:26   ` Anton Vorontsov
2012-07-28  1:49     ` John Stultz
2012-07-28  1:53     ` Colin Cross
  -- strict thread matches above, loose matches on Subject: below --
2012-10-16  1:17 Anton Vorontsov
2012-10-16  1:18 ` [PATCH 6/7] kdb: Mark safe commands as KDB_SAFE and KDB_SAFE_NO_ARGS Anton Vorontsov
2012-11-23  0:53 [PATCH resend 0/7] KDB: Kiosk (reduced capabilities) mode Anton Vorontsov
2012-11-23  0:53 ` [PATCH 6/7] kdb: Mark safe commands as KDB_SAFE and KDB_SAFE_NO_ARGS Anton Vorontsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox