all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Brendan Tildesley <btild@mailbox.org>, 36508@debbugs.gnu.org
Subject: bug#36508: GDM files have incorrect owner after temporarily removing service
Date: Thu, 15 Apr 2021 19:04:30 -0400	[thread overview]
Message-ID: <87wnt3gndy.fsf@netris.org> (raw)
In-Reply-To: <878s5j8ga7.fsf@gnu.org>

Hi Ludovic,

Ludovic Courtès <ludo@gnu.org> writes:

> IDs as hash of the user names are interesting because that’d be
> stateless (conversely, the current ID allocation strategy is stateful:
> it arranges to not reuse recently-freed IDs.)
>
> But like you write, we’d need 32-bit UIDs.  In libc, ‘uid_t’
> (specifically ‘__UID_T_TYPE’ in typesizes.h) is 32-bit, so it might work
> rather well in user space.

The kernel and core system components certainly support 32-bit UIDs, and
have for around 20 years.

> It still sounds like a change with significant implications though, and
> it’s hard to predict exactly how it would go or what would break.

Right, my concern is with the vast majority of programs and libraries in
Guix, most of which probably haven't seen much (if any) testing with
large UIDs.

> For example, that does away with the system/non-system ranges, and
> wouldn’t play well with “special” IDs like 0 and 65535.

This particular issue is easily addressed.  It's easy enough to find a
function from 31-hash values to 32-bit IDs that's injective and avoids
any chosen subset of special IDs, as long as there are fewer than 2^31
special IDs.

Simply adding 65536 (or even 2^31) to the hash value would be one easy
option.

What do you think?

       Mark




  parent reply	other threads:[~2021-04-15 23:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-05  8:36 bug#36508: GDM files have incorrect owner after temporarily replacing with SDDM ison
2021-04-13 13:24 ` bug#36508: GDM files have incorrect owner after temporarily removing service Brendan Tildesley via Bug reports for GNU Guix
2021-04-13 20:51   ` Mark H Weaver
2021-04-14  4:31     ` Brendan Tildesley via Bug reports for GNU Guix
2021-04-15 18:09       ` Mark H Weaver
2021-04-14 10:32     ` Ludovic Courtès
2021-04-14 12:21       ` Brendan Tildesley via Bug reports for GNU Guix
2021-04-15 14:24         ` Ludovic Courtès
2021-04-15 18:30       ` Mark H Weaver
2021-04-15 20:05         ` Ludovic Courtès
2021-04-15 22:22           ` Mark H Weaver
2021-04-16 15:18             ` Ludovic Courtès
2021-04-17 16:16               ` Mark H Weaver
2021-04-15 23:04           ` Mark H Weaver [this message]
2021-04-16 15:14             ` Ludovic Courtès
2021-04-15 18:35       ` Mark H Weaver
2021-04-15 18:58       ` Mark H Weaver
2021-04-16 10:42         ` Maxime Devos
2021-04-17 16:28           ` Mark H Weaver
2022-09-18 12:22 ` bug#36508: [DRAFT PATCH] Stable allocation of uids, by keeping a historical mapping Maxime Devos

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=87wnt3gndy.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=36508@debbugs.gnu.org \
    --cc=btild@mailbox.org \
    --cc=ludo@gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

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.