From: Dominick Grift <dac.override@gmail.com>
To: Paul Moore <paul@paul-moore.com>
Cc: Paul Moore <pmoore@redhat.com>,
Dave Jones <davej@codemonkey.org.uk>,
Stephen Smalley <sds@epoch.ncsc.mil>,
James Morris <james.l.morris@oracle.com>,
selinux <selinux@tycho.nsa.gov>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: noisy selinux messages on tmpfs mount.
Date: Sat, 10 Jan 2015 10:24:29 +0100 [thread overview]
Message-ID: <1420881869.24061.17.camel@gmail.com> (raw)
In-Reply-To: <1420881085.24061.13.camel@gmail.com>
On Sat, 2015-01-10 at 10:11 +0100, Dominick Grift wrote:
> On Fri, 2015-01-09 at 22:12 -0500, Paul Moore wrote:
> > systemd has taken over cron too? I suppose that is a logical extension,
> > but still...
>
> That is were i think davej is wrong. Here is what i think is the
> scenario with cron.
>
> Cron runs jobs on behalf root. Root is generally not logged in all the
> time. So every time cron performs a job on behalf of root (hourly etc),
> systemd logind creates /run/user/0 and mounts tmpfs on it, when the job
> is done, tmpfs is unmounted and /run/user/= removed.
>
> In that sense cron acts as kind of a login program.
>
> Where i think davej might be wrong is that this would also happen with
> systemd's replacement for cron: timers.
>
> I suspect that systemd logind does not create 0 user runtime directory
> everytime a timer is triggered, as opposed to cron.
>
> with regard to normal user timers.Those really only work if you enable
> lingering on the systemd --user daemon with logind. This means that in
> practice the user is always logged in from a systemd logind user runtime
> directory point of view (e.g. /run/user/$UID is always there for a user
> that has a lingering systemd session daemon instance)
>
> In practice , i suspect that this means that, although now with cron
> were seeing logind mount tmpfs whenever some job of behalf of root is
> run if root is not physically loged in (which is often), that this would
> not be the case if we got rid of cron and if it would be replaced by
> systemd timers
>
> One might ask the question: why does logind create a root user runtime
> directory every time cron runs a job on behalf of root. Is that really
> required?
>
Never the less. On systems with many users login and out regularly you
will see this message often. because when a user logs in /run/user/$UID
is created and tmpfs is mounted on it. When the user logs out tmpfs is
unmounted, and /run/user/$UID is removed ... unless that users' systemd
--user instance is lingering.
> >
> > --
> > paul moore
> > www.paul-moore.com
> >
> >
> >
> > On January 9, 2015 4:01:29 PM Dominick Grift <dac.override@gmail.com> wrote:
> >
> > > On Fri, 2015-01-09 at 15:55 -0500, Paul Moore wrote:
> > > > On Friday, January 09, 2015 02:13:29 PM Dave Jones wrote:
> > > > > On Fri, Jan 09, 2015 at 08:06:49AM -0500, Stephen Smalley wrote:
> > > > > > We already reduced that message to KERN_DEBUG. Is that not sufficient?
> > > > >
> > > > > That doesn't really help with the flooding of dmesg, so no.
> > > > > I should also note that it's not just logging in that creates a new
> > > > > session, it also seems to be getting triggered by cron jobs, or
> > > > > whatever the systemd replacement is.
> > > >
> > > > I wonder if this is cron/systemd/whatever creating a new namespace and
> > > > mounting a new tmpfs in the namespace? If yes, I wonder if we could
> > > limit the
> > > > messages to the initial namespace ... ?
> > > >
> > >
> > > It is systemd logind creating sessions (e.g. creating /run/user/$UID and
> > > mounting a tmpfs on it)
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > > the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > > Please read the FAQ at http://www.tux.org/lkml/
> >
> >
>
>
prev parent reply other threads:[~2015-01-10 9:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-08 19:08 noisy selinux messages on tmpfs mount Dave Jones
2015-01-08 19:34 ` Paul Moore
2015-01-08 19:38 ` Dave Jones
2015-01-08 19:39 ` Paul Moore
2015-01-09 13:06 ` Stephen Smalley
2015-01-09 19:13 ` Dave Jones
2015-01-09 20:47 ` Stephen Smalley
2015-01-12 14:51 ` Christopher J. PeBenito
2015-01-12 15:06 ` Paul Moore
2015-01-12 15:53 ` Stephen Smalley
2015-01-09 20:55 ` Paul Moore
2015-01-09 21:01 ` Dominick Grift
2015-01-10 3:12 ` Paul Moore
2015-01-10 9:11 ` Dominick Grift
2015-01-10 9:24 ` Dominick Grift [this message]
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=1420881869.24061.17.camel@gmail.com \
--to=dac.override@gmail.com \
--cc=davej@codemonkey.org.uk \
--cc=james.l.morris@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=pmoore@redhat.com \
--cc=sds@epoch.ncsc.mil \
--cc=selinux@tycho.nsa.gov \
/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