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]
Date:	Fri, 16 Mar 2012 11:04:10 -0500
From:	Jason Wessel <jason.wessel@...driver.com>
To:	Jan Kiszka <jan.kiszka@...mens.com>
CC:	<linux-kernel@...r.kernel.org>,
	<kgdb-bugreport@...ts.sourceforge.net>
Subject: Re: [PATCH 2/4] kgdb: Make gdbstub_exit a nop unless gdb is attached

On 03/16/2012 07:17 AM, Jan Kiszka wrote:
> This allows to call gdbstub_exit without worrying if
> - CONFIG_KGDB is enabled
> - if an kgdb I/O driver is loaded
> - if a gdb frontend is currently attached

If you took a look at the alternate patch I sent in the 4 of 4 response, I made a modification for kdb to continue to work properly, namely disconnect and do not emit characters if we are in kdb mode.

>
> diff --git a/kernel/debug/gdbstub.c b/kernel/debug/gdbstub.c
> index c22d8c2..5d7ed0a 100644
> --- a/kernel/debug/gdbstub.c
> +++ b/kernel/debug/gdbstub.c
> @@ -1111,6 +1111,9 @@ void gdbstub_exit(int status)
> unsigned char checksum, ch, buffer[3];
> int loop;
>
> + if (!dbg_io_ops || !kgdb_connected)
> + return;
> +
> buffer[0] = 'W';
> buffer[1] = hex_asc_hi(status);
> buffer[2] = hex_asc_lo(status);

I patched against what you originally had there.

--- a/kernel/debug/gdbstub.c
+++ b/kernel/debug/gdbstub.c
@@ -1110,8 +1110,11 @@ void gdbstub_exit(int status)
 {
        unsigned char checksum, ch, buffer[3];
        int loop;
+       if (!kgdb_connected)
+               return;
+       kgdb_connected = 0;
 
-       if (!dbg_io_ops || !kgdb_connected)
+       if (!dbg_io_ops || dbg_kdb_mode)
                return;
 
        buffer[0] = 'W';

---

Depending on what we come to agreement on with patches 2-4 in your series I'll fold the changes into the reboot notifier.

It is possible to have both the reboot notifier and the low level modifications to the arch specific reboot hooks as a final catch, but I am interested to see what you think about just using the reboot notifier.

Cheers,
Jason.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ