lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181031115910.5bqgtnzf2zujnp5b@holly.lan>
Date:   Wed, 31 Oct 2018 11:59:10 +0000
From:   Daniel Thompson <daniel.thompson@...aro.org>
To:     Douglas Anderson <dianders@...omium.org>
Cc:     Jason Wessel <jason.wessel@...driver.com>,
        "Tobin C . Harding" <me@...in.cc>, joe@...ches.com,
        stable@...r.kernel.org, kgdb-bugreport@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kdb: Fix btc (backtrace on each cpu) crash

On Tue, Oct 30, 2018 at 01:53:34PM -0700, Douglas Anderson wrote:
> Typing 'btc' on kdb doing all sorts of fail.  Sometimes it would
> crash, sometimes display nothing, and sometimes hang.
> 
> Bisect tracked this down to the commit ad67b74d2469 ("printk: hash
> addresses printed with %p"), suggesting an obvious fix.  The pointer
> used internally in kdb shouldn't be hashed, so switch it to %px.
> 
> Fixes: ad67b74d2469 ("printk: hash addresses printed with %p")
> Cc: stable@...r.kernel.org
> Signed-off-by: Douglas Anderson <dianders@...omium.org>

I think we've already got a fix for this:
https://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb.git/commit/?h=kgdb-next&id=a0ca72c2d1ac83d0853a23ffde8f3624648b1ee8


Daniel.

> ---
> 
>  kernel/debug/kdb/kdb_bt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/debug/kdb/kdb_bt.c b/kernel/debug/kdb/kdb_bt.c
> index 6ad4a9fcbd6f..7921ae4fca8d 100644
> --- a/kernel/debug/kdb/kdb_bt.c
> +++ b/kernel/debug/kdb/kdb_bt.c
> @@ -179,14 +179,14 @@ kdb_bt(int argc, const char **argv)
>  				kdb_printf("no process for cpu %ld\n", cpu);
>  				return 0;
>  			}
> -			sprintf(buf, "btt 0x%p\n", KDB_TSK(cpu));
> +			sprintf(buf, "btt 0x%px\n", KDB_TSK(cpu));
>  			kdb_parse(buf);
>  			return 0;
>  		}
>  		kdb_printf("btc: cpu status: ");
>  		kdb_parse("cpu\n");
>  		for_each_online_cpu(cpu) {
> -			sprintf(buf, "btt 0x%p\n", KDB_TSK(cpu));
> +			sprintf(buf, "btt 0x%px\n", KDB_TSK(cpu));
>  			kdb_parse(buf);
>  			touch_nmi_watchdog();
>  		}
> -- 
> 2.19.1.568.g152ad8e336-goog
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ