Discussion:
[PATCH][Kasan] Allow to override Asan shadow offset from command line
Yury Gribov
2014-09-08 14:29:11 UTC
Permalink
Hi all,

Kasan developers has asked for an option to override offset of Asan
shadow memory region. This should simplify experimenting with memory
layouts on 64-bit architectures.

I've bootstrapped and regtested this on x64.

Ok to commit?

-Y
Yury Gribov
2014-09-15 09:46:14 UTC
Permalink
Post by Yury Gribov
Hi all,
Kasan developers has asked for an option to override offset of Asan
shadow memory region. This should simplify experimenting with memory
layouts on 64-bit architectures.
I've bootstrapped and regtested this on x64.
Ok to commit?
-Y
Jakub Jelinek
2014-09-18 11:01:20 UTC
Permalink
Post by Yury Gribov
Kasan developers has asked for an option to override offset of Asan
shadow memory region. This should simplify experimenting with memory
layouts on 64-bit architectures.
I've bootstrapped and regtested this on x64.
Ok to commit?
I don't like it at all. For the kernel-address perhaps it might make sense
as a param, but for userland, as it is an ABI changing option, I'm afraid
people would start to create objects/shared libraries/binaries with
ABI incompatible values.
So, if you need it for kernel, use a param that can be eventually dropped,
and limit it to kernel-address mode only.

Jakub
Yury Gribov
2014-09-18 11:06:12 UTC
Permalink
Post by Jakub Jelinek
Post by Yury Gribov
Kasan developers has asked for an option to override offset of Asan
shadow memory region. This should simplify experimenting with memory
layouts on 64-bit architectures.
I've bootstrapped and regtested this on x64.
Ok to commit?
I don't like it at all. For the kernel-address perhaps it might make sense
as a param, but for userland, as it is an ABI changing option, I'm afraid
people would start to create objects/shared libraries/binaries with
ABI incompatible values.
So, if you need it for kernel, use a param that can be eventually dropped,
and limit it to kernel-address mode only.
Problem with params is that they are ints so won't work for 64-bit
platforms. How about aborting if -fasan-shadow-offset is supplied
without -fsanitize=kernel-address?

-Y
Yury Gribov
2014-09-29 17:21:31 UTC
Permalink
Hi all,
Post by Yury Gribov
Kasan developers has asked for an option to override offset of Asan
shadow memory region. This should simplify experimenting with memory
layouts on 64-bit architectures.
New patch which checks that -fasan-shadow-offset is only enabled for
-fsanitize=kernel-address. I (unfortunately) can't make this --param
because this can be a 64-bit value.

Bootstrapped and regtested on x64.

-Y
Yury Gribov
2014-10-06 11:06:04 UTC
Permalink
Post by Yury Gribov
Hi all,
Post by Yury Gribov
Kasan developers has asked for an option to override offset of Asan
shadow memory region. This should simplify experimenting with memory
layouts on 64-bit architectures.
New patch which checks that -fasan-shadow-offset is only enabled for
-fsanitize=kernel-address. I (unfortunately) can't make this --param
because this can be a 64-bit value.
Bootstrapped and regtested on x64.
-Y
Yury Gribov
2014-10-06 11:17:17 UTC
Permalink
Post by Yury Gribov
Hi all,
Post by Yury Gribov
Kasan developers has asked for an option to override offset of Asan
shadow memory region. This should simplify experimenting with memory
layouts on 64-bit architectures.
New patch which checks that -fasan-shadow-offset is only enabled for
-fsanitize=kernel-address. I (unfortunately) can't make this --param
because this can be a 64-bit value.
Bootstrapped and regtested on x64.
-Y
Added Jakub.

Loading...