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

From: Ingo Molnar
Date: Wed Dec 20 2023 - 04:59:21 EST



* Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxx> wrote:

> 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.

Thanks - I've applied your acks. These are obviously useful cleanups,
so no objections whatsoever.

> 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.

Yeah, absolutely.

> 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.

Indeed ...

Thanks,

Ingo