From: Greg KH <gregkh@linuxfoundation.org>
To: speck@linutronix.de
Subject: [MODERATED] Re: [PATCH v17.1 2/2] [PATCH v17.1 2/2] SSB Fix #2
Date: Fri, 18 May 2018 14:03:48 +0200 [thread overview]
Message-ID: <20180518120348.GC5632@kroah.com> (raw)
In-Reply-To: <20180518114345.GU18423@char.us.oracle.com>
On Fri, May 18, 2018 at 07:43:45AM -0400, speck for Konrad Rzeszutek Wilk wrote:
> On Fri, May 18, 2018 at 11:14:51AM +0200, speck for Thomas Gleixner wrote:
> > On Wed, 16 May 2018, speck for konrad.wilk_at_oracle.com wrote:
> >
> > > xen: Don't call non-Xen routines early in the boot
> > >
> > > Commit 2cc42bac1c79 ("x86-64/Xen: eliminate W+X mappings") added a call
> > > to get_cpu_cap() to properly set boot_cpu_has(X86_FEATURE_NX) which is
> > > needed to correctly initialize __supported_pte_mask. Doing this so early
> > > in the boot can be dangerous --- while this currently works, there is no
> > > telling what get_cpu_cap() may decide to add in the future. For example,
> > > if it decides to do a printk (which is not something impossible to
> > > imagine) a PV guest will not be able to cope with it.
> >
> > So this is not an issue today and I don't see a reason why you need to add
> > open coded hackery.
> >
> > > + /* Work out if we support NX. */
> > > + if ((cpuid_eax(0x80000000) >= 0x80000001) &&
> > > + (cpuid_edx(0x80000001) & (1U << (X86_FEATURE_NX & 31))))
> > > + __supported_pte_mask |= _PAGE_NX;
> > > + else
> > > + __supported_pte_mask &= ~_PAGE_NX;
> > > +
> >
> > And of course this open coded hack is not a 1:1 replacement for
> > x86_configure_nx().
> >
> > So can you please explain what kind of problem you are trying to solve?
>
> This SSB patch series makes Xen PV guests crash.
Which exact patch causes the crash? Why not fix that one up instead to
not break things.
That seems like a wiser thing to do instead of papering over it later on
in a patch series to be applied at some later date.
> > AFAICT from the changelog it's just the 'someone might add a printk'
> > fear. Come on, that's silly. If that happens its going to be caught in next
> > early enough to fix it.
>
> That is more of a obfuscation in case you would like this particular patch
> go through the not-secure-channel.
As this is a "secure channel", you are causing confusion here :(
thanks,
greg k-h
next prev parent reply other threads:[~2018-05-18 12:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-17 3:18 [MODERATED] [PATCH v17.1 2/2] [PATCH v17.1 2/2] SSB Fix #2 konrad.wilk
2018-05-18 8:20 ` [MODERATED] " Greg KH
2018-05-18 9:02 ` Thomas Gleixner
2018-05-18 11:46 ` [MODERATED] " Konrad Rzeszutek Wilk
2018-05-18 9:14 ` Thomas Gleixner
2018-05-18 11:43 ` [MODERATED] " Konrad Rzeszutek Wilk
2018-05-18 12:03 ` Greg KH [this message]
2018-05-18 13:21 ` Greg KH
2018-05-18 18:22 ` Konrad Rzeszutek Wilk
2018-05-18 19:57 ` Thomas Gleixner
2018-05-18 20:34 ` [MODERATED] " Konrad Rzeszutek Wilk
2018-05-18 20:40 ` Linus Torvalds
2018-05-18 21:05 ` Konrad Rzeszutek Wilk
2018-05-18 21:10 ` Linus Torvalds
2018-05-19 8:33 ` Thomas Gleixner
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=20180518120348.GC5632@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=speck@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 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.