All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christopher M Riedl <cmr@informatik.wtf>
To: Christophe Leroy <christophe.leroy@c-s.fr>, linuxppc-dev@ozlabs.org
Cc: andonnel@au1.ibm.com
Subject: Re: [PATCH] powerpc/xmon: add read-only mode
Date: Tue, 2 Apr 2019 23:38:50 -0400 (EDT)	[thread overview]
Message-ID: <184679822.6025.1554262730223@privateemail.com> (raw)
In-Reply-To: <14aa7671-fc0b-1cbc-da19-004299b304a2@c-s.fr>

> On March 29, 2019 at 3:41 AM Christophe Leroy <christophe.leroy@c-s.fr> wrote:
> 
> 
> 
> 
> Le 29/03/2019 à 05:21, cmr a écrit :
> > Operations which write to memory should be restricted on secure systems
> > and optionally to avoid self-destructive behaviors.
> > 
> > Add a config option, XMON_RO, to control default xmon behavior along
> > with kernel cmdline options xmon=ro and xmon=rw for explicit control.
> > The default is to enable read-only mode.
> > 
> > The following xmon operations are affected:
> > memops:
> > 	disable memmove
> > 	disable memset
> > memex:
> > 	no-op'd mwrite
> > super_regs:
> > 	no-op'd write_spr
> > bpt_cmds:
> > 	disable
> > proc_call:
> > 	disable
> > 
> > Signed-off-by: cmr <cmr@informatik.wtf>
> 
> A Fully qualified name should be used.

What do you mean by fully-qualified here? PPC_XMON_RO? (PPC_)XMON_READONLY?

> 
> > ---
> >   arch/powerpc/Kconfig.debug |  7 +++++++
> >   arch/powerpc/xmon/xmon.c   | 24 ++++++++++++++++++++++++
> >   2 files changed, 31 insertions(+)
> > 
> > diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
> > index 4e00cb0a5464..33cc01adf4cb 100644
> > --- a/arch/powerpc/Kconfig.debug
> > +++ b/arch/powerpc/Kconfig.debug
> > @@ -117,6 +117,13 @@ config XMON_DISASSEMBLY
> >   	  to say Y here, unless you're building for a memory-constrained
> >   	  system.
> >   
> > +config XMON_RO
> > +	bool "Set xmon read-only mode"
> > +	depends on XMON
> > +	default y
> 
> Should it really be always default y ?
> I would set default 'y' only when some security options are also set.
> 

This is a good point, I based this on an internal Slack suggestion but giving this more thought, disabling read-only mode by default makes more sense. I'm not sure what security options could be set though?

  reply	other threads:[~2019-04-03  3:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-29  4:21 [PATCH] powerpc/xmon: add read-only mode cmr
2019-03-29  4:49 ` Andrew Donnellan
2019-04-03 13:02   ` Christopher M Riedl
2019-04-03 23:59     ` Andrew Donnellan
2019-03-29  7:41 ` Christophe Leroy
2019-04-03  3:38   ` Christopher M Riedl [this message]
2019-04-03  4:15     ` Christophe Leroy
2019-04-03 13:15       ` Christopher M Riedl

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=184679822.6025.1554262730223@privateemail.com \
    --to=cmr@informatik.wtf \
    --cc=andonnel@au1.ibm.com \
    --cc=christophe.leroy@c-s.fr \
    --cc=linuxppc-dev@ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.