public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: Andrew Morton <akpm@osdl.org>
Cc: andrea@suse.de, linux-kernel@vger.kernel.org, kenneth.w.chen@intel.com
Subject: Re: disable-cap-mlock
Date: Thu, 1 Apr 2004 10:59:28 -0800	[thread overview]
Message-ID: <20040401185928.GK791@holomorphy.com> (raw)
In-Reply-To: <20040401103425.03ba8aff.akpm@osdl.org>

On Thu, Apr 01, 2004 at 10:34:25AM -0800, Andrew Morton wrote:
> What is the Oracle requirement in detail?
> If it's for access to hugetlbfs then there are the uid= and gid= mount
> options.
> If it's for access to SHM_HUGETLB then there was some discussion about
> extending the uid= thing to shm, but nothing happened.  This could be
> resurrected.
> If it's just generally for the ability to mlock lots of memory then
> RLIMIT_MEMLOCK would be preferable.  I don't see why we'd need the sysctl
> when `ulimit -m' is available?  (Where is that patch btw?)

I don't speak for Oracle (obviously), but it's basically for non-root
users to get at the stuff. There's an issue with a few pieces of
userspace that drive the kernel's capability bits being nonstandard
and/or broken (out-of-date? I can't even find the stuff).

DB2 gets away with using the C capability libraries directly because
its launcher scripts are basically setuid, then it arranges to avoid
dropping the capabilities. This is actually not ideal even for DB2, and
other databases don't use analogous launching scripts able to do this.

The "right" way from the userspace angle is basically either pam_cap or
the mlock rlimit, so when you log in as the database user, you get the
capabilities and/or rlimits. I don't appear to be able to decipher
what's going on with pam_cap and I'm not entirely sure anyone else has
either. The mlock rlimits appear to have a more coherent userspace
support story, and are "supposed" to be there anyway. The implementation
just seems to be missing pieces.


William Lee Irwin III <wli@holomorphy.com> wrote:
>> There are a couple of off-by-ones in there I've got fixes for below.

On Thu, Apr 01, 2004 at 10:34:25AM -0800, Andrew Morton wrote:
> Using the security framework is neat.  There are currently large spinlock
> contention problems in avc_has_perm_noaudit() which I suspect will make
> SELinux problematic in some server environments.  But I trust it is
> possible to disable SELinux in config while using Bill's security module?
> I guess we could live with sysctl which simply nukes CAP_IPC_LOCK, but it
> has to be the when-all-else-failed option, yes?

The module I wrote acts as one of a number of different alternative
security policies (choosable at compile-time, and even at runtime if
I'd figured out how to actually do loadable modules properly). The
entire callback infrastructure configures out, and choices of security
models configure each other out in turn. It's somewhat more general
than it has to be, and amounts to what's basically a semi-open security
model with the monotonic etc. properties of capabilities removed since
r/w fs access to /proc/sys/capabilities/* entails all others. In theory,
this could be used for other things (CAP_SYS_NICE and CAP_SYS_RAWIO
come to mind), though I'm not aware of any outcry for things like this
for any other capabilities but CAP_IPC_LOCK.

I guess I can say that I'm not actually very wild about the security
module I wrote myself (it was more of an isolation-from-the-core effort
than a thing I wanted in and of itself). Some pieces may be able to be
made safer for users with Steven's suggestions.


-- wli

  parent reply	other threads:[~2004-04-01 18:59 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-01 13:59 disable-cap-mlock Andrea Arcangeli
2004-04-01 14:12 ` disable-cap-mlock Martin Zwickel
2004-04-01 16:48 ` disable-cap-mlock William Lee Irwin III
2004-04-01 16:59   ` disable-cap-mlock Andrea Arcangeli
2004-04-01 17:11     ` disable-cap-mlock Marc-Christian Petersen
2004-04-01 17:16     ` disable-cap-mlock William Lee Irwin III
2004-04-01 17:34       ` disable-cap-mlock Andrea Arcangeli
2004-04-01 17:38         ` disable-cap-mlock William Lee Irwin III
2004-04-01 17:42           ` disable-cap-mlock Andrea Arcangeli
2004-04-01 17:37       ` disable-cap-mlock Stephen Smalley
2004-04-01 17:44         ` disable-cap-mlock William Lee Irwin III
2004-04-01 17:49           ` disable-cap-mlock Andrea Arcangeli
2004-04-01 17:51           ` disable-cap-mlock William Lee Irwin III
2004-04-01 18:12             ` disable-cap-mlock William Lee Irwin III
2004-04-01 17:52           ` disable-cap-mlock Marc-Christian Petersen
2004-04-01 17:54             ` disable-cap-mlock William Lee Irwin III
2004-04-01 18:47               ` disable-cap-mlock Stephen Smalley
2004-04-01 19:26                 ` disable-cap-mlock William Lee Irwin III
2004-04-01 20:23                   ` disable-cap-mlock Marc-Christian Petersen
2004-04-01 21:13                     ` disable-cap-mlock William Lee Irwin III
2004-04-01 21:31                       ` disable-cap-mlock Marc-Christian Petersen
2004-04-01 18:34       ` disable-cap-mlock Andrew Morton
2004-04-01 18:49         ` disable-cap-mlock Andrea Arcangeli
2004-04-01 18:52         ` disable-cap-mlock Chen, Kenneth W
2004-04-01 18:59         ` William Lee Irwin III [this message]
2004-04-01 19:27         ` disable-cap-mlock James Morris
2004-04-02 10:39   ` disable-cap-mlock Pavel Machek
2004-04-02 23:44     ` disable-cap-mlock William Lee Irwin III
2004-04-01 19:44 ` disable-cap-mlock Rik van Riel
2004-04-01 19:52   ` disable-cap-mlock Andrew Morton
2004-04-01 22:36     ` disable-cap-mlock Andrea Arcangeli
2004-04-01 22:43       ` disable-cap-mlock Marc-Christian Petersen
2004-04-01 23:08       ` disable-cap-mlock Rik van Riel
2004-04-01 23:26         ` disable-cap-mlock Andrea Arcangeli
2004-04-02  0:59           ` disable-cap-mlock Chris Wright
2004-04-01 22:29   ` disable-cap-mlock Andrea Arcangeli
2004-04-02  1:07 ` disable-cap-mlock Chris Wright
2004-04-02  1:18   ` disable-cap-mlock Andrea Arcangeli
2004-04-02  1:30     ` disable-cap-mlock Chris Wright
2004-04-02  1:35       ` disable-cap-mlock Andrea Arcangeli
2004-04-02  2:04         ` disable-cap-mlock Chris Wright
2004-04-02  2:13           ` disable-cap-mlock Andrea Arcangeli
2004-04-02  2:21             ` disable-cap-mlock Chris Wright
2004-04-02  2:38               ` disable-cap-mlock Andrea Arcangeli
2004-04-02  2:48                 ` disable-cap-mlock Chris Wright
2004-04-02  1:30   ` disable-cap-mlock Andrew Morton
2004-04-02  1:59     ` disable-cap-mlock Chris Wright
2004-04-02  2:09       ` disable-cap-mlock Andrea Arcangeli
2004-04-02  2:30         ` disable-cap-mlock Andrew Morton
2004-04-02  2:33           ` disable-cap-mlock Chris Wright
2004-04-02  2:45             ` disable-cap-mlock Andrew Morton
2004-04-02  2:51               ` disable-cap-mlock Chris Wright
2004-04-02  3:21                 ` disable-cap-mlock William Lee Irwin III
2004-04-02  2:41           ` disable-cap-mlock Andrea Arcangeli
2004-04-02  2:49             ` disable-cap-mlock Andrew Morton
2004-04-02  3:07               ` disable-cap-mlock Andrea Arcangeli
2004-04-02 21:35     ` disable-cap-mlock Andrew Morton
2004-04-02 22:36       ` disable-cap-mlock Chris Wright
2004-04-02 22:56         ` disable-cap-mlock Andrea Arcangeli
2004-04-02 23:01         ` disable-cap-mlock Andrew Morton
2004-04-02 23:18           ` disable-cap-mlock Chris Wright
2004-04-05 12:13       ` disable-cap-mlock Stephen Smalley

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=20040401185928.GK791@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=akpm@osdl.org \
    --cc=andrea@suse.de \
    --cc=kenneth.w.chen@intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox