Skip to content

x86: PER_CPU segment improvements

Andy Lutomirski lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 1 replyIn review
  2. v13 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Fix patch 2's changelog.
- Learn to spell "Not a system segment".

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3x86,vdso: Change the PER_CPU segment to use struct desc_structarch/x86/kernel/vsyscall_64.c+11 -70 replies
2/3x86,vdso: Make the PER_CPU segment start out accessedarch/x86/kernel/vsyscall_64.c+1 -10 replies
3/3x86,vdso: Make the PER_CPU segment 32 bitsarch/x86/kernel/vsyscall_64.c+1 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] x86: PER_CPU segment improvements

x86 sets up a per-cpu GDT entry so that vgetcpu can use LSL on it to determine the CPU number and node.

This series, in little baby steps, cleans up that code and sets the accessed and 32-bit flags on the segment.

The accessed bit prevents user code from setting the accessed bit on its own, and making the segment 32-bit prevents concerns about shenanigans involving CPU oddities with 16-bit data segments.

The latter isn't a real problem -- if it were a 16-bit read/write segment, it could be used to bypass espfix64, but fortunately RO segments can't be loaded into SS.

Changes from v1:
- Fix patch 2's changelog.
- Learn to spell "Not a system segment".

Andy Lutomirski (3):
x86,vdso: Change the PER_CPU segment to use struct desc_struct x86,vdso: Make the PER_CPU segment start out accessed x86,vdso: Make the PER_CPU segment 32 bits

 arch/x86/kernel/vsyscall_64.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
Signature · 1 line
1.9.3