From: Daniel Axtens <dja@axtens.net>
To: Andrew Donnellan <ajd@linux.ibm.com>,
Christopher M Riedl <cmr@informatik.wtf>,
linuxppc-dev@ozlabs.org, kernel-hardening@lists.openwall.com
Cc: mjg59@google.com
Subject: Re: [RFC PATCH v2] powerpc/xmon: restrict when kernel is locked down
Date: Wed, 19 Jun 2019 16:24:35 +1000 [thread overview]
Message-ID: <87h88m2iu4.fsf@dja-thinkpad.axtens.net> (raw)
In-Reply-To: <57844920-c17b-d93c-66c0-e6822af71929@linux.ibm.com>
Andrew Donnellan <ajd@linux.ibm.com> writes:
> On 4/6/19 1:05 pm, Christopher M Riedl wrote:>>> + if (!xmon_is_ro) {
>>>> + xmon_is_ro = kernel_is_locked_down("Using xmon write-access",
>>>> + LOCKDOWN_INTEGRITY);
>>>> + if (xmon_is_ro) {
>>>> + printf("xmon: Read-only due to kernel lockdown\n");
>>>> + clear_all_bpt();
>>>
>>> Remind me again why we need to clear breakpoints in integrity mode?
>>>
>>>
>>> Andrew
>>>
>>
>> I interpreted "integrity" mode as meaning that any changes made by xmon should
>> be reversed. This also covers the case when a user creates some breakpoint(s)
>> in xmon, exits xmon, and then elevates the lockdown state. Upon hitting the
>> first breakpoint and (re-)entering xmon, xmon will clear all breakpoints.
>>
>> Xmon can only take action in response to dynamic lockdown level changes when
>> xmon is invoked in some manner - if there is a better way I am all ears :)
>>
>
> Integrity mode merely means we are aiming to prevent modifications to
> kernel memory. IMHO leaving existing breakpoints in place is fine as
> long as when we hit the breakpoint xmon is in read-only mode.
>
> (dja/mpe might have opinions on this)
Apologies for taking so long to get back to you.
I think ajd is right.
I think about it like this. There are 2 transitions:
- into integrity mode
Here, we need to go into r/o, but do not need to clear breakpoints.
You can still insert breakpoints in readonly mode, so clearing them
just makes things more irritating rather than safer.
- into confidentiality mode
Here we need to purge breakpoints and disable xmon completely.
Kind regards,
Daniel
>
> --
> Andrew Donnellan OzLabs, ADL Canberra
> ajd@linux.ibm.com IBM Australia Limited
next prev parent reply other threads:[~2019-06-19 6:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-24 12:38 [RFC PATCH v2] powerpc/xmon: restrict when kernel is locked down Christopher M. Riedl
2019-06-03 5:36 ` Andrew Donnellan
2019-06-04 3:05 ` Christopher M Riedl
2019-06-04 3:28 ` Andrew Donnellan
2019-06-19 6:24 ` Daniel Axtens [this message]
2019-07-29 7:00 ` Daniel Axtens
2019-08-03 19:04 ` 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=87h88m2iu4.fsf@dja-thinkpad.axtens.net \
--to=dja@axtens.net \
--cc=ajd@linux.ibm.com \
--cc=cmr@informatik.wtf \
--cc=kernel-hardening@lists.openwall.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mjg59@google.com \
/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;
as well as URLs for NNTP newsgroup(s).