From: Randy Dunlap <randy.dunlap@oracle.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Andi Kleen <ak@suse.de>,
Andrew Morton <akpm@linux-foundation.org>,
lkml <linux-kernel@vger.kernel.org>,
Chris Wright <chrisw@sous-sol.org>,
Rusty Russell <rusty@rustcorp.com.au>,
David Howells <dhowells@redhat.com>,
Bj?rn Steinbrink <B.Steinbrink@gmx.de>
Subject: Re: [patch 3/4] split usermodehelper setup from execution
Date: Tue, 8 May 2007 15:01:56 -0700 [thread overview]
Message-ID: <20070508150156.402980c6.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20070508205517.256147592@goop.org>
On Tue, 08 May 2007 13:51:32 -0700 Jeremy Fitzhardinge wrote:
> --- a/kernel/kmod.c
> +++ b/kernel/kmod.c
> @@ -253,11 +262,94 @@ static void __call_usermodehelper(struct
> }
>
> /**
> - * call_usermodehelper_keys - start a usermode application
> - * @path: pathname for the application
> - * @argv: null-terminated argument list
> - * @envp: null-terminated environment list
> - * @session_keyring: session keyring for process (NULL for an empty keyring)
> + * call_usermodehelper_setup - prepare to call a usermode helper
> + * @path - path to usermode executable
> + * @argv - arg vector for process
> + * @envp - environment for process
s / - /: / above please.
> + *
> + * Returns either NULL on allocation failure, or a subprocess_info
> + * structure. This should be passed to call_usermodehelper_exec to
> + * exec the process and free the structure.
> + */
> +struct subprocess_info *call_usermodehelper_setup(char *path,
> + char **argv, char **envp)
> +{
> +}
> +EXPORT_SYMBOL(call_usermodehelper_setup);
> +
> +/**
> + * call_usermodehelper_setkeys - set the session keys for usermode helper
> + * @info - a subprocess_info returned by call_usermodehelper_setup
> + * @session_keyring - the session keyring for the process
and here.
> + */
> +
> +/**
> + * call_usermodehelper_setcleanup - set a cleanup function
> + * @info - a subprocess_info returned by call_usermodehelper_setup
> + * @cleanup - a cleanup function
again.
> + *
> + * The cleanup function is just befor ethe subprocess_info is about to
> + * be freed. This can be used for freeing the argv and envp. The
> + * Function must be runnable in either a process context or the
> + * context in which call_usermodehelper_exec is called.
> + */
> +void call_usermodehelper_setcleanup(struct subprocess_info *info,
> + void (*cleanup)(char **argv, char **envp))
> +{
> + info->cleanup = cleanup;
> +}
> +EXPORT_SYMBOL(call_usermodehelper_setcleanup);
> +
> +/**
> + * call_usermodehelper_stdinpipe - set up a pipe to be used for stdin
> + * @sub_info - a subprocess_info returned by call_usermodehelper_setup
> + * @filp - set to the write-end of a pipe
again.
> + *
> + * This constructs a pipe, and sets the read end to be the stdin of the
> + * subprocess, and returns the write-end in *@filp.
> + */
> +int call_usermodehelper_stdinpipe(struct subprocess_info *sub_info,
> + struct file **filp)
> +{
> +}
> +EXPORT_SYMBOL(call_usermodehelper_stdinpipe);
...
> +/**
> + * call_usermodehelper_pipe - call a usermode helper process with a pipe stdin
> + * @path - path to usermode executable
> + * @argv - arg vector for process
> + * @envp - environment for process
> + * @filp - set to the write-end of a pipe
and here.
> + *
> + * This is a simple wrapper which executes a usermode-helper function
> + * with a pipe as stdin. It is implemented entirely in terms of
> + * lower-level call_usermodehelper_* functions.
> + */
> int call_usermodehelper_pipe(char *path, char **argv, char **envp,
> struct file **filp)
> {
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
next prev parent reply other threads:[~2007-05-08 21:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-08 20:51 [patch 0/4] A series of cleanup patches Jeremy Fitzhardinge
2007-05-08 20:51 ` [patch 1/4] add kstrndup Jeremy Fitzhardinge
2007-05-08 21:56 ` Randy Dunlap
2007-05-08 20:51 ` [patch 2/4] add argv_split() Jeremy Fitzhardinge
2007-05-08 21:59 ` Randy Dunlap
2007-05-08 22:31 ` Jan Engelhardt
2007-05-08 22:36 ` Jeremy Fitzhardinge
2007-05-08 20:51 ` [patch 3/4] split usermodehelper setup from execution Jeremy Fitzhardinge
2007-05-08 22:01 ` Randy Dunlap [this message]
2007-05-08 22:00 ` Jeremy Fitzhardinge
2007-05-08 22:10 ` Randy Dunlap
2007-05-08 23:49 ` Rusty Russell
2007-05-09 0:00 ` Jeremy Fitzhardinge
2007-05-08 20:51 ` [patch 4/4] Add common orderly_poweroff() Jeremy Fitzhardinge
2007-05-08 21:45 ` Len Brown
2007-05-08 22:06 ` Randy Dunlap
2007-05-09 12:52 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070508150156.402980c6.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=B.Steinbrink@gmx.de \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=chrisw@sous-sol.org \
--cc=dhowells@redhat.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®