Page MenuHomeFreeBSD

powerpc: Fix alignment of initial PCB on kstack
AcceptedPublic

Authored by jhb on Fri, Jan 23, 6:45 PM.
Tags
None
Referenced Files
F142846890: D54839.id.diff
Sat, Jan 24, 3:27 AM
F142846862: D54839.id.diff
Sat, Jan 24, 3:27 AM
F142846624: D54839.diff
Sat, Jan 24, 3:23 AM
F142846589: D54839.diff
Sat, Jan 24, 3:23 AM
F142837331: D54839.id170282.diff
Sat, Jan 24, 1:25 AM
F142816604: D54839.diff
Fri, Jan 23, 9:24 PM
Subscribers

Details

Reviewers
jhibbits
adrian
fuz
Group Reviewers
cheri
Summary

Commit cc81c44dd806737f98b4fd4094674dd71c8749f3 aimed to consolidate
duplicated code between the Book-E and AIM backends. For
cpu_thread_alloc cpu_thread_alloc and cpu_fork it used the AIM
functions which used a bogus alignment mask (~0x2f). The Book-E
functions used a proper alignment mask (~0x3f). The AIM functions
appear to have been busted since they were first imported in commit
919cb3362fded33aca682a6ac57777f8fff86e36.

To fix, use the Book-E mask which requests 64 byte alignment.
Probably this was harmless in practice since td_kstack is page aligned
and struct pcb is probably a multiple of 32 bytes in size, so the 0x10
bit should have been clear anyway.

Fixes: cc81c44dd806 ("Unify ABI-related bits of the Book-E and AIM...")
Effort: CHERI upstreaming
Sponsored by: AFRL, DARPA

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 70077
Build 66960: arc lint + arc unit