public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Crispin Cowan <crispin@novell.com>
To: Chris Wright <chrisw@osdl.org>
Cc: "David Härdeman" <david@2gen.com>,
	linux-kernel@vger.kernel.org, linux-security-module@wirex.com
Subject: Re: LSM root_plug module questions
Date: Tue, 30 Aug 2005 15:38:37 -0700	[thread overview]
Message-ID: <4314DFED.8030608@novell.com> (raw)
In-Reply-To: <20050830215518.GX7991@shell0.pdx.osdl.net>

Chris Wright wrote:
> * David Härdeman (david@2gen.com) wrote:
>   
>> 2) root_plug currently scans the usb device tree looking for the 
>> appropriate device each time it's needed. In the interest of making the 
>> result of the lookup cached, it is possible for a module to register so 
>> that it is notified when a usb device is added/removed?
>>     
> I don't think that can be done in a race free manner.  Perhaps get the
> device and check its state, but you'd have to ask usb folks.  ATM, it's
> only checked during exec of root process.
>   
Why do you want to optimize root_plug's scan for the device? Are you
planning on logging in thousands of times per second? If it was a big
RADIUS or SSO server, that would make sense, but this is the "are you
physically present at the console?" login security, so I submit that it
happens at most a couple of times per minute, and from there it does not
matter if it takes a second or two to scan the USB devices.

OTOH, it looks from the above comments that the root_plug may be checked
on *all* exec's of root processes. If that is the case, then you do have
more of an optimization issue. However, I then submit that the correct
optimization is to choke down the check so that it is only performed on
root exec's that represent logins rather than all execs, instead of
trying to make the check go faster.

Crispin
-- 
Crispin Cowan, Ph.D.                      http://crispincowan.com/~crispin/
Director of Software Engineering, Novell  http://novell.com


  reply	other threads:[~2005-08-30 22:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-30 21:31 LSM root_plug module questions David Härdeman
2005-08-30 21:55 ` Chris Wright
2005-08-30 22:38   ` Crispin Cowan [this message]
2005-08-31  8:04   ` David Härdeman

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=4314DFED.8030608@novell.com \
    --to=crispin@novell.com \
    --cc=chrisw@osdl.org \
    --cc=david@2gen.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@wirex.com \
    /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