All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] static-nodes: indicate that creation of static nodes should only happen at boot
@ 2014-10-27 16:55 Tom Gundersen
  2014-10-28  2:31 ` Lucas De Marchi
  0 siblings, 1 reply; 7+ messages in thread
From: Tom Gundersen @ 2014-10-27 16:55 UTC (permalink / raw)
  To: linux-modules; +Cc: Tom Gundersen

udev will only manage static nodes that exist at the time udev is started, so
creating static nodes later on will likely not behave as expected. In
particular, recreating the static nodes at run-time will reset any permissions
udev may have applied to the nodes at boot.

See <https://bugzilla.redhat.com/show_bug.cgi?id=1147248> and the discussion
following <http://permalink.gmane.org/gmane.comp.sysutils.systemd.devel/23795>.

Note that this requires (the yet to be released) systemd v217 or a backport
of systemd patch 8c94052ee543c3598a3c7b0c46688150aa2c6168.
---
 tools/static-nodes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/static-nodes.c b/tools/static-nodes.c
index 0195390..4bdacc8 100644
--- a/tools/static-nodes.c
+++ b/tools/static-nodes.c
@@ -95,7 +95,7 @@ static int write_tmpfiles(FILE *out, char modname[], char devname[], char type,
 			return EXIT_FAILURE;
 	}
 
-	ret = fprintf(out, "%c /dev/%s 0600 - - - %u:%u\n",
+	ret = fprintf(out, "%c! /dev/%s 0600 - - - %u:%u\n",
 		      type, devname, maj, min);
 	if (ret < 0)
 		return EXIT_FAILURE;
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] static-nodes: indicate that creation of static nodes should only happen at boot
  2014-10-27 16:55 [PATCH] static-nodes: indicate that creation of static nodes should only happen at boot Tom Gundersen
@ 2014-10-28  2:31 ` Lucas De Marchi
  2014-10-28 11:16   ` Tom Gundersen
  0 siblings, 1 reply; 7+ messages in thread
From: Lucas De Marchi @ 2014-10-28  2:31 UTC (permalink / raw)
  To: Tom Gundersen; +Cc: linux-modules

On Mon, Oct 27, 2014 at 2:55 PM, Tom Gundersen <teg@jklm.no> wrote:
> udev will only manage static nodes that exist at the time udev is started, so
> creating static nodes later on will likely not behave as expected. In
> particular, recreating the static nodes at run-time will reset any permissions
> udev may have applied to the nodes at boot.
>
> See <https://bugzilla.redhat.com/show_bug.cgi?id=1147248> and the discussion
> following <http://permalink.gmane.org/gmane.comp.sysutils.systemd.devel/23795>.
>
> Note that this requires (the yet to be released) systemd v217 or a backport
> of systemd patch 8c94052ee543c3598a3c7b0c46688150aa2c6168.

Is this patch going to systemd-stable?

-- 
Lucas De Marchi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] static-nodes: indicate that creation of static nodes should only happen at boot
  2014-10-28  2:31 ` Lucas De Marchi
@ 2014-10-28 11:16   ` Tom Gundersen
  2014-10-28 11:23     ` Tom Gundersen
  0 siblings, 1 reply; 7+ messages in thread
From: Tom Gundersen @ 2014-10-28 11:16 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: linux-modules, Zbyszek Jedrzejewski-Szmek

On Tue, Oct 28, 2014 at 3:31 AM, Lucas De Marchi
<lucas.de.marchi@gmail.com> wrote:
> On Mon, Oct 27, 2014 at 2:55 PM, Tom Gundersen <teg@jklm.no> wrote:
>> udev will only manage static nodes that exist at the time udev is started, so
>> creating static nodes later on will likely not behave as expected. In
>> particular, recreating the static nodes at run-time will reset any permissions
>> udev may have applied to the nodes at boot.
>>
>> See <https://bugzilla.redhat.com/show_bug.cgi?id=1147248> and the discussion
>> following <http://permalink.gmane.org/gmane.comp.sysutils.systemd.devel/23795>.
>>
>> Note that this requires (the yet to be released) systemd v217 or a backport
>> of systemd patch 8c94052ee543c3598a3c7b0c46688150aa2c6168.
>
> Is this patch going to systemd-stable?

I think that makes sense, as the current status is broken in distros.
Not entirely sure though, as the --boot logic is new functionality.
Zbigniew, what do you think?

Cheers,

Tom

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] static-nodes: indicate that creation of static nodes should only happen at boot
  2014-10-28 11:16   ` Tom Gundersen
@ 2014-10-28 11:23     ` Tom Gundersen
  2014-10-28 13:21       ` Zbigniew Jędrzejewski-Szmek
  0 siblings, 1 reply; 7+ messages in thread
From: Tom Gundersen @ 2014-10-28 11:23 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: linux-modules, Zbyszek Jedrzejewski-Szmek

On Tue, Oct 28, 2014 at 12:16 PM, Tom Gundersen <teg@jklm.no> wrote:
> On Tue, Oct 28, 2014 at 3:31 AM, Lucas De Marchi
> <lucas.de.marchi@gmail.com> wrote:
>> On Mon, Oct 27, 2014 at 2:55 PM, Tom Gundersen <teg@jklm.no> wrote:
>>> udev will only manage static nodes that exist at the time udev is started, so
>>> creating static nodes later on will likely not behave as expected. In
>>> particular, recreating the static nodes at run-time will reset any permissions
>>> udev may have applied to the nodes at boot.
>>>
>>> See <https://bugzilla.redhat.com/show_bug.cgi?id=1147248> and the discussion
>>> following <http://permalink.gmane.org/gmane.comp.sysutils.systemd.devel/23795>.
>>>
>>> Note that this requires (the yet to be released) systemd v217 or a backport
>>> of systemd patch 8c94052ee543c3598a3c7b0c46688150aa2c6168.
>>
>> Is this patch going to systemd-stable?
>
> I think that makes sense, as the current status is broken in distros.
> Not entirely sure though, as the --boot logic is new functionality.
> Zbigniew, what do you think?

Sorry, I misread the commit logs. The --boot logic is already in
stable, and I think my follow up patch should also go there.

Cheers,

Tom

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] static-nodes: indicate that creation of static nodes should only happen at boot
  2014-10-28 11:23     ` Tom Gundersen
@ 2014-10-28 13:21       ` Zbigniew Jędrzejewski-Szmek
  2014-10-28 14:45         ` Tom Gundersen
  0 siblings, 1 reply; 7+ messages in thread
From: Zbigniew Jędrzejewski-Szmek @ 2014-10-28 13:21 UTC (permalink / raw)
  To: Tom Gundersen; +Cc: Lucas De Marchi, linux-modules

On Tue, Oct 28, 2014 at 12:23:53PM +0100, Tom Gundersen wrote:
> On Tue, Oct 28, 2014 at 12:16 PM, Tom Gundersen <teg@jklm.no> wrote:
> > On Tue, Oct 28, 2014 at 3:31 AM, Lucas De Marchi
> > <lucas.de.marchi@gmail.com> wrote:
> >> On Mon, Oct 27, 2014 at 2:55 PM, Tom Gundersen <teg@jklm.no> wrote:
> >>> udev will only manage static nodes that exist at the time udev is started, so
> >>> creating static nodes later on will likely not behave as expected. In
> >>> particular, recreating the static nodes at run-time will reset any permissions
> >>> udev may have applied to the nodes at boot.
> >>>
> >>> See <https://bugzilla.redhat.com/show_bug.cgi?id=1147248> and the discussion
> >>> following <http://permalink.gmane.org/gmane.comp.sysutils.systemd.devel/23795>.
> >>>
> >>> Note that this requires (the yet to be released) systemd v217 or a backport
> >>> of systemd patch 8c94052ee543c3598a3c7b0c46688150aa2c6168.
> >>
> >> Is this patch going to systemd-stable?
> >
> > I think that makes sense, as the current status is broken in distros.
> > Not entirely sure though, as the --boot logic is new functionality.
> > Zbigniew, what do you think?
Yeah, I'll pull it into -stable.

(But the kmod patch doesn't really depend on your patch 'units:
tmpfiles-setup-dev - allow unsafe file creation to happen in /dev at
boot', just on the --boot functionality, which I think was done for F20,
so can be considered available.)

Zbyszek

> Sorry, I misread the commit logs. The --boot logic is already in
> stable, and I think my follow up patch should also go there.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] static-nodes: indicate that creation of static nodes should only happen at boot
  2014-10-28 13:21       ` Zbigniew Jędrzejewski-Szmek
@ 2014-10-28 14:45         ` Tom Gundersen
  2014-10-28 18:50           ` Lucas De Marchi
  0 siblings, 1 reply; 7+ messages in thread
From: Tom Gundersen @ 2014-10-28 14:45 UTC (permalink / raw)
  To: Zbigniew Jędrzejewski-Szmek; +Cc: Lucas De Marchi, linux-modules

On Tue, Oct 28, 2014 at 2:21 PM, Zbigniew J=C4=99drzejewski-Szmek
<zbyszek@in.waw.pl> wrote:
> On Tue, Oct 28, 2014 at 12:23:53PM +0100, Tom Gundersen wrote:
>> On Tue, Oct 28, 2014 at 12:16 PM, Tom Gundersen <teg@jklm.no> wrote:
>> > On Tue, Oct 28, 2014 at 3:31 AM, Lucas De Marchi
>> > <lucas.de.marchi@gmail.com> wrote:
>> >> On Mon, Oct 27, 2014 at 2:55 PM, Tom Gundersen <teg@jklm.no> wrote:
>> >>> udev will only manage static nodes that exist at the time udev is st=
arted, so
>> >>> creating static nodes later on will likely not behave as expected. I=
n
>> >>> particular, recreating the static nodes at run-time will reset any p=
ermissions
>> >>> udev may have applied to the nodes at boot.
>> >>>
>> >>> See <https://bugzilla.redhat.com/show_bug.cgi?id=3D1147248> and the =
discussion
>> >>> following <http://permalink.gmane.org/gmane.comp.sysutils.systemd.de=
vel/23795>.
>> >>>
>> >>> Note that this requires (the yet to be released) systemd v217 or a b=
ackport
>> >>> of systemd patch 8c94052ee543c3598a3c7b0c46688150aa2c6168.
>> >>
>> >> Is this patch going to systemd-stable?
>> >
>> > I think that makes sense, as the current status is broken in distros.
>> > Not entirely sure though, as the --boot logic is new functionality.
>> > Zbigniew, what do you think?
> Yeah, I'll pull it into -stable.
>
> (But the kmod patch doesn't really depend on your patch 'units:
> tmpfiles-setup-dev - allow unsafe file creation to happen in /dev at
> boot', just on the --boot functionality, which I think was done for F20,
> so can be considered available.)

It is true that even F20 will parse the new kmod.conf file correctly,
but since --boot is not passed to tmpfiles, the entries will be
ignored. So you really want that patch as well.

Cheers,

Tom

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] static-nodes: indicate that creation of static nodes should only happen at boot
  2014-10-28 14:45         ` Tom Gundersen
@ 2014-10-28 18:50           ` Lucas De Marchi
  0 siblings, 0 replies; 7+ messages in thread
From: Lucas De Marchi @ 2014-10-28 18:50 UTC (permalink / raw)
  To: Tom Gundersen; +Cc: Zbigniew Jędrzejewski-Szmek, linux-modules

On Tue, Oct 28, 2014 at 12:45 PM, Tom Gundersen <teg@jklm.no> wrote:
> On Tue, Oct 28, 2014 at 2:21 PM, Zbigniew J=C4=99drzejewski-Szmek
> <zbyszek@in.waw.pl> wrote:
>> On Tue, Oct 28, 2014 at 12:23:53PM +0100, Tom Gundersen wrote:
>>> On Tue, Oct 28, 2014 at 12:16 PM, Tom Gundersen <teg@jklm.no> wrote:
>>> > On Tue, Oct 28, 2014 at 3:31 AM, Lucas De Marchi
>>> > <lucas.de.marchi@gmail.com> wrote:
>>> >> On Mon, Oct 27, 2014 at 2:55 PM, Tom Gundersen <teg@jklm.no> wrote:
>>> >>> udev will only manage static nodes that exist at the time udev is s=
tarted, so
>>> >>> creating static nodes later on will likely not behave as expected. =
In
>>> >>> particular, recreating the static nodes at run-time will reset any =
permissions
>>> >>> udev may have applied to the nodes at boot.
>>> >>>
>>> >>> See <https://bugzilla.redhat.com/show_bug.cgi?id=3D1147248> and the=
 discussion
>>> >>> following <http://permalink.gmane.org/gmane.comp.sysutils.systemd.d=
evel/23795>.
>>> >>>
>>> >>> Note that this requires (the yet to be released) systemd v217 or a =
backport
>>> >>> of systemd patch 8c94052ee543c3598a3c7b0c46688150aa2c6168.
>>> >>
>>> >> Is this patch going to systemd-stable?
>>> >
>>> > I think that makes sense, as the current status is broken in distros.
>>> > Not entirely sure though, as the --boot logic is new functionality.
>>> > Zbigniew, what do you think?
>> Yeah, I'll pull it into -stable.
>>
>> (But the kmod patch doesn't really depend on your patch 'units:
>> tmpfiles-setup-dev - allow unsafe file creation to happen in /dev at
>> boot', just on the --boot functionality, which I think was done for F20,
>> so can be considered available.)
>
> It is true that even F20 will parse the new kmod.conf file correctly,
> but since --boot is not passed to tmpfiles, the entries will be
> ignored. So you really want that patch as well.

Yeah, as far as I can see you need that as well.

Applied.

--=20
Lucas De Marchi

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-10-28 18:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-27 16:55 [PATCH] static-nodes: indicate that creation of static nodes should only happen at boot Tom Gundersen
2014-10-28  2:31 ` Lucas De Marchi
2014-10-28 11:16   ` Tom Gundersen
2014-10-28 11:23     ` Tom Gundersen
2014-10-28 13:21       ` Zbigniew Jędrzejewski-Szmek
2014-10-28 14:45         ` Tom Gundersen
2014-10-28 18:50           ` Lucas De Marchi

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.