Re: [PATCH] leaking_addresses: add support for 32-bit kernel addresses

From: Tobin C. Harding
Date: Sun Dec 03 2017 - 19:11:30 EST


On Fri, Dec 01, 2017 at 06:39:07PM +0530, kaiwan.billimoria@xxxxxxxxx wrote:
> Hi,
>
> Applies upon the previous one in this thread.
> Found and fixed some minor issues with light testing on a 32-bit x86.
> (I realize this isn't an ideal description, forgive me!).
>
> Have also emitted a 'noisy' warning on PAGE_OFFSET fallback to 0xc00000000.
>
> Signed-off-by: Kaiwan N Billimoria <kaiwan.billimoria@xxxxxxxxx>
> ---
> scripts/leaking_addresses.pl | 17 ++++++++++-------
> 1 file changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/scripts/leaking_addresses.pl b/scripts/leaking_addresses.pl
> index fcf1ebe0f043..3a8691a642c8 100755
> --- a/scripts/leaking_addresses.pl
> +++ b/scripts/leaking_addresses.pl
> @@ -160,7 +160,6 @@ if (!$input_raw and ($squash_by_path or $squash_by_filename)) {
>
> if (!is_supported_architecture()) {
> show_detected_architecture() if $debug;
> -} else {
> printf "\nScript does not support your architecture, sorry.\n";
> printf "\nCurrently we support: \n\n";
> foreach(@SUPPORTED_ARCHITECTURES) {
> @@ -267,7 +266,7 @@ sub is_false_positive
> sub is_false_positive_ix86_32
> {
> my ($match) = @_;
> - state $page_offset = get_page_offset(); # only gets called once
> + state $page_offset = eval get_page_offset(); # only gets called once

Why do you use 'eval' here?

thanks,
Tobin.