diff options
| author | Borislav Petkov <[email protected]> | 2016-10-27 12:36:23 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2016-10-28 08:29:59 +0000 |
| commit | 1c27f646b18fb56308dff82784ca61951bad0b48 (patch) | |
| tree | bc0ca9d3695ff8bc84ed1f68f24826a98cee1d24 /net/switchdev/switchdev.c | |
| parent | x86: Fix export for mcount and __fentry__ (diff) | |
| download | kernel-1c27f646b18fb56308dff82784ca61951bad0b48.tar.gz kernel-1c27f646b18fb56308dff82784ca61951bad0b48.zip | |
x86/microcode/AMD: Fix more fallout from CONFIG_RANDOMIZE_MEMORY=y
We needed the physical address of the container in order to compute the
offset within the relocated ramdisk. And we did this by doing __pa() on
the virtual address.
However, __pa() does checks whether the physical address is within
PAGE_OFFSET and __START_KERNEL_map - see __phys_addr() - which fail
if we have CONFIG_RANDOMIZE_MEMORY enabled: we feed a virtual address
which *doesn't* have the randomization offset into a function which uses
PAGE_OFFSET which *does* have that offset.
This makes this check fire:
VIRTUAL_BUG_ON((x > y) || !phys_addr_valid(x));
^^^^^^
due to the randomization offset.
The fix is as simple as using __pa_nodebug() because we do that
randomization offset accounting later in that function ourselves.
Reported-by: Bob Peterson <[email protected]>
Tested-by: Bob Peterson <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Cc: Andreas Gruenbacher <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Brian Gerst <[email protected]>
Cc: Denys Vlasenko <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Josh Poimboeuf <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Steven Whitehouse <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: linux-mm <[email protected]>
Cc: [email protected] # 4.9
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions
