Re: [PATCH 0/5] replace magic numbers in GDT descriptors

From: Linus Torvalds
Date: Tue Dec 19 2023 - 12:34:05 EST


On Tue, 19 Dec 2023 at 07:12, Vegard Nossum <vegard.nossum@xxxxxxxxxx> wrote:
>
> Vegard Nossum (5):
> x86: provide new infrastructure for GDT descriptors
> x86: replace magic numbers in GDT descriptors, part 1
> x86: replace magic numbers in GDT descriptors, part 2
> x86: always set A (accessed) flag in GDT descriptors
> x86: add DB flag to 32-bit percpu GDT entry

All these patches look fine to me, but I will again leave it to the
x86 maintainers whether they want to apply them. But feel free to add
my Ack if y ou do.

The end result does look a *lot* more legible, with something like

DESC_DATA64 | DESC_USER

instead of just a raw number like 0xc0f3.

So while this is unlikely to be a maintenance burden (since we look at
these things so seldom, and they never really change), I think it's a
nice readability improvement.

The fact that Vegard found two oddities while doing this series just
reinforces that readability issue. Neither of them were bugs, but they
were odd inconsistencies.

Linus