Skip to contentSkip to conversation

x86: fix {pmd,pud}_{set,clear}_flags()

PATCH Juergen Gross 2 participants 3 messages Feb 19, 2018 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 8 lines · Jan Beulich

Just like pte_{set,clear}_flags() their PMD and PUD counterparts should not do any address translation. This was outright wrong under Xen (causing a dead boot with no useful output on "suitable" systems), and produced needlessly more complicated code (even if just slightly) when paravirt was enabled.

While the changes look alright I'm really curious which kind of failure you are seeing, especially considering how long those functions haven't been changed (since more than 6 years).

Juergen

#2 lore raw
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 19.02.18 at 17:23, <[email protected]> wrote:
Quoted 6 lines · Jan Beulich

Just like pte_{set,clear}_flags() their PMD and PUD counterparts should not do any address translation. This was outright wrong under Xen (causing a dead boot with no useful output on "suitable" systems), and produced needlessly more complicated code (even if just slightly) when paravirt was enabled.

Quoted 6 lines
Quoted 2 lines

While the changes look alright I'm really curious which kind of failure you are seeing, especially considering how long those functions haven't been changed (since more than 6 years).

It's the new use of pmd_set_flags() in 2cc42bac1c ("x86-64/Xen:
eliminate W+X mappings"), and due to the (very odd afaic) identity map handling the issue is invisible on most systems/setups.

Jan

A message that is not in the archive (sent off-list or not yet received): [email protected]

author Reviewed-by
#4 lore raw
Quoted 11 lines · Jan Beulich
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 19.02.18 at 17:23, <[email protected]> wrote:
Quoted 8 lines · Jan Beulich

Just like pte_{set,clear}_flags() their PMD and PUD counterparts should not do any address translation. This was outright wrong under Xen (causing a dead boot with no useful output on "suitable" systems), and produced needlessly more complicated code (even if just slightly) when paravirt was enabled.

Quoted 7 lines
Quoted 3 lines

While the changes look alright I'm really curious which kind of failure you are seeing, especially considering how long those functions haven't been changed (since more than 6 years).

It's the new use of pmd_set_flags() in 2cc42bac1c ("x86-64/Xen:
eliminate W+X mappings"), and due to the (very odd afaic) identity map handling the issue is invisible on most systems/setups.

Aah, okay. This helps.

Juergen