CMP_PTE_USER_READ4M: check against PPROT_RWX_RWX; this is the canonical

stack protection (saves many excursions into trap.c on window underflows
as was the sole intention of the macro..).
This commit is contained in:
pk 1996-05-27 20:46:39 +00:00
parent 63e835ebd6
commit 9913321bff
1 changed files with 5 additions and 2 deletions

View File

@ -1273,12 +1273,15 @@ Lpanic_red:
#define PTE_OF_ADDR4M(addr, pte, bad, page_offset) \
andn addr, page_offset, pte
/* note: the following misses the PPROT_RWX_RWX case */
/* note: pmap currently does not use the PPROT_R_R and PPROT_RW_RW cases */
#define CMP_PTE_USER_READ4M(pte) \
or pte, ASI_SRMMUFP_L3, pte; \
lda [pte] ASI_SRMMUFP, pte; \
and pte, (SRMMU_TETYPE | SRMMU_PROT_MASK), pte; \
cmp pte, (SRMMU_TEPTE | PPROT_RX_RX)
cmp pte, (SRMMU_TEPTE | PPROT_RWX_RWX); \
be 8f; nop; \
cmp pte, (SRMMU_TEPTE | PPROT_RX_RX); \
8:
/* note: PTE bit 4 set implies no user writes */