Util-Linux Archive mirror
 help / color / mirror / Atom feed
From: "Michal Suchánek" <msuchanek@suse.de>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Chris Hofstaedtler <zeha@debian.org>, util-linux@vger.kernel.org
Subject: Re: [PATCH] libuuid: Move clock.txt to /run
Date: Wed, 1 Mar 2023 21:08:54 +0100	[thread overview]
Message-ID: <20230301200854.GD19419@kitsune.suse.cz> (raw)
In-Reply-To: <Y/+b+LlvuaDD4i4k@mit.edu>

On Wed, Mar 01, 2023 at 01:39:52PM -0500, Theodore Ts'o wrote:
> On Wed, Mar 01, 2023 at 06:17:59PM +0100, Michal Suchánek wrote:
> > > Using a random number generator for clock can help, but it's only 13
> > > bits, so it's certainly not fool-proof.  Given that using a time-based
> > > UUID leaks the MAC address of your ethernet port as well as when the
> > > UUID was generated (which can be interesting when you're curious say,
> > > when a Libreoffice doc was created), in general best practice is to
> > > use the random UUID type, especially given that modern Linux systems
> > > all have the getrandom(2) system call.  That gives you 58 bits of
> > > entropy in the UUID, so that's probably the better way to go.
> > 
> > That explains why I don't have a clock.txt file. I did not go out of my
> > way to generate time-based uuids.
> 
> Note that the only reason why you might be trying to generate a huge
> number of time-based UUID is if you are running a database (cough,

Thanks for the very detailed explanation.

I suppose the default is fine for most users then, and makes it
reasonably safe to use time basedd uuids for users of systems like
Raspberry Pi which exhibit weird time jumps, likely due to lack of RTC
battery.

uuidd is provided for people who want to generate large quantities of
UUIDs.

When somebody *really* wants and it improves their use case they can
mount tmpfs on /var/lib/libuuid/

Might be nice to write down in the uuid_generate man page if this is
coming up repeatedly.

Thanks

Michal

  reply	other threads:[~2023-03-01 20:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01 14:09 [PATCH] libuuid: Move clock.txt to /run Michal Suchanek
2023-03-01 14:17 ` Chris Hofstaedtler
2023-03-01 14:26   ` Michal Suchánek
2023-03-01 16:49     ` Theodore Ts'o
2023-03-01 17:17       ` Michal Suchánek
2023-03-01 18:39         ` Theodore Ts'o
2023-03-01 20:08           ` Michal Suchánek [this message]
2023-03-01 17:54 ` Karel Zak

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=20230301200854.GD19419@kitsune.suse.cz \
    --to=msuchanek@suse.de \
    --cc=tytso@mit.edu \
    --cc=util-linux@vger.kernel.org \
    --cc=zeha@debian.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).