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: <20100608083120.e92a7739.rdunlap@xenotime.net>
Date:	Tue, 8 Jun 2010 08:31:20 -0700
From:	Randy Dunlap <rdunlap@...otime.net>
To:	David VomLehn <dvomlehn@...co.com>
Cc:	to@...mlehn-lnx2.corp.sa.net, netdev@...r.kernel.org
Subject: Re: [PATCH][RFC] Infrastructure for out-of-band parameter passing

On Mon, 7 Jun 2010 17:30:49 -0700 David VomLehn wrote:

> Infrastructure to support out of band/indirect passing of data to functions.
> 
> It is useful at times to be able to pass data from one function to another
> nested many stack frames more deeply than the passing function. Doing so
> allows the interfaces in the intervening functions to be simpler, though
> this "hidden" information passing risks increased complexity. In cases
> where this is justified, this simple infrastructure provides the
> functionality.
> 
> Out of band data passing is implemented by adding, for each instance,
> an element to the task_struct that serves as the pointer to the top
> of a OOB parameter stack. Data is made available by being pushed
> on the OOB parameter stack by a function, and accessed via the top
> element of the OOB parameter stack.
> 
> Signed-off-by: David VomLehn (dvomlehn@...co.com)
> ---
>  include/linux/oobparam.h |   89 ++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 89 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/oobparam.h b/include/linux/oobparam.h
> new file mode 100644
> index 0000000..6eaa04c
> --- /dev/null
> +++ b/include/linux/oobparam.h
> @@ -0,0 +1,89 @@
...
> +
> +/**
> + * oobparam_push - push an out of band parameter frame on the OOB param stack
> + * @head	Pointer to the OOB parameter stack top, which must be in the
> + *		task structure.
> + * @frame	Pointer to the OOB parameter frame, generally embedded in
> + *		another structure

Need a colon ':' after the parameter names for kernel-doc notation:

 * @head:
 * @frame:

See Documentation/kernel-doc-nano-HOWTO.txt for info or ask me if you have
problems or questions.

Thanks.

> + */
> +static inline void oobparam_push(struct oobparam *top, struct oobparam *frame)
> +{
> +	frame->next = top;
> +	/* We need to ensure that the pointer in the frame is set prior to
> +	 * the pointer to the top in case we handle an interrupt in between
> +	 * the two stores. */
> +	wmb();
> +	top->next = frame;
> +}


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ