[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMzpN2ifrUKBUmxj3E1XVBTu9Cz4HS+1bT185SY0w687ENKmug@mail.gmail.com>
Date: Fri, 8 Jan 2016 17:29:27 -0500
From: Brian Gerst <brgerst@...il.com>
To: "Luck, Tony" <tony.luck@...el.com>
Cc: Borislav Petkov <bp@...en8.de>,
Andy Lutomirski <luto@...capital.net>,
Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Andy Lutomirski <luto@...nel.org>,
"Williams, Dan J" <dan.j.williams@...el.com>,
Robert <elliott@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
linux-nvdimm <linux-nvdimm@...1.01.org>, X86 ML <x86@...nel.org>
Subject: Re: [PATCH v7 1/3] x86: Add classes to exception tables
On Fri, Jan 8, 2016 at 11:29 AM, Luck, Tony <tony.luck@...el.com> wrote:
>>> +EXPORT_SYMBOL(ex_handler_default);
>>
>> Why not EXPORT_SYMBOL_GPL() ?
>>
>> We do not care about external modules.
>
> I thought the guideline was that new features are GPL, but changes
> to existing features shouldn't break by adding new GPL requirements.
>
> The point is moot though because the shared hallucinations wore
> off this morning and I realized that having the "handler" be a pointer
> to a function can't work. We're storing the 32-bit signed offset from
> the extable to the target address. This is fine if the table and the
> address are close together. But for modules we have an exception
> table wherever vmalloc() loaded the module, and a function back
> in the base kernel.
>
> So back to your ".long 0" for the default case. And if we want to allow
> modules to use any of the new handlers, then we can't use
> relative function pointers for them either.
>
> So I'm looking at making the new field just a simple integer and using
> it to index an array of function pointers (like in v7).
>
> Unless someone has a better idea?
Aren't modules loaded in the top 2GB of address space like the main
kernel? Otherwise rip-relative addressing wouldn't work and modules
would have to be compiled as PIC.
--
Brian Gerst
Powered by blists - more mailing lists