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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 11 Nov 2013 09:41:49 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Ingo Molnar <mingo@...e.hu>,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] uprobes: Cleanup !CONFIG_UPROBES decls, unexport xol_area


* Oleg Nesterov <oleg@...hat.com> wrote:

> +++ b/kernel/events/uprobes.c
> @@ -86,6 +86,25 @@ struct return_instance {
>  };
>  
>  /*
> + * On a breakpoint hit, thread contests for a slot.  It frees the
> + * slot after singlestep. Currently a fixed number of slots are
> + * allocated.
> + */
> +struct xol_area {

So, my main complaint about the uprobes code isn't functional but 
documentational, similar to what I outlined a few days ago: what this 
comment does not explain is exactly what a 'XOL area' is.

You guys are changing code that reads like gobbledygook to people reading 
it for the first time. It's understandable that you want to use 
abbreviations and I don't object against that, but please explain key 
concepts and data structures when they first come up - a very good place 
to do that is in places where key structures are declared.

I didn't find any high level description of the XOL code, one which makes 
clear that how we manage these out of line execution areas:

 comet:~/tip> git grep -i 'out of line' $(find . -name '*uprobe*.[ch]')
 arch/powerpc/kernel/uprobes.c: * arch_uprobe_pre_xol - prepare to execute out of line.
 arch/x86/kernel/uprobes.c: * arch_uprobe_pre_xol - prepare to execute out of line.
 arch/x86/kernel/uprobes.c: * address pushed by a call instruction executed out of line.
 kernel/events/uprobes.c: * This area will be used for storing instructions for execution out of line.
 kernel/events/uprobes.c:/* Prepare to single-step probed instruction out of line. */

The one that comes closest is:

          * This area will be used for storing instructions for execution out of line.

... but that is a single sentence and deep inside the XOL code already.

Really, please make a better job of introducing other kernel hackers to 
the code you are writing ...

Maybe even split the XOL code out into kernel/events/uprobes_xol.c or so? 
That will give a natural place to explain yourselves at the beginning of 
the file.

Thanks,

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