Re: [patch 47/60] x86/ldt: Map LDT entries into fixmap

From: Thomas Gleixner
Date: Mon Dec 04 2017 - 17:51:12 EST


On Mon, 4 Dec 2017, Andy Lutomirski wrote:

> On Mon, Dec 4, 2017 at 6:07 AM, Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
> > From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> >
> > LDT is not really commonly used on 64bit so the overhead of populating the
> > fixmap entries on context switch for the rare LDT syscall users is a
> > reasonable trade off vs. having extra dynamically managed mapping space per
> > process.
> >
>
> Hmm, I wonder just how slow this is. It might be okay. It's
> certainly not the way I imagined it working.

I know, it was the laziest way I could come up with. The only nasty thing
here is that __set_fixmap() does a tlb flush which is pointless as that
happens anyway. On my todo list was a noflush variant for set_fixmap along
with a variant which takes a whole range. That would simplify other places
as well. Though with the plan to map that stuff to a different place we
actually can avoid the weirdness of fixmaps

Thanks,

tglx