On 26/09/2024 11:41 am, Ard Biesheuvel wrote: > From: Ard Biesheuvel <a...@kernel.org> > > The size field in a GDT descriptor is offset by 1, so subtract 1 from > the calculated range. > > Signed-off-by: Ard Biesheuvel <a...@kernel.org>
I realise this is probably nitpicking, but the GDT descriptor has a limit field, which is (intentionally) not a size field. This is why there's a difference of 1 between them. Working in terms of limits rather than sizes avoids needing a 16th bit on the segment limit circuitry, which mattered for the 286. ~Andrew