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: <877gmakinx.fsf@fleche.redhat.com>
Date:	Thu, 14 Feb 2013 08:40:50 -0700
From:	Tom Tromey <tromey@...hat.com>
To:	Jan Kiszka <jan.kiszka@...mens.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	Jason Wessel <jason.wessel@...driver.com>,
	kgdb-bugreport@...ts.sourceforge.net,
	Andi Kleen <andi@...stfloor.org>,
	Ben Widawsky <ben@...dawsk.net>, Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH v5 05/20] scripts/gdb: Add lx-symbols command

>>>>> "Jan" == Jan Kiszka <jan.kiszka@...mens.com> writes:

Jan> In addition, the command installs a silent breakpoint in the load_module
Jan> function at the point where the module was loaded but not yet
Jan> initialized. The breakpoint handler will try to load symbols from the
Jan> module files found during lx-symbols execution. This way, breakpoints
Jan> can be set to module initialization functions, and there is usually no
Jan> need to explicitly call lx-symbols after (re-)loading a module.

It is a nice approach, but I wonder whether the kernel's gdb stub could
use the existing qXfer:libraries remote protocol packet.  And, if not,
could we extend gdb to make it work.

Jan> +		def _find_breakpoint_location(self):
Jan> +			breakpoint_match = "^[0-9]*[\t]*err = parse_args\(.*"
Jan> +
Jan> +			src = gdb.execute("list kernel/module.c:load_module",
Jan> +					  to_string = True)

Whatever works -- but I think there are better ways.

The simplest is introducing a function that is called at the right spot
with the right arguments.  It doesn't need to do anything, just be a
name where you can put a breakpoint.

Jan> +	import symbols

I think it's better to put everything into its own package, e.g. 'import
linux.symbols', to try to avoid conflicts with other python modules that
may get loaded.

Tom
--
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