Message ID | 20180222191423.GA27395@pd.tnic (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hello Borislav, On 22.02.2018 22:14, Borislav Petkov wrote: > On Thu, Feb 22, 2018 at 12:49:44AM +0300, Alexander Popov wrote: > However, even if we did END(erase_kstack), the calls are still in the > code: > > ffffffff81a00111: e8 ea fe ff ff callq ffffffff81a00000 <entry_SYSCALL_64_stage2> > > so macro it is. But please call the macro something else, not the same > name as the function. Thanks for your time spent on this! I'll call it ERASE_KSTACK and it will look like other macros. >> The mm.txt already has this line: >> ffffffffffe00000 - ffffffffffffffff (=2 MB) unused hole >> >> Excuse me, I didn't get what to document. > > You say > > /* Poison value points to the unused hole in the virtual memory map */ > > but we do change that memory map from time to time and there are > multiple unused holes. > > So do something like this so that there are no clashes when someone > decides to use that unused hole: > > --- > diff --git a/Documentation/x86/x86_64/mm.txt b/Documentation/x86/x86_64/mm.txt > index ea91cb61a602..5d8f4168247d 100644 > --- a/Documentation/x86/x86_64/mm.txt > +++ b/Documentation/x86/x86_64/mm.txt > @@ -24,6 +24,7 @@ ffffffffa0000000 - [fixmap start] (~1526 MB) module mapping space (variable) > [fixmap start] - ffffffffff5fffff kernel-internal fixmap range > ffffffffff600000 - ffffffffff600fff (=4 kB) legacy vsyscall ABI > ffffffffffe00000 - ffffffffffffffff (=2 MB) unused hole > +Stackleak poison value in this last hole: 0xffffffffffff4111 > > Virtual memory map with 5 level page tables: > > @@ -50,6 +51,7 @@ ffffffffa0000000 - fffffffffeffffff (1520 MB) module mapping space > [fixmap start] - ffffffffff5fffff kernel-internal fixmap range > ffffffffff600000 - ffffffffff600fff (=4 kB) legacy vsyscall ABI > ffffffffffe00000 - ffffffffffffffff (=2 MB) unused hole > +Stackleak poison value in this last hole: 0xffffffffffff4111 Ok, I see. Thank you very much. Best regards, Alexander
diff --git a/Documentation/x86/x86_64/mm.txt b/Documentation/x86/x86_64/mm.txt index ea91cb61a602..5d8f4168247d 100644 --- a/Documentation/x86/x86_64/mm.txt +++ b/Documentation/x86/x86_64/mm.txt @@ -24,6 +24,7 @@ ffffffffa0000000 - [fixmap start] (~1526 MB) module mapping space (variable) [fixmap start] - ffffffffff5fffff kernel-internal fixmap range ffffffffff600000 - ffffffffff600fff (=4 kB) legacy vsyscall ABI ffffffffffe00000 - ffffffffffffffff (=2 MB) unused hole +Stackleak poison value in this last hole: 0xffffffffffff4111 Virtual memory map with 5 level page tables: @@ -50,6 +51,7 @@ ffffffffa0000000 - fffffffffeffffff (1520 MB) module mapping space [fixmap start] - ffffffffff5fffff kernel-internal fixmap range ffffffffff600000 - ffffffffff600fff (=4 kB) legacy vsyscall ABI ffffffffffe00000 - ffffffffffffffff (=2 MB) unused hole +Stackleak poison value in this last hole: 0xffffffffffff4111 Architecture defines a 64-bit virtual address. Implementations can support less. Currently supported are 48- and 57-bit virtual addresses. Bits 63