From: Jose Luis Marchetti <joseluismarchetti@yahoo.com.br>
To: Robert Hancock <hancockr@shaw.ca>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: How to access a regular file from within a module ?
Date: Mon, 12 Jan 2009 07:51:13 -0800 (PST) [thread overview]
Message-ID: <113881.9018.qm@web34408.mail.mud.yahoo.com> (raw)
In-Reply-To: <496AC8D9.1020402@shaw.ca>
> One big problem with file access in the kernel is that all
> the file operations require a process context - they need a
> process to stick the file descriptor into, to determine
> access permissions, etc. If you just start calling file
> operations from inside the kernel you're essentially
> stealing whatever process you're being called from's
> context for these operations, which is unlikely to be a good
> idea.
>
> Not to mention, that accessing files from inside the kernel
> usually means the kernel enforces a policy on file
> naming/locations, and putting that sort of policy in the
> kernel is usually frowned upon.
OK, that is clear now.
>From all I read, it is possible to access files from within inside the kernel, but it would not be a good practice, thanks for the insights.
>
> In the case you're describing I'm not sure why you
> couldn't just store the keys in encrypted form inside
> the user app and have it write them back out when they
> change, instead of making the kernel do it..
Yes, that was one of the possible solutions I pointed out, and it might be the one I am going to use, thanks!
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com
next prev parent reply other threads:[~2009-01-12 15:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-11 3:44 How to access a regular file from within a module ? Jose Luis Marchetti
2009-01-11 5:35 ` Jon Masters
2009-01-11 6:13 ` H. Peter Anvin
2009-01-11 11:30 ` Alan Cox
2009-01-12 2:44 ` Jose Luis Marchetti
2009-01-12 4:36 ` Robert Hancock
2009-01-12 15:51 ` Jose Luis Marchetti [this message]
2009-01-12 22:25 ` Ben Nizette
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=113881.9018.qm@web34408.mail.mud.yahoo.com \
--to=joseluismarchetti@yahoo.com.br \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=hancockr@shaw.ca \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.