[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52D35ABB.8070904@intel.com>
Date: Mon, 13 Jan 2014 11:17:15 +0800
From: Ren Qiaowei <qiaowei.ren@...el.com>
To: Borislav Petkov <bp@...en8.de>
CC: "H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/5] x86, mpx: hook #BR exception handler to allocate
bound tables
On 01/12/2014 05:20 PM, Borislav Petkov wrote:
> On Sun, Jan 12, 2014 at 05:20:00PM +0800, Qiaowei Ren wrote:
>> +static bool allocate_bt(unsigned long bd_entry)
>> +{
>> + unsigned long bt_size = 1UL << (MPX_L2_BITS+MPX_L2_SHIFT);
>> + unsigned long bt_addr, old_val;
>> +
>> + bt_addr = sys_mmap_pgoff(0, bt_size, PROT_READ | PROT_WRITE,
>> + MAP_ANONYMOUS | MAP_PRIVATE | MAP_POPULATE, -1, 0);
>
> Are we sure about this? We can do a possible memory allocation in
> mmap_region() in this exception handler context. And yes, we do a
> conditional_sti(), which makes it all the more susceptible.
>
> Have you run this with lockdep enabled?
>
Yes, I run this with lockdep enabled.
Thanks,
Qiaowei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists