From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>
Cc: "security@kernel.org" <security@kernel.org>,
X86 ML <x86@kernel.org>, Borislav Petkov <bp@alien8.de>,
Sasha Levin <sasha.levin@oracle.com>,
linux-kernel@vger.kernel.org,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Jan Beulich <jbeulich@suse.com>,
xen-devel <xen-devel@lists.xen.org>,
stable@vger.kernel.org
Subject: Re: [PATCH v3 1/3] x86/ldt: Make modify_ldt synchronous
Date: Sat, 25 Jul 2015 00:13:23 -0400 [thread overview]
Message-ID: <55B30CE3.2010902@oracle.com> (raw)
In-Reply-To: <55B01745.4010702@oracle.com>
On 07/22/2015 06:20 PM, Boris Ostrovsky wrote:
> On 07/22/2015 03:23 PM, Andy Lutomirski wrote:
>>
>> + error = -ENOMEM;
>> + new_ldt = alloc_ldt_struct(newsize);
>> + if (!new_ldt)
>> goto out_unlock;
>> - }
>> - fill_ldt(&ldt, &ldt_info);
>> - if (oldmode)
>> - ldt.avl = 0;
>> + if (old_ldt) {
>> + memcpy(new_ldt->entries, old_ldt->entries,
>> + oldsize * LDT_ENTRY_SIZE);
>> + }
>> + memset(new_ldt->entries + oldsize * LDT_ENTRY_SIZE, 0,
>> + (newsize - oldsize) * LDT_ENTRY_SIZE);
>
> We need to zero out full page (probably better in alloc_ldt_struct()
> with vmzalloc/__GFP_ZERO) --- Xen checks whole page that is assigned
> to G/LDT and gets unhappy if an invalid descriptor is found there.
>
> This fixes one problem. There is something else that Xen gets upset
> about, I haven't figured what it is yet (and I am out tomorrow so it
> may need to wait until Friday).
>
What I thought was another problem turned out not to be one so both 64-
and 32-bit tests passed on 64-bit PV (when allocated LDT is zeroed out)
However, on 32-bit kernel the test is failing multicpu test, I don't
know yet what it is.
-boris
next prev parent reply other threads:[~2015-07-25 4:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-22 19:23 [PATCH v3 0/3] x86: modify_ldt improvement, test, and config option Andy Lutomirski
2015-07-22 19:23 ` [PATCH v3 1/3] x86/ldt: Make modify_ldt synchronous Andy Lutomirski
2015-07-22 22:20 ` Boris Ostrovsky
2015-07-25 4:13 ` Boris Ostrovsky [this message]
2015-07-25 4:58 ` Andy Lutomirski
2015-07-24 6:37 ` Borislav Petkov
2015-07-24 15:29 ` Borislav Petkov
2015-07-25 4:52 ` Andy Lutomirski
2015-07-25 8:37 ` Borislav Petkov
2015-07-22 19:23 ` [PATCH v3 2/3] x86/ldt: Make modify_ldt optional Andy Lutomirski
2015-07-23 7:13 ` Jan Beulich
2015-07-23 10:24 ` Willy Tarreau
2015-07-23 23:36 ` Kees Cook
2015-07-23 23:40 ` Andy Lutomirski
2015-07-23 23:58 ` Willy Tarreau
2015-07-24 0:09 ` Kees Cook
2015-07-24 7:24 ` Willy Tarreau
2015-07-24 7:48 ` Willy Tarreau
2015-07-22 19:23 ` [PATCH v3 3/3] selftests/x86, x86/ldt: Add a selftest for modify_ldt Andy Lutomirski
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=55B30CE3.2010902@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=andrew.cooper3@citrix.com \
--cc=bp@alien8.de \
--cc=jbeulich@suse.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sasha.levin@oracle.com \
--cc=security@kernel.org \
--cc=stable@vger.kernel.org \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xen.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 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).