mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Kees Cook <keescook@chromium.org>
Cc: Evgenii Shatokhin <eugene.shatokhin@yandex.ru>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>, Pavel Machek <pavel@ucw.cz>
Subject: Re: 32-bit x86 system reboots automatically on resume from hibernate (ASLR issue?)
Date: Wed, 22 Mar 2017 23:23:10 +0100	[thread overview]
Message-ID: <114644089.Ta0zJP2mLb@aspire.rjw.lan> (raw)
In-Reply-To: <CAGXu5jK0XQAPNX=VX-k=gWjQiOPNjs__YbQz29D0MZOqC8NK2w@mail.gmail.com>

On Wednesday, March 22, 2017 11:58:55 AM Kees Cook wrote:
> On Wed, Mar 22, 2017 at 5:50 AM, Evgenii Shatokhin
> <eugene.shatokhin@yandex.ru> wrote:
> > On 21.03.2017 23:40, Kees Cook wrote:
> >>
> >> On Tue, Mar 21, 2017 at 6:54 AM, Evgenii Shatokhin
> >> <eugene.shatokhin@yandex.ru> wrote:
> >>>
> >>> Hi,
> >>>
> >>> One of my x86 machines with a 32-bit Linux system (ROSA Linux in this
> >>> case)
> >>> automatically reboots when it tries to resume from hibernate. This
> >>> happens
> >>> shortly after "Image loading progress 100%" message is shown on the
> >>> screen.
> >>>
> >>> No traces of the error are in the system log after reboot though.
> >>>
> >>> The problem is present at least in the mainline kernels 4.8 - 4.10. With
> >>> earlier versions (I tried 4.4, 4.5, etc.), the system resumes OK.
> >>>
> >>> The bisection pointed to the following commit as the first "bad" one:
> >>>
> >>> commit 65fe935dd2387a4faf15314c73f5e6d31ef0217e
> >>> Author: Kees Cook <keescook@chromium.org>
> >>> Date:   Mon Jun 13 15:10:02 2016 -0700
> >>>
> >>>      x86/KASLR, x86/power: Remove x86 hibernation restrictions
> >>
> >>
> >> Hrm, perhaps the 32-bit hibernation code still isn't KASLR-safe. If
> >> you boot with nokaslr on the kernel command line, does the problem go
> >> away?
> >
> >
> > Yes. The problem does not show up when I boot the system with 'nokaslr'.
> 
> Okay, it looks like we need to either partially revert that commit
> (i.e. make the by-default-prefer-hibernation logic only happen on
> 32-bit x86), swap the logic (i.e. by-default-prefer-KASLR on 32-bit),
> or make KASLR be blocked by hibernation in Kconfig (as it was a long
> time ago).
> 
> Rafael, do you have a preference here?

I'd say let's make KASLR and hibernation mutually exclusive on 32-bit and
it really doesn't matter to me which one is preferred as long as it is clear
that one will be disabled by the other (each way).

And I don't see why 64-bit would need to be affected by this at all, frankly.

I still have a patch from Pavel to improve things in 32-bit hibernation land,
but it still requires some time and effort and I don't see volunteers for
that work.

Thanks,
Rafael

      reply	other threads:[~2017-03-22 22:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-21 13:54 Evgenii Shatokhin
2017-03-21 20:40 ` Kees Cook
2017-03-22 12:50   ` Evgenii Shatokhin
2017-03-22 18:58     ` Kees Cook
2017-03-22 22:23       ` Rafael J. Wysocki [this message]

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=114644089.Ta0zJP2mLb@aspire.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=eugene.shatokhin@yandex.ru \
    --cc=hpa@zytor.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rafael.j.wysocki@intel.com \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®