mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
tree-wide: "<n>bit" → "<n>-bit"
In some places, "<n> bits" is used when more appropriate.
This commit is contained in:
parent
221332ee13
commit
da89046643
24
NEWS
24
NEWS
@ -1173,7 +1173,7 @@ CHANGES WITH 253:
|
||||
sd_bus_emit_signal_tov(), and sd_bus_message_new_signal_to().
|
||||
|
||||
* sd-id128 functions now return -EUCLEAN (instead of -EIO) when the
|
||||
128bit ID in files such as /etc/machine-id has an invalid
|
||||
128-bit ID in files such as /etc/machine-id has an invalid
|
||||
format. They also accept NULL as output parameter in more places,
|
||||
which is useful when the caller only wants to validate the inputs and
|
||||
does not need the output value.
|
||||
@ -1568,7 +1568,7 @@ CHANGES WITH 252 🎃:
|
||||
|
||||
* libsystemd now exports sd_bus_error_setfv() (a convenience function
|
||||
for setting bus errors), sd_id128_string_equal (a convenience
|
||||
function for 128bit ID string comparisons), and
|
||||
function for 128-bit ID string comparisons), and
|
||||
sd_bus_message_read_strv_extend() (a function to incrementally read
|
||||
string arrays).
|
||||
|
||||
@ -2030,7 +2030,7 @@ CHANGES WITH 251:
|
||||
of activated home directories it manages (if the kernel and selected
|
||||
file systems support it). So far it mapped three UID ranges: the
|
||||
range from 0…60000, the user's own UID, and the range 60514…65534,
|
||||
leaving everything else unmapped (in other words, the 16bit UID range
|
||||
leaving everything else unmapped (in other words, the 16-bit UID range
|
||||
is mapped almost fully, with the exception of the UID subrange used
|
||||
for systemd-homed users, with one exception: the user's own UID).
|
||||
Unmapped UIDs may not be used for file ownership in the home
|
||||
@ -5894,7 +5894,7 @@ CHANGES WITH 245:
|
||||
systemd-timedated.
|
||||
|
||||
* The systemd-id128 tool gained a new "show" verb for listing or
|
||||
resolving a number of well-known UUIDs/128bit IDs, currently mostly
|
||||
resolving a number of well-known UUIDs/128-bit IDs, currently mostly
|
||||
GPT partition table types.
|
||||
|
||||
* The Discoverable Partitions Specification has been updated to support
|
||||
@ -6174,7 +6174,7 @@ CHANGES WITH 244:
|
||||
path as the system manager.
|
||||
|
||||
* The systemd-id128 tool gained a new switch "-u" (or "--uuid") for
|
||||
outputting the 128bit IDs in UUID format (i.e. in the "canonical
|
||||
outputting the 128-bit IDs in UUID format (i.e. in the "canonical
|
||||
representation").
|
||||
|
||||
* Service units gained a new sandboxing option ProtectKernelLogs= which
|
||||
@ -6242,7 +6242,7 @@ CHANGES WITH 243:
|
||||
|
||||
* On 64 bit systems, the "kernel.pid_max" sysctl is now bumped to
|
||||
4194304 by default, i.e. the full 22bit range the kernel allows, up
|
||||
from the old 16bit range. This should improve security and
|
||||
from the old 16-bit range. This should improve security and
|
||||
robustness, as PID collisions are made less likely (though certainly
|
||||
still possible). There are rumours this might create compatibility
|
||||
problems, though at this moment no practical ones are known to
|
||||
@ -6557,7 +6557,7 @@ CHANGES WITH 243:
|
||||
with gcc's cleanup extension.
|
||||
|
||||
* The sd-id128.h public API gained a new definition
|
||||
SD_ID128_UUID_FORMAT_STR for formatting a 128bit ID in UUID format
|
||||
SD_ID128_UUID_FORMAT_STR for formatting a 128-bit ID in UUID format
|
||||
with printf().
|
||||
|
||||
* "busctl introspect" gained a new switch --xml-interface for dumping
|
||||
@ -7337,7 +7337,7 @@ CHANGES WITH 240:
|
||||
ID.
|
||||
|
||||
* A new tool systemd-id128 has been added that can be used to determine
|
||||
and generate various 128bit IDs.
|
||||
and generate various 128-bit IDs.
|
||||
|
||||
* /etc/os-release gained two new standardized fields DOCUMENTATION_URL=
|
||||
and LOGO=.
|
||||
@ -7492,7 +7492,7 @@ CHANGES WITH 240:
|
||||
is improved.
|
||||
|
||||
* sd-id128.h learnt two new auxiliary helpers: sd_id128_is_allf() and
|
||||
SD_ID128_ALLF to test if a 128bit ID is set to all 0xFF bytes, and to
|
||||
SD_ID128_ALLF to test if a 128-bit ID is set to all 0xFF bytes, and to
|
||||
initialize one to all 0xFF.
|
||||
|
||||
* After loading the SELinux policy systemd will now recursively relabel
|
||||
@ -9219,9 +9219,9 @@ CHANGES WITH 233:
|
||||
Verity root partitions when systemd boots up. In order to make use of
|
||||
this your partition setup should follow the Discoverable Partitions
|
||||
Specification, and the GPT partition ID of the root file system
|
||||
partition should be identical to the upper 128bit of the Verity root
|
||||
partition should be identical to the upper 128-bit of the Verity root
|
||||
hash. The GPT partition ID of the Verity partition protecting it
|
||||
should be the lower 128bit of the Verity root hash. If the partition
|
||||
should be the lower 128-bit of the Verity root hash. If the partition
|
||||
image follows this model it is sufficient to specify a single
|
||||
"roothash=" kernel command line argument to both configure which root
|
||||
image and verity partition to use as well as the root hash for
|
||||
@ -9654,7 +9654,7 @@ CHANGES WITH 232:
|
||||
|
||||
* The service manager learnt a new "invocation ID" concept for invoked
|
||||
services. Each runtime cycle of a service will get a new invocation
|
||||
ID (a 128bit random UUID) assigned that identifies the current
|
||||
ID (a 128-bit random UUID) assigned that identifies the current
|
||||
run of the service uniquely and globally. A new invocation ID
|
||||
is generated each time a service starts up. The journal will store
|
||||
the invocation ID of a service along with any logged messages, thus
|
||||
|
@ -67,7 +67,7 @@ variables. All EFI variables use the vendor UUID
|
||||
identifier that was booted. It is set by the boot loader and read by
|
||||
the OS in order to identify which entry has been used for the current boot.
|
||||
|
||||
* The EFI variable `LoaderFeatures` contains a 64bit unsigned integer with a
|
||||
* The EFI variable `LoaderFeatures` contains a 64-bit unsigned integer with a
|
||||
number of flags bits that are set by the boot loader and passed to the OS and
|
||||
indicate the features the boot loader supports. Specifically, the following
|
||||
bits are defined:
|
||||
|
@ -27,7 +27,7 @@ boot. For that it's essential to:
|
||||
1. Remove the
|
||||
[`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/machine-id.html)
|
||||
file or write the string `uninitialized\n` into it. This file is supposed to
|
||||
carry a 128bit identifier unique to the system. Only when it is reset it
|
||||
carry a 128-bit identifier unique to the system. Only when it is reset it
|
||||
will be auto-generated on first boot and thus be truly unique. If this file
|
||||
is not reset, and carries a valid ID every instance of the system will come
|
||||
up with the same ID and that will likely lead to problems sooner or later,
|
||||
|
@ -118,7 +118,7 @@ SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
compatibility. Since we typically want to allow adding new enum values to an
|
||||
existing enum type with later API versions, please use the
|
||||
`_SD_ENUM_FORCE_S64()` macro in the enum definition, which forces the size of
|
||||
the enum to be signed 64bit wide.
|
||||
the enum to be signed 64-bit wide.
|
||||
|
||||
- Empty lines to separate code blocks are a good thing, please add them
|
||||
abundantly. However, please stick to one at a time, i.e. multiple empty lines
|
||||
|
@ -74,7 +74,7 @@ not contain any control character, nor use `\uXXX` escaping.
|
||||
|
||||
When it comes to JSON numbers, this specification assumes that JSON parsers
|
||||
processing this information are capable of reproducing the full signed 53bit
|
||||
integer range (i.e. -2⁵³+1…+2⁵³-1) as well as the full 64bit IEEE floating
|
||||
integer range (i.e. -2⁵³+1…+2⁵³-1) as well as the full 64-bit IEEE floating
|
||||
point number range losslessly (with the exception of NaN/-inf/+inf, since JSON
|
||||
cannot encode that), as per recommendations of
|
||||
[RFC8259](https://datatracker.ietf.org/doc/html/rfc8259#page-8). Fields in
|
||||
|
@ -33,7 +33,7 @@ same field of user records. A string.
|
||||
`service` → A string, an identifier for the service managing this group record
|
||||
(this field is typically in reverse domain name syntax.)
|
||||
|
||||
`lastChangeUSec` → An unsigned 64bit integer, a timestamp (in µs since the UNIX
|
||||
`lastChangeUSec` → An unsigned 64-bit integer, a timestamp (in µs since the UNIX
|
||||
epoch 1970) of the last time the group record has been modified. (Covers only
|
||||
the `regular`, `perMachine` and `privileged` sections).
|
||||
|
||||
|
@ -19,7 +19,7 @@ When exporting journal data for other uses or transferring it via the network/lo
|
||||
|
||||
* Two journal entries that follow each other are separated by a double newline.
|
||||
* Journal fields consisting only of valid non-control UTF-8 codepoints are serialized as they are (i.e. the field name, followed by '=', followed by field data), followed by a newline as separator to the next field. Note that fields containing newlines cannot be formatted like this. Non-control UTF-8 codepoints are the codepoints with value at or above 32 (' '), or equal to 9 (TAB).
|
||||
* Other journal fields are serialized in a special binary safe way: field name, followed by newline, followed by a binary 64bit little endian size value, followed by the binary field data, followed by a newline as separator to the next field.
|
||||
* Other journal fields are serialized in a special binary safe way: field name, followed by newline, followed by a binary 64-bit little endian size value, followed by the binary field data, followed by a newline as separator to the next field.
|
||||
* Entry metadata that is not actually a field is serialized like it was a field, but beginning with two underscores. More specifically, `__CURSOR=`, `__REALTIME_TIMESTAMP=`, `__MONOTONIC_TIMESTAMP=`, `__SEQNUM=`, `__SEQNUM_ID` are introduced this way. Note that these meta-fields are only generated when actual journal files are serialized. They are omitted for entries that do not originate from a journal file (for example because they are transferred for the first time to be stored in one). Or in other words: if you are generating this format you shouldn't care about these special double-underscore fields. But you might find them usable when you deserialize the format generated by us. Additional fields prefixed with two underscores might be added later on, your parser should skip over the fields it does not know.
|
||||
* The order in which fields appear in an entry is undefined and might be different for each entry that is serialized.
|
||||
And that's already it.
|
||||
|
@ -71,15 +71,15 @@ thread](https://lists.freedesktop.org/archives/systemd-devel/2012-October/007054
|
||||
|
||||
## Basics
|
||||
|
||||
* All offsets, sizes, time values, hashes (and most other numeric values) are 32bit/64bit unsigned integers in LE format.
|
||||
* All offsets, sizes, time values, hashes (and most other numeric values) are 32-bit/64-bit unsigned integers in LE format.
|
||||
* Offsets are always relative to the beginning of the file.
|
||||
* The 64bit hash function siphash24 is used for newer journal files. For older files [Jenkins lookup3](https://en.wikipedia.org/wiki/Jenkins_hash_function) is used, more specifically `jenkins_hashlittle2()` with the first 32bit integer it returns as higher 32bit part of the 64bit value, and the second one uses as lower 32bit part.
|
||||
* All structures are aligned to 64bit boundaries and padded to multiples of 64bit
|
||||
* The 64-bit hash function siphash24 is used for newer journal files. For older files [Jenkins lookup3](https://en.wikipedia.org/wiki/Jenkins_hash_function) is used, more specifically `jenkins_hashlittle2()` with the first 32-bit integer it returns as higher 32-bit part of the 64-bit value, and the second one uses as lower 32-bit part.
|
||||
* All structures are aligned to 64-bit boundaries and padded to multiples of 64-bit
|
||||
* The format is designed to be read and written via memory mapping using multiple mapped windows.
|
||||
* All time values are stored in usec since the respective epoch.
|
||||
* Wall clock time values are relative to the Unix time epoch, i.e. January 1st, 1970. (`CLOCK_REALTIME`)
|
||||
* Monotonic time values are always stored jointly with the kernel boot ID value (i.e. `/proc/sys/kernel/random/boot_id`) they belong to. They tend to be relative to the start of the boot, but aren't for containers. (`CLOCK_MONOTONIC`)
|
||||
* Randomized, unique 128bit IDs are used in various locations. These are generally UUID v4 compatible, but this is not a requirement.
|
||||
* Randomized, unique 128-bit IDs are used in various locations. These are generally UUID v4 compatible, but this is not a requirement.
|
||||
|
||||
## General Rules
|
||||
|
||||
@ -547,7 +547,7 @@ plus their respective hashes (which are calculated the same way as in the DATA
|
||||
objects, i.e. keyed by the file ID).
|
||||
|
||||
If the `HEADER_INCOMPATIBLE_COMPACT` flag is set, DATA object offsets are stored
|
||||
as 32-bit integers instead of 64bit and the unused hash field per data object is
|
||||
as 32-bit integers instead of 64-bit and the unused hash field per data object is
|
||||
not stored anymore.
|
||||
|
||||
In the file ENTRY objects are written ordered monotonically by sequence
|
||||
@ -615,7 +615,7 @@ arrays are strictly sorted by offsets on disk, and hence by their timestamps
|
||||
and sequence numbers (with some restrictions, see above).
|
||||
|
||||
If the `HEADER_INCOMPATIBLE_COMPACT` flag is set, offsets are stored as 32-bit
|
||||
integers instead of 64bit.
|
||||
integers instead of 64-bit.
|
||||
|
||||
Entry Arrays are chained up. If one entry array is full another one is
|
||||
allocated and the **next_entry_array_offset** field of the old one pointed to
|
||||
|
@ -70,7 +70,7 @@ key `FOO` with a value `BAR` is serialized `F`, `O`, `O`, `=`, `B`, `A`, `R`,
|
||||
|
||||
* The second method should be used if the value of a field contains a `\n`
|
||||
byte. In this case, the key name is serialized as is, followed by a `\n`
|
||||
character, followed by a (non-aligned) little-endian unsigned 64bit integer
|
||||
character, followed by a (non-aligned) little-endian unsigned 64-bit integer
|
||||
encoding the size of the value, followed by the literal value data, followed by
|
||||
`\n`. Example: a key `FOO` with a value `BAR` may be serialized using this
|
||||
second method as: `F`, `O`, `O`, `\n`, `\003`, `\000`, `\000`, `\000`, `\000`,
|
||||
|
@ -18,14 +18,14 @@ validity for GIDs too.
|
||||
|
||||
## Special Linux UIDs
|
||||
|
||||
In theory, the range of the C type `uid_t` is 32bit wide on Linux,
|
||||
In theory, the range of the C type `uid_t` is 32-bit wide on Linux,
|
||||
i.e. 0…4294967295. However, four UIDs are special on Linux:
|
||||
|
||||
1. 0 → The `root` super-user
|
||||
|
||||
2. 65534 → The `nobody` UID, also called the "overflow" UID or similar. It's
|
||||
where various subsystems map unmappable users to, for example file systems
|
||||
only supporting 16bit UIDs, NFS or user namespacing. (The latter can be
|
||||
only supporting 16-bit UIDs, NFS or user namespacing. (The latter can be
|
||||
changed with a sysctl during runtime, but that's not supported on
|
||||
`systemd`. If you do change it you void your warranty.) Because Fedora is a
|
||||
bit confused the `nobody` user is called `nfsnobody` there (and they have a
|
||||
@ -33,13 +33,13 @@ i.e. 0…4294967295. However, four UIDs are special on Linux:
|
||||
though. (Also, some distributions call the `nobody` group `nogroup`. I wish
|
||||
they didn't.)
|
||||
|
||||
3. 4294967295, aka "32bit `(uid_t) -1`" → This UID is not a valid user ID, as
|
||||
3. 4294967295, aka "32-bit `(uid_t) -1`" → This UID is not a valid user ID, as
|
||||
`setresuid()`, `chown()` and friends treat -1 as a special request to not
|
||||
change the UID of the process/file. This UID is hence not available for
|
||||
assignment to users in the user database.
|
||||
|
||||
4. 65535, aka "16bit `(uid_t) -1`" → Before Linux kernel 2.4 `uid_t` used to be
|
||||
16bit, and programs compiled for that would hence assume that `(uid_t) -1`
|
||||
4. 65535, aka "16-bit `(uid_t) -1`" → Before Linux kernel 2.4 `uid_t` used to be
|
||||
16-bit, and programs compiled for that would hence assume that `(uid_t) -1`
|
||||
is 65535. This UID is hence not usable either.
|
||||
|
||||
The `nss-systemd` glibc NSS module will synthesize user database records for
|
||||
@ -108,7 +108,7 @@ but downstreams are strongly advised against doing that.)
|
||||
2. 61184…65519 → UIDs for dynamic users are allocated from this range (see the
|
||||
`DynamicUser=` documentation in
|
||||
[`systemd.exec(5)`](https://www.freedesktop.org/software/systemd/man/systemd.exec.html)). This
|
||||
range has been chosen so that it is below the 16bit boundary (i.e. below
|
||||
range has been chosen so that it is below the 16-bit boundary (i.e. below
|
||||
65535), in order to provide compatibility with container environments that
|
||||
assign a 64K range of UIDs to containers using user namespacing. This range
|
||||
is above the 60000 boundary, so that its allocations are unlikely to be
|
||||
@ -122,15 +122,15 @@ but downstreams are strongly advised against doing that.)
|
||||
|
||||
3. 524288…1879048191 → UID range for `systemd-nspawn`'s automatic allocation of
|
||||
per-container UID ranges. When the `--private-users=pick` switch is used (or
|
||||
`-U`) then it will automatically find a so far unused 16bit subrange of this
|
||||
`-U`) then it will automatically find a so far unused 16-bit subrange of this
|
||||
range and assign it to the container. The range is picked so that the upper
|
||||
16bit of the 32bit UIDs are constant for all users of the container, while
|
||||
the lower 16bit directly encode the 65536 UIDs assigned to the
|
||||
container. This mode of allocation means that the upper 16bit of any UID
|
||||
assigned to a container are kind of a "container ID", while the lower 16bit
|
||||
16-bit of the 32-bit UIDs are constant for all users of the container, while
|
||||
the lower 16-bit directly encode the 65536 UIDs assigned to the
|
||||
container. This mode of allocation means that the upper 16-bit of any UID
|
||||
assigned to a container are kind of a "container ID", while the lower 16-bit
|
||||
directly expose the container's own UID numbers. If you wonder why precisely
|
||||
these numbers, consider them in hexadecimal: 0x00080000…0x6FFFFFFF. This
|
||||
range is above the 16bit boundary. Moreover it's below the 31bit boundary,
|
||||
range is above the 16-bit boundary. Moreover it's below the 31-bit boundary,
|
||||
as some broken code (specifically: the kernel's `devpts` file system)
|
||||
erroneously considers UIDs signed integers, and hence can't deal with values
|
||||
above 2^31. The `systemd-machined.service` service will synthesize user
|
||||
@ -185,7 +185,7 @@ assign to your containers, here are a few recommendations:
|
||||
|
||||
1. Definitely, don't assign less than 65536 UIDs/GIDs. After all the `nobody`
|
||||
user has magic properties, and hence should be available in your container, and
|
||||
given that it's assigned the UID 65534, you should really cover the full 16bit
|
||||
given that it's assigned the UID 65534, you should really cover the full 16-bit
|
||||
range in your container. Note that systemd will — as mentioned — synthesize
|
||||
user records for the `nobody` user, and assumes its availability in various
|
||||
other parts of its codebase, too, hence assigning fewer users means you lose
|
||||
@ -195,15 +195,15 @@ other packages make similar restrictions.
|
||||
2. While it's fine to assign more than 65536 UIDs/GIDs to a container, there's
|
||||
most likely not much value in doing so, as Linux distributions won't use the
|
||||
higher ranges by default (as mentioned neither `adduser` nor `systemd`'s
|
||||
dynamic user concept allocate from above the 16bit range). Unless you actively
|
||||
dynamic user concept allocate from above the 16-bit range). Unless you actively
|
||||
care for nested containers, it's hence probably a good idea to allocate exactly
|
||||
65536 UIDs per container, and neither less nor more. A pretty side-effect is
|
||||
that by doing so, you expose the same number of UIDs per container as Linux 2.2
|
||||
supported for the whole system, back in the days.
|
||||
|
||||
3. Consider allocating UID ranges for containers so that the first UID you
|
||||
assign has the lower 16bits all set to zero. That way, the upper 16bits become
|
||||
a container ID of some kind, while the lower 16bits directly encode the
|
||||
assign has the lower 16-bits all set to zero. That way, the upper 16-bits become
|
||||
a container ID of some kind, while the lower 16-bits directly encode the
|
||||
internal container UID. This is the way `systemd-nspawn` allocates UID ranges
|
||||
(see above). Following this allocation logic ensures best compatibility with
|
||||
`systemd-nspawn` and all other container managers following the scheme, as it
|
||||
@ -212,7 +212,7 @@ as that's what they do, too. Moreover, it makes `chown()`ing container file
|
||||
system trees nicely robust to interruptions: as the external UID encodes the
|
||||
internal UID in a fixed way, it's very easy to adjust the container's base UID
|
||||
without the need to know the original base UID: to change the container base,
|
||||
just mask away the upper 16bit, and insert the upper 16bit of the new container
|
||||
just mask away the upper 16-bit, and insert the upper 16-bit of the new container
|
||||
base instead. Here are the easy conversions to derive the internal UID, the
|
||||
external UID, and the container base UID from each other:
|
||||
|
||||
@ -264,17 +264,17 @@ i.e. somewhere below `/var/` or similar.
|
||||
| 6…999 | System users | Distributions | `/etc/passwd` |
|
||||
| 1000…60000 | Regular users | Distributions | `/etc/passwd` + LDAP/NIS/… |
|
||||
| 60001…60513 | Human users (homed) | `systemd` | `nss-systemd` |
|
||||
| 60514…60577 | Host users mapped into containers | `systemd` | `systemd-nspawn` |
|
||||
| 60514…60577 | Host users mapped into containers | `systemd` | `systemd-nspawn` |
|
||||
| 60578…61183 | Unused | | |
|
||||
| 61184…65519 | Dynamic service users | `systemd` | `nss-systemd` |
|
||||
| 65520…65533 | Unused | | |
|
||||
| 65534 | `nobody` user | Linux | `/etc/passwd` + `nss-systemd` |
|
||||
| 65535 | 16bit `(uid_t) -1` | Linux | |
|
||||
| 65535 | 16-bit `(uid_t) -1` | Linux | |
|
||||
| 65536…524287 | Unused | | |
|
||||
| 524288…1879048191 | Container UID ranges | `systemd` | `nss-systemd` |
|
||||
| 1879048192…2147483647 | Unused | | |
|
||||
| 2147483648…4294967294 | HIC SVNT LEONES | | |
|
||||
| 4294967295 | 32bit `(uid_t) -1` | Linux | |
|
||||
| 4294967295 | 32-bit `(uid_t) -1` | Linux | |
|
||||
|
||||
Note that "Unused" in the table above doesn't mean that these ranges are
|
||||
really unused. It just means that these ranges have no well-established
|
||||
@ -285,7 +285,7 @@ ranges.
|
||||
Note that the range 2147483648…4294967294 (i.e. 2^31…2^32-2) should be handled
|
||||
with care. Various programs (including kernel file systems — see `devpts` — or
|
||||
even kernel syscalls – see `setfsuid()`) have trouble with UIDs outside of the
|
||||
signed 32bit range, i.e any UIDs equal to or above 2147483648. It is thus
|
||||
signed 32-bit range, i.e any UIDs equal to or above 2147483648. It is thus
|
||||
strongly recommended to stay away from this range in order to avoid
|
||||
complications. This range should be considered reserved for future, special
|
||||
purposes.
|
||||
|
@ -269,13 +269,13 @@ disposition of a user automatically from a record even in absence of this
|
||||
field, based on other fields, for example the numeric UID. By setting this
|
||||
field explicitly applications can override this default determination.
|
||||
|
||||
`lastChangeUSec` → An unsigned 64bit integer value, referring to a timestamp in µs
|
||||
`lastChangeUSec` → An unsigned 64-bit integer value, referring to a timestamp in µs
|
||||
since the epoch 1970, indicating when the user record (specifically, any of the
|
||||
`regular`, `privileged`, `perMachine` sections) was last changed. This field is
|
||||
used when comparing two records of the same user to identify the newer one, and
|
||||
is used for example for automatic updating of user records, where appropriate.
|
||||
|
||||
`lastPasswordChangeUSec` → Similar, also an unsigned 64bit integer value,
|
||||
`lastPasswordChangeUSec` → Similar, also an unsigned 64-bit integer value,
|
||||
indicating the point in time the password (or any authentication token) of the
|
||||
user was last changed. This corresponds to the `sp_lstchg` field of `struct
|
||||
spwd`, i.e. the matching field in the user shadow database `/etc/shadow`,
|
||||
@ -338,7 +338,7 @@ i.e. logins are permitted. This field corresponds to the `sp_expire` field of
|
||||
`struct spwd` (i.e. the `/etc/shadow` data for a user) being set to zero or
|
||||
one.
|
||||
|
||||
`notBeforeUSec` → An unsigned 64bit integer value, indicating a time in µs since
|
||||
`notBeforeUSec` → An unsigned 64-bit integer value, indicating a time in µs since
|
||||
the UNIX epoch (1970) before which the record should be considered invalid for
|
||||
the purpose of logging in.
|
||||
|
||||
@ -360,7 +360,7 @@ mounted from a Windows File Share. The five latter types are primarily used by
|
||||
`systemd-homed` when managing home directories, but may be used if other
|
||||
managers are used too. If this is not set, `classic` is the implied default.
|
||||
|
||||
`diskSize` → An unsigned 64bit integer, indicating the intended home directory
|
||||
`diskSize` → An unsigned 64-bit integer, indicating the intended home directory
|
||||
disk space in bytes to assign to the user. Depending on the selected storage
|
||||
type this might be implemented differently: for `luks` this is the intended size
|
||||
of the file system and LUKS volume, while for the others this likely translates
|
||||
@ -378,7 +378,7 @@ directory is first created, and defaults to `/etc/skel` if not defined.
|
||||
`accessMode` → Takes an unsigned integer in the range 0…511 indicating the UNIX
|
||||
access mask for the home directory when it is first created.
|
||||
|
||||
`tasksMax` → Takes an unsigned 64bit integer indicating the maximum number of
|
||||
`tasksMax` → Takes an unsigned 64-bit integer indicating the maximum number of
|
||||
tasks the user may start in parallel during system runtime. This counts
|
||||
all tasks (i.e. threads, where each process is at least one thread) the user starts or that are
|
||||
forked from these processes even if the user identity is changed (for example
|
||||
@ -387,7 +387,7 @@ by setuid binaries/`su`/`sudo` and similar).
|
||||
enforces this by setting the `TasksMax` slice property for the user's slice
|
||||
`user-$UID.slice`.
|
||||
|
||||
`memoryHigh`/`memoryMax` → These take unsigned 64bit integers indicating upper
|
||||
`memoryHigh`/`memoryMax` → These take unsigned 64-bit integers indicating upper
|
||||
memory limits for all processes of the user (plus all processes forked off them
|
||||
that might have changed user identity), in bytes. Enforced by
|
||||
[`systemd-logind.service`](https://www.freedesktop.org/software/systemd/man/systemd-logind.service.html),
|
||||
@ -490,20 +490,20 @@ the PBKDF operation for the LUKS storage mechanism.
|
||||
|
||||
`luksPbkdfType` → A string, indicating the PBKDF type to use for the LUKS storage mechanism.
|
||||
|
||||
`luksPbkdfForceIterations` → An unsigned 64bit integer, indicating the intended
|
||||
`luksPbkdfForceIterations` → An unsigned 64-bit integer, indicating the intended
|
||||
number of iterations for the PBKDF operation, when LUKS storage is used.
|
||||
|
||||
`luksPbkdfTimeCostUSec` → An unsigned 64bit integer, indicating the intended
|
||||
`luksPbkdfTimeCostUSec` → An unsigned 64-bit integer, indicating the intended
|
||||
time cost for the PBKDF operation, when the LUKS storage mechanism is used, in
|
||||
µs. Ignored when `luksPbkdfForceIterations` is set.
|
||||
|
||||
`luksPbkdfMemoryCost` → An unsigned 64bit integer, indicating the intended
|
||||
`luksPbkdfMemoryCost` → An unsigned 64-bit integer, indicating the intended
|
||||
memory cost for the PBKDF operation, when LUKS storage is used, in bytes.
|
||||
|
||||
`luksPbkdfParallelThreads` → An unsigned 64bit integer, indicating the intended
|
||||
`luksPbkdfParallelThreads` → An unsigned 64-bit integer, indicating the intended
|
||||
required parallel threads for the PBKDF operation, when LUKS storage is used.
|
||||
|
||||
`luksSectorSize` → An unsigned 64bit integer, indicating the sector size to
|
||||
`luksSectorSize` → An unsigned 64-bit integer, indicating the sector size to
|
||||
use for the LUKS storage mechanism, in bytes. Must be a power of two between
|
||||
512 and 4096.
|
||||
|
||||
@ -524,13 +524,13 @@ record. It is recommended to use reverse domain name notation for this. For
|
||||
example, if `systemd-homed` manages a user a string of `io.systemd.Home` is
|
||||
used for this.
|
||||
|
||||
`rateLimitIntervalUSec` → An unsigned 64bit integer that configures the
|
||||
`rateLimitIntervalUSec` → An unsigned 64-bit integer that configures the
|
||||
authentication rate limiting enforced on the user account. This specifies a
|
||||
timer interval (in µs) within which to count authentication attempts. When the
|
||||
counter goes above the value configured n `rateLimitIntervalBurst` log-ins are
|
||||
temporarily refused until the interval passes.
|
||||
|
||||
`rateLimitIntervalBurst` → An unsigned 64bit integer, closely related to
|
||||
`rateLimitIntervalBurst` → An unsigned 64-bit integer, closely related to
|
||||
`rateLimitIntervalUSec`, that puts a limit on authentication attempts within
|
||||
the configured time interval.
|
||||
|
||||
@ -543,7 +543,7 @@ it is bypassed.
|
||||
auto-login. Systems are supposed to automatically log in a user marked this way
|
||||
during boot, if there's exactly one user on it defined this way.
|
||||
|
||||
`stopDelayUSec` → An unsigned 64bit integer, indicating the time in µs the
|
||||
`stopDelayUSec` → An unsigned 64-bit integer, indicating the time in µs the
|
||||
per-user service manager is kept around after the user fully logged out. This
|
||||
value is honored by
|
||||
[`systemd-logind.service`](https://www.freedesktop.org/software/systemd/man/systemd-logind.service.html). If
|
||||
@ -557,17 +557,17 @@ automatically killed when the user logs out. This is enforced by
|
||||
[`systemd-logind.service`](https://www.freedesktop.org/software/systemd/man/systemd-logind.service.html). If
|
||||
false any processes left around when the user logs out are left running.
|
||||
|
||||
`passwordChangeMinUSec`/`passwordChangeMaxUSec` → An unsigned 64bit integer,
|
||||
`passwordChangeMinUSec`/`passwordChangeMaxUSec` → An unsigned 64-bit integer,
|
||||
encoding how much time has to pass at least/at most between password changes of
|
||||
the user. This corresponds with the `sp_min` and `sp_max` fields of `struct
|
||||
spwd` (i.e. the `/etc/shadow` entries of the user), but offers finer
|
||||
granularity.
|
||||
|
||||
`passwordChangeWarnUSec` → An unsigned 64bit integer, encoding how much time to
|
||||
`passwordChangeWarnUSec` → An unsigned 64-bit integer, encoding how much time to
|
||||
warn the user before their password expires, in µs. This corresponds with the
|
||||
`sp_warn` field of `struct spwd`.
|
||||
|
||||
`passwordChangeInactiveUSec` → An unsigned 64bit integer, encoding how much
|
||||
`passwordChangeInactiveUSec` → An unsigned 64-bit integer, encoding how much
|
||||
time has to pass after the password expired that the account is
|
||||
deactivated. This corresponds with the `sp_inact` field of `struct spwd`.
|
||||
|
||||
@ -717,7 +717,7 @@ in full).
|
||||
|
||||
The following fields are defined in this section:
|
||||
|
||||
`matchMachineId` → An array of strings that are formatted 128bit IDs in
|
||||
`matchMachineId` → An array of strings that are formatted 128-bit IDs in
|
||||
hex. If any of the specified IDs match the system's local machine ID
|
||||
(i.e. matches `/etc/machine-id`) the fields in this object are honored.
|
||||
|
||||
@ -799,26 +799,26 @@ sub-object of the top-level user record object is keyed by the machine ID,
|
||||
which points to the object with the fields defined here. The following fields
|
||||
are defined:
|
||||
|
||||
`diskUsage` → An unsigned 64bit integer. The currently used disk space of the
|
||||
`diskUsage` → An unsigned 64-bit integer. The currently used disk space of the
|
||||
home directory in bytes. This value might be determined in different ways,
|
||||
depending on the selected storage mechanism. For LUKS storage this is the file
|
||||
size of the loopback file or block device size. For the
|
||||
directory/subvolume/fscrypt storage this is the current disk space used as
|
||||
reported by the file system quota subsystem.
|
||||
|
||||
`diskFree` → An unsigned 64bit integer, denoting the number of "free" bytes in
|
||||
`diskFree` → An unsigned 64-bit integer, denoting the number of "free" bytes in
|
||||
the disk space allotment, i.e. usually the difference between the disk size as
|
||||
reported by `diskSize` and the used already as reported in `diskFree`, but
|
||||
possibly skewed by metadata sizes, disk compression and similar.
|
||||
|
||||
`diskSize` → An unsigned 64bit integer, denoting the disk space currently
|
||||
`diskSize` → An unsigned 64-bit integer, denoting the disk space currently
|
||||
allotted to the user, in bytes. Depending on the storage mechanism this can mean
|
||||
different things (see above). In contrast to the top-level field of the same
|
||||
(or the one in the `perMachine` section), this field reports the current size
|
||||
allotted to the user, not the intended one. The values may differ when user
|
||||
records are updated without the home directory being re-sized.
|
||||
|
||||
`diskCeiling`/`diskFloor` → Unsigned 64bit integers indicating upper and lower
|
||||
`diskCeiling`/`diskFloor` → Unsigned 64-bit integers indicating upper and lower
|
||||
bounds when changing the `diskSize` value, in bytes. These values are typically
|
||||
derived from the underlying data storage, and indicate in which range the home
|
||||
directory may be re-sized in, i.e. in which sensible range the `diskSize` value
|
||||
@ -851,27 +851,27 @@ recognized by the local manager but whose private key is not available
|
||||
locally. This means the user record cannot be modified locally as it couldn't
|
||||
be signed afterwards.
|
||||
|
||||
`goodAuthenticationCounter` → An unsigned 64bit integer. This counter is
|
||||
`goodAuthenticationCounter` → An unsigned 64-bit integer. This counter is
|
||||
increased by one on every successful authentication attempt, i.e. an
|
||||
authentication attempt where a security token of some form was presented and it
|
||||
was correct.
|
||||
|
||||
`badAuthenticationCounter` → An unsigned 64bit integer. This counter is
|
||||
`badAuthenticationCounter` → An unsigned 64-bit integer. This counter is
|
||||
increased by one on every unsuccessfully authentication attempt, i.e. an
|
||||
authentication attempt where a security token of some form was presented and it
|
||||
was incorrect.
|
||||
|
||||
`lastGoodAuthenticationUSec` → An unsigned 64bit integer, indicating the time
|
||||
`lastGoodAuthenticationUSec` → An unsigned 64-bit integer, indicating the time
|
||||
of the last successful authentication attempt in µs since the UNIX epoch (1970).
|
||||
|
||||
`lastBadAuthenticationUSec` → Similar, but the timestamp of the last
|
||||
unsuccessfully authentication attempt.
|
||||
|
||||
`rateLimitBeginUSec` → An unsigned 64bit integer: the µs timestamp since the
|
||||
`rateLimitBeginUSec` → An unsigned 64-bit integer: the µs timestamp since the
|
||||
UNIX epoch (1970) where the most recent rate limiting interval has been
|
||||
started, as configured with `rateLimitIntervalUSec`.
|
||||
|
||||
`rateLimitCount` → An unsigned 64bit integer, counting the authentication
|
||||
`rateLimitCount` → An unsigned 64-bit integer, counting the authentication
|
||||
attempts in the current rate limiting interval, see above. If this counter
|
||||
grows beyond the value configured in `rateLimitBurst` authentication attempts
|
||||
are temporarily refused.
|
||||
|
@ -86,7 +86,7 @@
|
||||
<listitem><para>The maximum size in bytes of a core which will be processed. Core dumps exceeding
|
||||
this size may be stored, but the backtrace will not be generated. Like other sizes in this same
|
||||
config file, the usual suffixes to the base of 1024 are allowed (B, K, M, G, T, P, and E). Defaults
|
||||
to 1G on 32bit systems, 32G on 64bit systems.</para>
|
||||
to 1G on 32-bit systems, 32G on 64-bit systems.</para>
|
||||
|
||||
<para>Setting <varname>Storage=none</varname> and <varname>ProcessSizeMax=0</varname>
|
||||
disables all coredump handling except for a log entry.</para>
|
||||
|
@ -76,13 +76,13 @@
|
||||
<listitem><para>The GPT partition type UUID to match. This may be a GPT partition type UUID such as
|
||||
<constant>4f68bce3-e8cd-4db1-96e7-fbcaf984b709</constant>, or an identifier.
|
||||
Architecture specific partition types can use one of these architecture identifiers:
|
||||
<constant>alpha</constant>, <constant>arc</constant>, <constant>arm</constant> (32bit),
|
||||
<constant>arm64</constant> (64bit, aka aarch64), <constant>ia64</constant>,
|
||||
<constant>alpha</constant>, <constant>arc</constant>, <constant>arm</constant> (32-bit),
|
||||
<constant>arm64</constant> (64-bit, aka aarch64), <constant>ia64</constant>,
|
||||
<constant>loongarch64</constant>, <constant>mips-le</constant>, <constant>mips64-le</constant>,
|
||||
<constant>parisc</constant>, <constant>ppc</constant>, <constant>ppc64</constant>,
|
||||
<constant>ppc64-le</constant>, <constant>riscv32</constant>, <constant>riscv64</constant>,
|
||||
<constant>s390</constant>, <constant>s390x</constant>, <constant>tilegx</constant>,
|
||||
<constant>x86</constant> (32bit, aka i386) and <constant>x86-64</constant> (64bit, aka amd64).
|
||||
<constant>x86</constant> (32-bit, aka i386) and <constant>x86-64</constant> (64-bit, aka amd64).
|
||||
|
||||
The supported identifiers are:</para>
|
||||
|
||||
@ -158,7 +158,7 @@
|
||||
|
||||
<row>
|
||||
<entry><constant>root-secondary</constant></entry>
|
||||
<entry>Root file system partition of the secondary architecture of the local architecture (usually the matching 32bit architecture for the local 64bit architecture)</entry>
|
||||
<entry>Root file system partition of the secondary architecture of the local architecture (usually the matching 32-bit architecture for the local 64-bit architecture)</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
@ -203,7 +203,7 @@
|
||||
|
||||
<row>
|
||||
<entry><constant>usr-secondary</constant></entry>
|
||||
<entry><filename>/usr/</filename> file system partition of the secondary architecture of the local architecture (usually the matching 32bit architecture for the local 64bit architecture)</entry>
|
||||
<entry><filename>/usr/</filename> file system partition of the secondary architecture of the local architecture (usually the matching 32-bit architecture for the local 64-bit architecture)</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
@ -572,7 +572,7 @@
|
||||
<varlistentry>
|
||||
<term><varname>Flags=</varname></term>
|
||||
|
||||
<listitem><para>Configures the 64bit GPT partition flags field to set for the partition when creating
|
||||
<listitem><para>Configures the 64-bit GPT partition flags field to set for the partition when creating
|
||||
it. This option has no effect if the partition already exists. If not specified the flags values is
|
||||
set to all zeroes, except for the three bits that can also be configured via
|
||||
<varname>NoAuto=</varname>, <varname>ReadOnly=</varname> and <varname>GrowFileSystem=</varname>; see
|
||||
|
@ -111,7 +111,7 @@
|
||||
other event sources or at event loop termination. See
|
||||
<citerefentry><refentrytitle>sd_event_add_defer</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
|
||||
|
||||
<listitem><para>Event sources may be assigned a 64bit priority
|
||||
<listitem><para>Event sources may be assigned a 64-bit priority
|
||||
value, that controls the order in which event sources are
|
||||
dispatched if multiple are pending simultaneously. See
|
||||
<citerefentry><refentrytitle>sd_event_source_set_priority</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
|
||||
|
@ -47,7 +47,7 @@
|
||||
<function>sd_bus_get_n_queued_read()</function> may be used to query the number of bus messages in the read queue
|
||||
of a bus connection object. The read queue contains all messages read from the transport medium (e.g. network
|
||||
socket) but not yet processed locally. The function expects two arguments: the bus object to query, and a pointer
|
||||
to a 64bit counter variable to write the current queue size to. Use <function>sd_bus_process()</function> in
|
||||
to a 64-bit counter variable to write the current queue size to. Use <function>sd_bus_process()</function> in
|
||||
order to process queued messages, i.e. to reduce the size of the read queue (as well as, in fact, the write
|
||||
queue, see below).
|
||||
</para>
|
||||
|
@ -87,7 +87,7 @@
|
||||
<row>
|
||||
<entry><literal>y</literal></entry>
|
||||
<entry><constant>SD_BUS_TYPE_BYTE</constant></entry>
|
||||
<entry>8bit unsigned integer</entry>
|
||||
<entry>8-bit unsigned integer</entry>
|
||||
<entry><type>uint8_t *</type></entry>
|
||||
</row>
|
||||
|
||||
@ -101,42 +101,42 @@
|
||||
<row>
|
||||
<entry><literal>n</literal></entry>
|
||||
<entry><constant>SD_BUS_TYPE_INT16</constant></entry>
|
||||
<entry>16bit signed integer</entry>
|
||||
<entry>16-bit signed integer</entry>
|
||||
<entry><type>int16_t *</type></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literal>q</literal></entry>
|
||||
<entry><constant>SD_BUS_TYPE_UINT16</constant></entry>
|
||||
<entry>16bit unsigned integer</entry>
|
||||
<entry>16-bit unsigned integer</entry>
|
||||
<entry><type>uint16_t *</type></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literal>i</literal></entry>
|
||||
<entry><constant>SD_BUS_TYPE_INT32</constant></entry>
|
||||
<entry>32bit signed integer</entry>
|
||||
<entry>32-bit signed integer</entry>
|
||||
<entry><type>int32_t *</type></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literal>u</literal></entry>
|
||||
<entry><constant>SD_BUS_TYPE_UINT32</constant></entry>
|
||||
<entry>32bit unsigned integer</entry>
|
||||
<entry>32-bit unsigned integer</entry>
|
||||
<entry><type>uint32_t *</type></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literal>x</literal></entry>
|
||||
<entry><constant>SD_BUS_TYPE_INT64</constant></entry>
|
||||
<entry>64bit signed integer</entry>
|
||||
<entry>64-bit signed integer</entry>
|
||||
<entry><type>int64_t *</type></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literal>t</literal></entry>
|
||||
<entry><constant>SD_BUS_TYPE_UINT64</constant></entry>
|
||||
<entry>64bit unsigned integer</entry>
|
||||
<entry>64-bit unsigned integer</entry>
|
||||
<entry><type>uint64_t *</type></entry>
|
||||
</row>
|
||||
|
||||
|
@ -56,7 +56,7 @@
|
||||
<para><function>sd_event_source_set_priority()</function> may be
|
||||
used to set the priority for the event source object specified as
|
||||
<parameter>source</parameter>. The priority is specified as an
|
||||
arbitrary signed 64bit integer. The priority is initialized to
|
||||
arbitrary signed 64-bit integer. The priority is initialized to
|
||||
<constant>SD_EVENT_PRIORITY_NORMAL</constant> (0) when the event
|
||||
source is allocated with a call such as
|
||||
<citerefentry><refentrytitle>sd_event_add_io</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||
@ -70,7 +70,7 @@
|
||||
<constant>SD_EVENT_PRIORITY_IDLE</constant> (100) may be used to
|
||||
indicate event sources that shall be dispatched early, normally or
|
||||
late. It is recommended to specify priorities based on these
|
||||
definitions, and relative to them — however, the full 64bit
|
||||
definitions, and relative to them — however, the full 64-bit
|
||||
signed integer range is available for ordering event
|
||||
sources.</para>
|
||||
|
||||
|
@ -121,7 +121,7 @@
|
||||
of the states described below.</para>
|
||||
|
||||
<para><function>sd_event_get_iteration()</function> may be used to determine the current iteration of the event
|
||||
loop. It returns an unsigned 64bit integer containing a counter that increases monotonically with each iteration of
|
||||
loop. It returns an unsigned 64-bit integer containing a counter that increases monotonically with each iteration of
|
||||
the event loop, starting with 0. The counter is increased at the time of the
|
||||
<function>sd_event_prepare()</function> invocation.</para>
|
||||
|
||||
|
@ -71,7 +71,7 @@
|
||||
a string representation of a 128-bit ID in a buffer that is valid in the current code block.</para>
|
||||
|
||||
<para><function>sd_id128_to_uuid_string()</function> and <function>SD_ID128_TO_UUID_STRING()</function>
|
||||
are similar to these two functions/macros, but format the 128bit values as RFC4122 UUIDs, i.e. a series
|
||||
are similar to these two functions/macros, but format the 128-bit values as RFC4122 UUIDs, i.e. a series
|
||||
of 36 lowercase hexadeciaml digits and dashes, terminated by a <constant>NUL</constant> byte.</para>
|
||||
|
||||
<para><function>sd_id128_from_string()</function> implements the reverse operation: it takes a 33
|
||||
|
@ -39,11 +39,11 @@
|
||||
|
||||
<para><function>sd_journal_get_seqnum()</function> returns the sequence number of the current journal
|
||||
entry. It takes three arguments: the journal context object, a pointer to a 64-bit unsigned integer to
|
||||
store the sequence number in, and a buffer to return the 128bit sequence number ID in.</para>
|
||||
store the sequence number in, and a buffer to return the 128-bit sequence number ID in.</para>
|
||||
|
||||
<para>When writing journal entries to disk each <command>systemd-journald</command> instance will number
|
||||
them sequentially, starting from 1 for the first entry written after subsystem initialization. Each such
|
||||
series of sequence numbers is associated with a 128bit sequence number ID which is initialized randomly,
|
||||
series of sequence numbers is associated with a 128-bit sequence number ID which is initialized randomly,
|
||||
once at <command>systemd-journal</command> initialization. Thus, while multiple instances of
|
||||
<command>systemd-journald</command> will assign the same sequence numbers to their written journal
|
||||
entries, they will have a distinct sequence number IDs. The sequence number is assigned at the moment of
|
||||
|
@ -2224,7 +2224,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
|
||||
project='man-pages'><refentrytitle>sigqueue</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||
system call, rather than <citerefentry
|
||||
project='man-pages'><refentrytitle>kill</refentrytitle><manvolnum>3</manvolnum></citerefentry>. The
|
||||
specified value must be a 32bit signed integer, and may be specified either in decimal, in
|
||||
specified value must be a 32-bit signed integer, and may be specified either in decimal, in
|
||||
hexadecimal (if prefixed with <literal>0x</literal>), octal (if prefixed with <literal>0o</literal>)
|
||||
or binary (if prefixed with <literal>0b</literal>)</para>
|
||||
|
||||
|
@ -64,8 +64,8 @@
|
||||
characters of the appropriate length (i.e. most likely 256 bit/64 characters, or longer). If not specified via
|
||||
<varname>systemd.verity_root_data=</varname> and <varname>systemd.verity_root_hash=</varname>, the hash and
|
||||
data devices to use are automatically derived from the specified hash value. Specifically, the data partition
|
||||
device is looked for under a GPT partition UUID derived from the first 128bit of the root hash, the hash
|
||||
partition device is looked for under a GPT partition UUID derived from the last 128bit of the root hash. Hence
|
||||
device is looked for under a GPT partition UUID derived from the first 128-bit of the root hash, the hash
|
||||
partition device is looked for under a GPT partition UUID derived from the last 128-bit of the root hash. Hence
|
||||
it is usually sufficient to specify the root hash to boot from a verity protected root file system, as
|
||||
device paths are automatically determined from it — as long as the partition table is properly set up.</para>
|
||||
</listitem>
|
||||
|
@ -1143,13 +1143,13 @@ CapabilityBoundingSet=~CAP_B CAP_C</programlisting>
|
||||
<constant>ppc</constant>, <constant>ppc-le</constant>, <constant>ppc64</constant>,
|
||||
<constant>ppc64-le</constant>, <constant>s390</constant> or <constant>s390x</constant>. Which
|
||||
personality architectures are supported depends on the kernel's native architecture. Usually the
|
||||
64bit versions of the various system architectures support their immediate 32bit personality
|
||||
64-bit versions of the various system architectures support their immediate 32-bit personality
|
||||
architecture counterpart, but no others. For example, <constant>x86-64</constant> systems support the
|
||||
<constant>x86-64</constant> and <constant>x86</constant> personalities but no others. The personality
|
||||
feature is useful when running 32-bit services on a 64-bit host system. If not specified, the
|
||||
personality is left unmodified and thus reflects the personality of the host system's kernel. This
|
||||
option is not useful on architectures for which only one native word width was ever available, such
|
||||
as <constant>m68k</constant> (32bit only) or <constant>alpha</constant> (64bit only).</para></listitem>
|
||||
as <constant>m68k</constant> (32-bit only) or <constant>alpha</constant> (64-bit only).</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
@ -3505,7 +3505,7 @@ StandardInputData=V2XigLJyZSBubyBzdHJhbmdlcnMgdG8gbG92ZQpZb3Uga25vdyB0aGUgcnVsZX
|
||||
<varlistentry>
|
||||
<term><varname>$INVOCATION_ID</varname></term>
|
||||
|
||||
<listitem><para>Contains a randomized, unique 128bit ID identifying each runtime cycle of the unit, formatted
|
||||
<listitem><para>Contains a randomized, unique 128-bit ID identifying each runtime cycle of the unit, formatted
|
||||
as 32 character hexadecimal string. A new ID is assigned each time the unit changes from an inactive state into
|
||||
an activating or active state, and may be used to identify this specific runtime cycle, in particular in data
|
||||
stored offline, such as the journal. The same ID is passed to all processes run as part of the
|
||||
|
@ -376,7 +376,7 @@
|
||||
<varlistentry>
|
||||
<term><varname>_STREAM_ID=</varname></term>
|
||||
<listitem>
|
||||
<para>Only applies to <literal>_TRANSPORT=stdout</literal> records: specifies a randomized 128bit ID assigned
|
||||
<para>Only applies to <literal>_TRANSPORT=stdout</literal> records: specifies a randomized 128-bit ID assigned
|
||||
to the stream connection when it was first created. This ID is useful to reconstruct individual log streams
|
||||
from the log records: all log records carrying the same stream ID originate from the same stream.</para>
|
||||
</listitem>
|
||||
|
@ -341,7 +341,7 @@
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>Backlog=</varname></term>
|
||||
<listitem><para>Takes an unsigned 32bit integer argument. Specifies the number of connections to
|
||||
<listitem><para>Takes an unsigned 32-bit integer argument. Specifies the number of connections to
|
||||
queue that have not been accepted yet. This setting matters only for stream and sequential packet
|
||||
sockets. See
|
||||
<citerefentry><refentrytitle>listen</refentrytitle><manvolnum>2</manvolnum></citerefentry> for
|
||||
|
@ -33,7 +33,7 @@ struct dirent *readdir_no_dot(DIR *dirp);
|
||||
/* Maximum space one dirent structure might require at most */
|
||||
#define DIRENT_SIZE_MAX CONST_MAX(sizeof(struct dirent), offsetof(struct dirent, d_name) + NAME_MAX + 1)
|
||||
|
||||
/* Only if 64bit off_t is enabled struct dirent + struct dirent64 are actually the same. We require this, and
|
||||
/* Only if 64-bit off_t is enabled struct dirent + struct dirent64 are actually the same. We require this, and
|
||||
* we want them to be interchangeable to make getdents64() work, hence verify that. */
|
||||
assert_cc(_FILE_OFFSET_BITS == 64);
|
||||
#if HAVE_STRUCT_DIRENT64
|
||||
|
@ -182,7 +182,7 @@ int cunescape_one(const char *p, size_t length, char32_t *ret, bool *eight_bit,
|
||||
}
|
||||
|
||||
case 'u': {
|
||||
/* C++11 style 16bit unicode */
|
||||
/* C++11 style 16-bit unicode */
|
||||
|
||||
int a[4];
|
||||
size_t i;
|
||||
@ -209,7 +209,7 @@ int cunescape_one(const char *p, size_t length, char32_t *ret, bool *eight_bit,
|
||||
}
|
||||
|
||||
case 'U': {
|
||||
/* C++11 style 32bit unicode */
|
||||
/* C++11 style 32-bit unicode */
|
||||
|
||||
int a[8];
|
||||
size_t i;
|
||||
|
@ -93,14 +93,14 @@ extern const struct hash_ops trivial_hash_ops;
|
||||
extern const struct hash_ops trivial_hash_ops_free;
|
||||
extern const struct hash_ops trivial_hash_ops_free_free;
|
||||
|
||||
/* 32bit values we can always just embed in the pointer itself, but in order to support 32bit archs we need store 64bit
|
||||
/* 32-bit values we can always just embed in the pointer itself, but in order to support 32-bit archs we need store 64-bit
|
||||
* values indirectly, since they don't fit in a pointer. */
|
||||
void uint64_hash_func(const uint64_t *p, struct siphash *state);
|
||||
int uint64_compare_func(const uint64_t *a, const uint64_t *b) _pure_;
|
||||
extern const struct hash_ops uint64_hash_ops;
|
||||
|
||||
/* On some archs dev_t is 32bit, and on others 64bit. And sometimes it's 64bit on 32bit archs, and sometimes 32bit on
|
||||
* 64bit archs. Yuck! */
|
||||
/* On some archs dev_t is 32-bit, and on others 64-bit. And sometimes it's 64-bit on 32-bit archs, and sometimes 32-bit on
|
||||
* 64-bit archs. Yuck! */
|
||||
#if SIZEOF_DEV_T != 8
|
||||
void devt_hash_func(const dev_t *p, struct siphash *state);
|
||||
#else
|
||||
|
@ -174,9 +174,9 @@ struct _packed_ indirect_storage {
|
||||
};
|
||||
|
||||
struct direct_storage {
|
||||
/* This gives us 39 bytes on 64bit, or 35 bytes on 32bit.
|
||||
* That's room for 4 set_entries + 4 DIB bytes + 3 unused bytes on 64bit,
|
||||
* or 7 set_entries + 7 DIB bytes + 0 unused bytes on 32bit. */
|
||||
/* This gives us 39 bytes on 64-bit, or 35 bytes on 32-bit.
|
||||
* That's room for 4 set_entries + 4 DIB bytes + 3 unused bytes on 64-bit,
|
||||
* or 7 set_entries + 7 DIB bytes + 0 unused bytes on 32-bit. */
|
||||
uint8_t storage[sizeof(struct indirect_storage)];
|
||||
};
|
||||
|
||||
|
@ -18,7 +18,7 @@ uint64_t physical_memory(void) {
|
||||
long sc;
|
||||
int r;
|
||||
|
||||
/* We return this as uint64_t in case we are running as 32bit process on a 64bit kernel with huge amounts of
|
||||
/* We return this as uint64_t in case we are running as 32-bit process on a 64-bit kernel with huge amounts of
|
||||
* memory.
|
||||
*
|
||||
* In order to support containers nicely that have a configured memory limit we'll take the minimum of the
|
||||
@ -126,7 +126,7 @@ uint64_t system_tasks_max(void) {
|
||||
*
|
||||
* This limits the numeric range PIDs can take, and thus indirectly also limits the number of
|
||||
* concurrent threads. It's primarily a compatibility concept: some crappy old code used a signed
|
||||
* 16bit type for PIDs, hence the kernel provides a way to ensure the PIDs never go beyond
|
||||
* 16-bit type for PIDs, hence the kernel provides a way to ensure the PIDs never go beyond
|
||||
* INT16_MAX by default.
|
||||
*
|
||||
* Also note the weird definition: PIDs assigned will be kept below this value, which means
|
||||
|
@ -87,7 +87,7 @@ static int rlimit_parse_u64(const char *val, rlim_t *ret) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* setrlimit(2) suggests rlim_t is always 64bit on Linux. */
|
||||
/* setrlimit(2) suggests rlim_t is always 64-bit on Linux. */
|
||||
assert_cc(sizeof(rlim_t) == sizeof(uint64_t));
|
||||
|
||||
r = safe_atou64(val, &u);
|
||||
|
@ -1179,7 +1179,7 @@ void* cmsg_find_and_copy_data(struct msghdr *mh, int level, int type, void *buf,
|
||||
assert(buf_len > 0);
|
||||
|
||||
/* This is similar to cmsg_find_data(), but copy the found data to buf. This should be typically used
|
||||
* when reading possibly unaligned data such as timestamp, as time_t is 64bit and size_t is 32bit on
|
||||
* when reading possibly unaligned data such as timestamp, as time_t is 64-bit and size_t is 32-bit on
|
||||
* RISCV32. See issue #27241. */
|
||||
|
||||
cmsg = cmsg_find(mh, level, type, CMSG_LEN(buf_len));
|
||||
|
@ -179,7 +179,7 @@ int flush_accept(int fd);
|
||||
* at compile time, that the requested type has a smaller or same alignment as 'struct cmsghdr', and one
|
||||
* during runtime, that the actual pointer matches the alignment too. This is supposed to catch cases such as
|
||||
* 'struct timeval' is embedded into 'struct cmsghdr' on architectures where the alignment of the former is 8
|
||||
* bytes (because of a 64bit time_t), but of the latter is 4 bytes (because size_t is 32bit), such as
|
||||
* bytes (because of a 64-bit time_t), but of the latter is 4 bytes (because size_t is 32 bits), such as
|
||||
* riscv32. */
|
||||
#define CMSG_TYPED_DATA(cmsg, type) \
|
||||
({ \
|
||||
@ -294,7 +294,7 @@ static inline int getsockopt_int(int fd, int level, int optname, int *ret) {
|
||||
int socket_bind_to_ifname(int fd, const char *ifname);
|
||||
int socket_bind_to_ifindex(int fd, int ifindex);
|
||||
|
||||
/* Define a 64bit version of timeval/timespec in any case, even on 32bit userspace. */
|
||||
/* Define a 64-bit version of timeval/timespec in any case, even on 32-bit userspace. */
|
||||
struct timeval_large {
|
||||
uint64_t tvl_sec, tvl_usec;
|
||||
};
|
||||
@ -302,7 +302,7 @@ struct timespec_large {
|
||||
uint64_t tvl_sec, tvl_nsec;
|
||||
};
|
||||
|
||||
/* glibc duplicates timespec/timeval on certain 32bit archs, once in 32bit and once in 64bit.
|
||||
/* glibc duplicates timespec/timeval on certain 32-bit arches, once in 32-bit and once in 64-bit.
|
||||
* See __convert_scm_timestamps() in glibc source code. Hence, we need additional buffer space for them
|
||||
* to prevent from recvmsg_safe() returning -EXFULL. */
|
||||
#define CMSG_SPACE_TIMEVAL \
|
||||
|
@ -1661,13 +1661,13 @@ int time_change_fd(void) {
|
||||
if (timerfd_settime(fd, TFD_TIMER_ABSTIME|TFD_TIMER_CANCEL_ON_SET, &its, NULL) >= 0)
|
||||
return TAKE_FD(fd);
|
||||
|
||||
/* So apparently there are systems where time_t is 64bit, but the kernel actually doesn't support
|
||||
* 64bit time_t. In that case configuring a timer to TIME_T_MAX will fail with EOPNOTSUPP or a
|
||||
/* So apparently there are systems where time_t is 64-bit, but the kernel actually doesn't support
|
||||
* 64-bit time_t. In that case configuring a timer to TIME_T_MAX will fail with EOPNOTSUPP or a
|
||||
* similar error. If that's the case let's try with INT32_MAX instead, maybe that works. It's a bit
|
||||
* of a black magic thing though, but what can we do?
|
||||
*
|
||||
* We don't want this code on x86-64, hence let's conditionalize this for systems with 64bit time_t
|
||||
* but where "long" is shorter than 64bit, i.e. 32bit archs.
|
||||
* We don't want this code on x86-64, hence let's conditionalize this for systems with 64-bit time_t
|
||||
* but where "long" is shorter than 64-bit, i.e. 32-bit archs.
|
||||
*
|
||||
* See: https://github.com/systemd/systemd/issues/14362 */
|
||||
|
||||
|
@ -222,7 +222,7 @@ static inline int usleep_safe(usec_t usec) {
|
||||
/* The last second we can format is 31. Dec 9999, 1s before midnight, because otherwise we'd enter 5 digit
|
||||
* year territory. However, since we want to stay away from this in all timezones we take one day off. */
|
||||
#define USEC_TIMESTAMP_FORMATTABLE_MAX_64BIT ((usec_t) 253402214399000000) /* Thu 9999-12-30 23:59:59 UTC */
|
||||
/* With a 32bit time_t we can't go beyond 2038...
|
||||
/* With a 32-bit time_t we can't go beyond 2038...
|
||||
* We parse timestamp with RFC-822/ISO 8601 (e.g. +06, or -03:00) as UTC, hence the upper bound must be off
|
||||
* by USEC_PER_DAY. See parse_timestamp() for more details. */
|
||||
#define USEC_TIMESTAMP_FORMATTABLE_MAX_32BIT (((usec_t) INT32_MAX) * USEC_PER_SEC - USEC_PER_DAY)
|
||||
|
@ -37,7 +37,7 @@ bool uid_is_valid(uid_t uid) {
|
||||
if (uid == (uid_t) UINT32_C(0xFFFFFFFF))
|
||||
return false;
|
||||
|
||||
/* A long time ago UIDs where 16bit, hence explicitly avoid the 16bit -1 too */
|
||||
/* A long time ago UIDs where 16 bit, hence explicitly avoid the 16-bit -1 too */
|
||||
if (uid == (uid_t) UINT32_C(0xFFFF))
|
||||
return false;
|
||||
|
||||
@ -765,14 +765,14 @@ bool valid_user_group_name(const char *u, ValidUserFlags flags) {
|
||||
if (in_charset(u, "0123456789")) /* Don't allow fully numeric strings, they might be confused
|
||||
* with UIDs (note that this test is more broad than
|
||||
* the parse_uid() test above, as it will cover more than
|
||||
* the 32bit range, and it will detect 65535 (which is in
|
||||
* the 32-bit range, and it will detect 65535 (which is in
|
||||
* invalid UID, even though in the unsigned 32 bit range) */
|
||||
return false;
|
||||
|
||||
if (u[0] == '-' && in_charset(u + 1, "0123456789")) /* Don't allow negative fully numeric
|
||||
* strings either. After all some people
|
||||
* write 65535 as -1 (even though that's
|
||||
* not even true on 32bit uid_t
|
||||
* not even true on 32-bit uid_t
|
||||
* anyway) */
|
||||
return false;
|
||||
|
||||
|
@ -69,13 +69,13 @@ int take_etc_passwd_lock(const char *root);
|
||||
|
||||
/* If REMOUNT_IDMAPPING_HOST_ROOT is set for remount_idmap() we'll include a mapping here that maps the host
|
||||
* root user accessing the idmapped mount to the this user ID on the backing fs. This is the last valid UID in
|
||||
* the *signed* 32bit range. You might wonder why precisely use this specific UID for this purpose? Well, we
|
||||
* the *signed* 32-bit range. You might wonder why precisely use this specific UID for this purpose? Well, we
|
||||
* definitely cannot use the first 0…65536 UIDs for that, since in most cases that's precisely the file range
|
||||
* we intend to map to some high UID range, and since UID mappings have to be bijective we thus cannot use
|
||||
* them at all. Furthermore the UID range beyond INT32_MAX (i.e. the range above the signed 32bit range) is
|
||||
* them at all. Furthermore the UID range beyond INT32_MAX (i.e. the range above the signed 32-bit range) is
|
||||
* icky, since many APIs cannot use it (example: setfsuid() returns the old UID as signed integer). Following
|
||||
* our usual logic of assigning a 16bit UID range to each container, so that the upper 16bit of a 32bit UID
|
||||
* value indicate kind of a "container ID" and the lower 16bit map directly to the intended user you can read
|
||||
* our usual logic of assigning a 16-bit UID range to each container, so that the upper 16-bit of a 32-bit UID
|
||||
* value indicate kind of a "container ID" and the lower 16-bit map directly to the intended user you can read
|
||||
* this specific UID as the "nobody" user of the container with ID 0x7FFF, which is kinda nice. */
|
||||
#define UID_MAPPED_ROOT ((uid_t) (INT32_MAX-1))
|
||||
#define GID_MAPPED_ROOT ((gid_t) (INT32_MAX-1))
|
||||
|
@ -38,7 +38,7 @@ size_t utf16_encode_unichar(char16_t *out, char32_t c);
|
||||
char *utf16_to_utf8(const char16_t *s, size_t length /* bytes! */);
|
||||
char16_t *utf8_to_utf16(const char *s, size_t length);
|
||||
|
||||
size_t char16_strlen(const char16_t *s); /* returns the number of 16bit words in the string (not bytes!) */
|
||||
size_t char16_strlen(const char16_t *s); /* returns the number of 16-bit words in the string (not bytes!) */
|
||||
|
||||
int utf8_encoded_valid_unichar(const char *str, size_t length);
|
||||
int utf8_encoded_to_unichar(const char *str, char32_t *ret_unichar);
|
||||
|
@ -27,8 +27,8 @@ int sync_everything(void) {
|
||||
}
|
||||
|
||||
const char *get_efi_arch(void) {
|
||||
/* Detect EFI firmware architecture of the running system. On mixed mode systems, it could be 32bit
|
||||
* while the kernel is running in 64bit. */
|
||||
/* Detect EFI firmware architecture of the running system. On mixed mode systems, it could be 32-bit
|
||||
* while the kernel is running in 64-bit. */
|
||||
|
||||
#ifdef __x86_64__
|
||||
_cleanup_free_ char *platform_size = NULL;
|
||||
|
@ -75,7 +75,7 @@ static EFI_STATUS pack_cpio_one(
|
||||
*
|
||||
* See: https://docs.kernel.org/driver-api/early-userspace/buffer-format.html */
|
||||
|
||||
if (contents_size > UINT32_MAX) /* cpio cannot deal with > 32bit file sizes */
|
||||
if (contents_size > UINT32_MAX) /* cpio cannot deal with > 32-bit file sizes */
|
||||
return EFI_LOAD_ERROR;
|
||||
|
||||
if (*inode_counter == UINT32_MAX) /* more than 2^32-1 inodes? yikes. cpio doesn't support that either */
|
||||
|
@ -629,7 +629,7 @@ static bool handle_format_specifier(FormatContext *ctx, SpecifierContext *sp) {
|
||||
/* Parses one item from the format specifier in ctx and put the info into sp. If we are done with
|
||||
* this specifier returns true, otherwise this function should be called again. */
|
||||
|
||||
/* This implementation assumes 32bit ints. Also note that all types smaller than int are promoted to
|
||||
/* This implementation assumes 32-bit ints. Also note that all types smaller than int are promoted to
|
||||
* int in vararg functions, which is why we fetch only ints for any such types. The compiler would
|
||||
* otherwise warn about fetching smaller types. */
|
||||
assert_cc(sizeof(int) == 4);
|
||||
|
@ -102,19 +102,19 @@ typedef void (*handover_f)(void *parent, EFI_SYSTEM_TABLE *table, BootParams *pa
|
||||
static void linux_efi_handover(EFI_HANDLE parent, uintptr_t kernel, BootParams *params) {
|
||||
assert(params);
|
||||
|
||||
kernel += (params->hdr.setup_sects + 1) * KERNEL_SECTOR_SIZE; /* 32bit entry address. */
|
||||
kernel += (params->hdr.setup_sects + 1) * KERNEL_SECTOR_SIZE; /* 32-bit entry address. */
|
||||
|
||||
/* Old kernels needs this set, while newer ones seem to ignore this. */
|
||||
params->hdr.code32_start = kernel;
|
||||
|
||||
#ifdef __x86_64__
|
||||
kernel += KERNEL_SECTOR_SIZE; /* 64bit entry address. */
|
||||
kernel += KERNEL_SECTOR_SIZE; /* 64-bit entry address. */
|
||||
#endif
|
||||
|
||||
kernel += params->hdr.handover_offset; /* 32/64bit EFI handover address. */
|
||||
kernel += params->hdr.handover_offset; /* 32/64-bit EFI handover address. */
|
||||
|
||||
/* Note in EFI mixed mode this now points to the correct 32bit handover entry point, allowing a 64bit
|
||||
* kernel to be booted from a 32bit sd-stub. */
|
||||
/* Note in EFI mixed mode this now points to the correct 32-bit handover entry point, allowing a 64-bit
|
||||
* kernel to be booted from a 32-bit sd-stub. */
|
||||
|
||||
handover_f handover = (handover_f) kernel;
|
||||
handover(parent, ST, params);
|
||||
|
@ -171,7 +171,7 @@ static uint32_t get_compatibility_entry_address(const DosFileHeader *dos, const
|
||||
static const char *sections[] = { ".compat", NULL };
|
||||
|
||||
/* The kernel may provide alternative PE entry points for different PE architectures. This allows
|
||||
* booting a 64bit kernel on 32bit EFI that is otherwise running on a 64bit CPU. The locations of any
|
||||
* booting a 64-bit kernel on 32-bit EFI that is otherwise running on a 64-bit CPU. The locations of any
|
||||
* such compat entry points are located in a special PE section. */
|
||||
|
||||
locate_sections((const PeSectionHeader *) ((const uint8_t *) dos + section_table_offset(dos, pe)),
|
||||
|
@ -91,7 +91,7 @@ static uint64_t ticks_freq(void) {
|
||||
uint64_t ticks_end = ticks_read_arch();
|
||||
|
||||
if (ticks_end < ticks_start) /* Check for an overflow (which is not that unlikely, given on some
|
||||
* archs the value is 32bit) */
|
||||
* archs the value is 32-bit) */
|
||||
return 0;
|
||||
|
||||
cache = (ticks_end - ticks_start) * 1000UL;
|
||||
|
@ -147,16 +147,16 @@ static inline void strv_freep(char16_t ***p) {
|
||||
|
||||
EFI_STATUS open_directory(EFI_FILE *root_dir, const char16_t *path, EFI_FILE **ret);
|
||||
|
||||
/* Conversion between EFI_PHYSICAL_ADDRESS and pointers is not obvious. The former is always 64bit, even on
|
||||
* 32bit archs. And gcc complains if we cast a pointer to an integer of a different size. Hence let's do the
|
||||
/* Conversion between EFI_PHYSICAL_ADDRESS and pointers is not obvious. The former is always 64-bit, even on
|
||||
* 32-bit archs. And gcc complains if we cast a pointer to an integer of a different size. Hence let's do the
|
||||
* conversion indirectly: first into uintptr_t and then extended to EFI_PHYSICAL_ADDRESS. */
|
||||
static inline EFI_PHYSICAL_ADDRESS POINTER_TO_PHYSICAL_ADDRESS(const void *p) {
|
||||
return (EFI_PHYSICAL_ADDRESS) (uintptr_t) p;
|
||||
}
|
||||
|
||||
static inline void *PHYSICAL_ADDRESS_TO_POINTER(EFI_PHYSICAL_ADDRESS addr) {
|
||||
/* On 32bit systems the address might not be convertible (as pointers are 32bit but
|
||||
* EFI_PHYSICAL_ADDRESS 64bit) */
|
||||
/* On 32-bit systems the address might not be convertible (as pointers are 32-bit but
|
||||
* EFI_PHYSICAL_ADDRESS 64-bit) */
|
||||
assert(addr <= UINTPTR_MAX);
|
||||
return (void *) (uintptr_t) addr;
|
||||
}
|
||||
|
@ -1483,7 +1483,7 @@ static int message_append_cmdline(sd_bus_message *m, const char *signature, char
|
||||
|
||||
r = safe_atou8(v, &z);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to parse '%s' as byte (unsigned 8bit integer): %m", v);
|
||||
return log_error_errno(r, "Failed to parse '%s' as byte (unsigned 8-bit integer): %m", v);
|
||||
|
||||
r = sd_bus_message_append_basic(m, t, &z);
|
||||
break;
|
||||
@ -1494,7 +1494,7 @@ static int message_append_cmdline(sd_bus_message *m, const char *signature, char
|
||||
|
||||
r = safe_atoi16(v, &z);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to parse '%s' as signed 16bit integer: %m", v);
|
||||
return log_error_errno(r, "Failed to parse '%s' as signed 16-bit integer: %m", v);
|
||||
|
||||
r = sd_bus_message_append_basic(m, t, &z);
|
||||
break;
|
||||
@ -1505,7 +1505,7 @@ static int message_append_cmdline(sd_bus_message *m, const char *signature, char
|
||||
|
||||
r = safe_atou16(v, &z);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to parse '%s' as unsigned 16bit integer: %m", v);
|
||||
return log_error_errno(r, "Failed to parse '%s' as unsigned 16-bit integer: %m", v);
|
||||
|
||||
r = sd_bus_message_append_basic(m, t, &z);
|
||||
break;
|
||||
@ -1516,7 +1516,7 @@ static int message_append_cmdline(sd_bus_message *m, const char *signature, char
|
||||
|
||||
r = safe_atoi32(v, &z);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to parse '%s' as signed 32bit integer: %m", v);
|
||||
return log_error_errno(r, "Failed to parse '%s' as signed 32-bit integer: %m", v);
|
||||
|
||||
r = sd_bus_message_append_basic(m, t, &z);
|
||||
break;
|
||||
@ -1527,7 +1527,7 @@ static int message_append_cmdline(sd_bus_message *m, const char *signature, char
|
||||
|
||||
r = safe_atou32(v, &z);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to parse '%s' as unsigned 32bit integer: %m", v);
|
||||
return log_error_errno(r, "Failed to parse '%s' as unsigned 32-bit integer: %m", v);
|
||||
|
||||
r = sd_bus_message_append_basic(m, t, &z);
|
||||
break;
|
||||
@ -1538,7 +1538,7 @@ static int message_append_cmdline(sd_bus_message *m, const char *signature, char
|
||||
|
||||
r = safe_atoi64(v, &z);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to parse '%s' as signed 64bit integer: %m", v);
|
||||
return log_error_errno(r, "Failed to parse '%s' as signed 64-bit integer: %m", v);
|
||||
|
||||
r = sd_bus_message_append_basic(m, t, &z);
|
||||
break;
|
||||
@ -1549,7 +1549,7 @@ static int message_append_cmdline(sd_bus_message *m, const char *signature, char
|
||||
|
||||
r = safe_atou64(v, &z);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to parse '%s' as unsigned 64bit integer: %m", v);
|
||||
return log_error_errno(r, "Failed to parse '%s' as unsigned 64-bit integer: %m", v);
|
||||
|
||||
r = sd_bus_message_append_basic(m, t, &z);
|
||||
break;
|
||||
|
@ -70,7 +70,7 @@ static int add_lookup_instructions(
|
||||
}
|
||||
|
||||
do {
|
||||
/* Compare IPv4 with one word instruction (32bit) */
|
||||
/* Compare IPv4 with one word instruction (32-bit) */
|
||||
struct bpf_insn insn[] = {
|
||||
/* If skb->protocol != ETH_P_IP, skip this whole block. The offset will be set later. */
|
||||
BPF_JMP_IMM(BPF_JNE, BPF_REG_7, htobe16(protocol), 0),
|
||||
|
@ -266,7 +266,7 @@ int bus_service_method_dump_file_descriptor_store(sd_bus_message *message, void
|
||||
continue;
|
||||
}
|
||||
|
||||
/* glibc implies O_LARGEFILE everywhere on 64bit off_t builds, but forgets to hide it away on
|
||||
/* glibc implies O_LARGEFILE everywhere on 64-bit off_t builds, but forgets to hide it away on
|
||||
* F_GETFL, but provides no definition to check for that. Let's mask the flag away manually,
|
||||
* to not confuse clients. */
|
||||
flags &= ~RAW_O_LARGEFILE;
|
||||
@ -307,7 +307,7 @@ static int property_get_size_as_uint32(
|
||||
size_t *value = ASSERT_PTR(userdata);
|
||||
uint32_t sz = *value >= UINT32_MAX ? UINT32_MAX : (uint32_t) *value;
|
||||
|
||||
/* Returns a size_t as a D-Bus "u" type, i.e. as 32bit value, even if size_t is 64bit. We'll saturate if it doesn't fit. */
|
||||
/* Returns a size_t as a D-Bus "u" type, i.e. as 32-bit value, even if size_t is 64-bit. We'll saturate if it doesn't fit. */
|
||||
|
||||
return sd_bus_message_append_basic(reply, 'u', &sz);
|
||||
}
|
||||
|
@ -3272,7 +3272,7 @@ int manager_load_unit_from_dbus_path(Manager *m, const char *s, sd_bus_error *e,
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
/* Permit addressing units by invocation ID: if the passed bus path is suffixed by a 128bit ID then
|
||||
/* Permit addressing units by invocation ID: if the passed bus path is suffixed by a 128-bit ID then
|
||||
* we use it as invocation ID. */
|
||||
r = sd_id128_from_string(n, &invocation_id);
|
||||
if (r >= 0) {
|
||||
@ -4497,7 +4497,7 @@ static void manager_unref_uid_internal(
|
||||
/* A generic implementation, covering both manager_unref_uid() and manager_unref_gid(), under the
|
||||
* assumption that uid_t and gid_t are actually defined the same way, with the same validity rules.
|
||||
*
|
||||
* We store a hashmap where the key is the UID/GID and the value is a 32bit reference counter, whose
|
||||
* We store a hashmap where the key is the UID/GID and the value is a 32-bit reference counter, whose
|
||||
* highest bit is used as flag for marking UIDs/GIDs whose IPC objects to remove when the last
|
||||
* reference to the UID/GID is dropped. The flag is set to on, once at least one reference from a
|
||||
* unit where RemoveIPC= is set is added on a UID/GID. It is reset when the UID's/GID's reference
|
||||
|
@ -52,7 +52,7 @@
|
||||
#include "uid-alloc-range.h"
|
||||
#include "user-util.h"
|
||||
|
||||
/* The maximum size up to which we process coredumps. We use 1G on 32bit systems, and 32G on 64bit systems */
|
||||
/* The maximum size up to which we process coredumps. We use 1G on 32-bit systems, and 32G on 64-bit systems */
|
||||
#if __SIZEOF_POINTER__ == 4
|
||||
#define PROCESS_SIZE_MAX ((uint64_t) (1LLU*1024LLU*1024LLU*1024LLU))
|
||||
#elif __SIZEOF_POINTER__ == 8
|
||||
|
@ -394,7 +394,7 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
return log_error_errno(r, "Failed to parse root hash '%s': %m", optarg);
|
||||
if (l < sizeof(sd_id128_t))
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"Root hash must be at least 128bit long: %s", optarg);
|
||||
"Root hash must be at least 128-bit long: %s", optarg);
|
||||
|
||||
free_and_replace(arg_verity_settings.root_hash, p);
|
||||
arg_verity_settings.root_hash_size = l;
|
||||
|
@ -222,7 +222,7 @@ static int fscrypt_setup(
|
||||
char **list;
|
||||
int n;
|
||||
|
||||
/* Check if this xattr has the format 'trusted.fscrypt_slot<nr>' where '<nr>' is a 32bit unsigned integer */
|
||||
/* Check if this xattr has the format 'trusted.fscrypt_slot<nr>' where '<nr>' is a 32-bit unsigned integer */
|
||||
nr = startswith(xa, "trusted.fscrypt_slot");
|
||||
if (!nr)
|
||||
continue;
|
||||
@ -655,7 +655,7 @@ int home_passwd_fscrypt(
|
||||
const char *nr;
|
||||
uint32_t z;
|
||||
|
||||
/* Check if this xattr has the format 'trusted.fscrypt_slot<nr>' where '<nr>' is a 32bit unsigned integer */
|
||||
/* Check if this xattr has the format 'trusted.fscrypt_slot<nr>' where '<nr>' is a 32-bit unsigned integer */
|
||||
nr = startswith(xa, "trusted.fscrypt_slot");
|
||||
if (!nr)
|
||||
continue;
|
||||
|
@ -226,7 +226,7 @@ static int make_home_userns(uid_t stored_uid, uid_t exposed_uid) {
|
||||
return log_oom();
|
||||
|
||||
/* Leave everything else unmapped, starting from UID_NOBODY itself. Specifically, this means the
|
||||
* whole space outside of 16bit remains unmapped */
|
||||
* whole space outside of 16-bit remains unmapped */
|
||||
|
||||
log_debug("Creating userns with mapping:\n%s", text);
|
||||
|
||||
|
@ -156,7 +156,7 @@ static int help(void) {
|
||||
return log_oom();
|
||||
|
||||
printf("%s [OPTIONS...] COMMAND\n\n"
|
||||
"%sGenerate and print 128bit identifiers.%s\n"
|
||||
"%sGenerate and print 128-bit identifiers.%s\n"
|
||||
"\nCommands:\n"
|
||||
" new Generate a new ID\n"
|
||||
" machine-id Print the ID of current machine\n"
|
||||
|
@ -81,7 +81,7 @@ int ndisc_router_parse(sd_ndisc *nd, sd_ndisc_router *rt) {
|
||||
return log_ndisc_errno(nd, SYNTHETIC_ERRNO(EBADMSG),
|
||||
"Too small to be a router advertisement, ignoring.");
|
||||
|
||||
/* Router advertisement packets are neatly aligned to 64bit boundaries, hence we can access them directly */
|
||||
/* Router advertisement packets are neatly aligned to 64-bit boundaries, hence we can access them directly */
|
||||
a = NDISC_ROUTER_RAW(rt);
|
||||
|
||||
if (a->nd_ra_type != ND_ROUTER_ADVERT)
|
||||
@ -93,7 +93,7 @@ int ndisc_router_parse(sd_ndisc *nd, sd_ndisc_router *rt) {
|
||||
"Received ND packet with wrong RA code, ignoring.");
|
||||
|
||||
rt->hop_limit = a->nd_ra_curhoplimit;
|
||||
rt->flags = a->nd_ra_flags_reserved; /* the first 8bit */
|
||||
rt->flags = a->nd_ra_flags_reserved; /* the first 8 bits */
|
||||
rt->lifetime = be16toh(a->nd_ra_router_lifetime);
|
||||
|
||||
rt->preference = (rt->flags >> 3) & 3;
|
||||
|
@ -661,8 +661,8 @@ static int has_cap(sd_bus_creds *c, size_t offset, int capability) {
|
||||
if ((unsigned) capability > lc)
|
||||
return 0;
|
||||
|
||||
/* If the last cap is 63, then there are 64 caps defined, and we need 2 entries à 32bit hence. *
|
||||
* If the last cap is 64, then there are 65 caps defined, and we need 3 entries à 32bit hence. */
|
||||
/* If the last cap is 63, then there are 64 caps defined, and we need 2 entries à 32-bit hence. *
|
||||
* If the last cap is 64, then there are 65 caps defined, and we need 3 entries à 32-bit hence. */
|
||||
sz = DIV_ROUND_UP(lc+1, 32LU);
|
||||
|
||||
return !!(c->capability[offset * sz + CAP_TO_INDEX((uint32_t) capability)] & CAP_TO_MASK_CORRECTED((uint32_t) capability));
|
||||
|
@ -225,11 +225,11 @@ static int message_append_field_string(
|
||||
|
||||
assert(m);
|
||||
|
||||
/* dbus only allows 8bit header field ids */
|
||||
/* dbus only allows 8-bit header field ids */
|
||||
if (h > 0xFF)
|
||||
return -EINVAL;
|
||||
|
||||
/* dbus doesn't allow strings over 32bit */
|
||||
/* dbus doesn't allow strings over 32-bit */
|
||||
l = strlen(s);
|
||||
if (l > UINT32_MAX)
|
||||
return -EINVAL;
|
||||
@ -266,11 +266,11 @@ static int message_append_field_signature(
|
||||
|
||||
assert(m);
|
||||
|
||||
/* dbus only allows 8bit header field ids */
|
||||
/* dbus only allows 8-bit header field ids */
|
||||
if (h > 0xFF)
|
||||
return -EINVAL;
|
||||
|
||||
/* dbus doesn't allow signatures over 8bit */
|
||||
/* dbus doesn't allow signatures over 8-bit */
|
||||
l = strlen(s);
|
||||
if (l > SD_BUS_MAXIMUM_SIGNATURE_LENGTH)
|
||||
return -EINVAL;
|
||||
@ -300,7 +300,7 @@ static int message_append_field_uint32(sd_bus_message *m, uint64_t h, uint32_t x
|
||||
|
||||
assert(m);
|
||||
|
||||
/* dbus only allows 8bit header field ids */
|
||||
/* dbus only allows 8-bit header field ids */
|
||||
if (h > 0xFF)
|
||||
return -EINVAL;
|
||||
|
||||
@ -322,7 +322,7 @@ static int message_append_field_uint32(sd_bus_message *m, uint64_t h, uint32_t x
|
||||
static int message_append_reply_cookie(sd_bus_message *m, uint64_t cookie) {
|
||||
assert(m);
|
||||
|
||||
/* 64bit cookies are not supported */
|
||||
/* 64-bit cookies are not supported */
|
||||
if (cookie > UINT32_MAX)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
@ -1203,7 +1203,7 @@ static void *message_extend_body(
|
||||
padding = start_body - m->body_size;
|
||||
added = padding + sz;
|
||||
|
||||
/* Check for 32bit overflows */
|
||||
/* Check for 32-bit overflows */
|
||||
if (end_body < start_body || end_body > UINT32_MAX) {
|
||||
m->poisoned = true;
|
||||
return NULL;
|
||||
|
@ -918,7 +918,7 @@ static int bind_description(sd_bus *b, int fd, int family) {
|
||||
(void) sd_bus_get_description(b, &d);
|
||||
|
||||
/* Generate a recognizable source address in the abstract namespace. We'll include:
|
||||
* - a random 64bit value (to avoid collisions)
|
||||
* - a random 64-bit value (to avoid collisions)
|
||||
* - our "comm" process name (suppressed if contains "/" to avoid parsing issues)
|
||||
* - the description string of the bus connection. */
|
||||
(void) get_process_comm(0, &comm);
|
||||
|
@ -1902,7 +1902,7 @@ _public_ int sd_bus_get_bus_id(sd_bus *bus, sd_id128_t *id) {
|
||||
|
||||
static uint64_t cookie_inc(uint64_t cookie) {
|
||||
|
||||
/* Stay within the 32bit range, since classic D-Bus can't deal with more */
|
||||
/* Stay within the 32-bit range, since classic D-Bus can't deal with more */
|
||||
if (cookie >= UINT32_MAX)
|
||||
return COOKIE_CYCLED; /* Don't go back to zero, but use the highest bit for checking
|
||||
* whether we are looping. */
|
||||
|
@ -21,7 +21,7 @@ bool id128_is_valid(const char *s) {
|
||||
l = strlen(s);
|
||||
|
||||
if (l == SD_ID128_STRING_MAX - 1)
|
||||
/* Plain formatted 128bit hex string */
|
||||
/* Plain formatted 128-bit hex string */
|
||||
return in_charset(s, HEXDIGITS);
|
||||
|
||||
if (l == SD_ID128_UUID_STRING_MAX - 1) {
|
||||
@ -49,7 +49,7 @@ int id128_read_fd(int fd, Id128Flag f, sd_id128_t *ret) {
|
||||
|
||||
assert(fd >= 0);
|
||||
|
||||
/* Reads an 128bit ID from a file, which may either be in plain format (32 hex digits), or in UUID format, both
|
||||
/* Reads an 128-bit ID from a file, which may either be in plain format (32 hex digits), or in UUID format, both
|
||||
* optionally followed by a newline and nothing else. ID files should really be newline terminated, but if they
|
||||
* aren't that's OK too, following the rule of "Be conservative in what you send, be liberal in what you
|
||||
* accept".
|
||||
|
@ -1062,7 +1062,7 @@ int journal_file_move_to_object(JournalFile *f, ObjectType type, uint64_t offset
|
||||
/* Objects may only be located at multiple of 64 bit */
|
||||
if (!VALID64(offset))
|
||||
return log_debug_errno(SYNTHETIC_ERRNO(EBADMSG),
|
||||
"Attempt to move to %s object at non-64bit boundary: %" PRIu64,
|
||||
"Attempt to move to %s object at non-64-bit boundary: %" PRIu64,
|
||||
journal_object_type_to_string(type),
|
||||
offset);
|
||||
|
||||
@ -1109,7 +1109,7 @@ int journal_file_read_object_header(JournalFile *f, ObjectType type, uint64_t of
|
||||
/* Objects may only be located at multiple of 64 bit */
|
||||
if (!VALID64(offset))
|
||||
return log_debug_errno(SYNTHETIC_ERRNO(EBADMSG),
|
||||
"Attempt to read %s object at non-64bit boundary: %" PRIu64,
|
||||
"Attempt to read %s object at non-64-bit boundary: %" PRIu64,
|
||||
journal_object_type_to_string(type), offset);
|
||||
|
||||
/* Object may not be located in the file header */
|
||||
@ -1880,7 +1880,7 @@ static int maybe_decompress_payload(
|
||||
|
||||
assert(f);
|
||||
|
||||
/* We can't read objects larger than 4G on a 32bit machine */
|
||||
/* We can't read objects larger than 4G on a 32-bit machine */
|
||||
if ((uint64_t) (size_t) size != size)
|
||||
return -E2BIG;
|
||||
|
||||
|
@ -261,7 +261,7 @@ _public_ int sd_journal_sendv(const struct iovec *iov, int n) {
|
||||
|
||||
/* Already includes a newline? Bummer, then
|
||||
* let's write the variable name, then a
|
||||
* newline, then the size (64bit LE), followed
|
||||
* newline, then the size (64-bit LE), followed
|
||||
* by the data and a final newline */
|
||||
|
||||
w[j++] = IOVEC_MAKE(iov[i].iov_base, c - (char*) iov[i].iov_base);
|
||||
|
@ -1647,7 +1647,7 @@ static bool dirent_is_journal_subdir(const struct dirent *de) {
|
||||
assert(de);
|
||||
|
||||
/* returns true if the specified directory entry looks like a directory that might contain journal
|
||||
* files we might be interested in, i.e. is either a 128bit ID or a 128bit ID suffixed by a
|
||||
* files we might be interested in, i.e. is either a 128-bit ID or a 128-bit ID suffixed by a
|
||||
* namespace. */
|
||||
|
||||
if (!IN_SET(de->d_type, DT_DIR, DT_LNK, DT_UNKNOWN))
|
||||
|
@ -211,10 +211,10 @@ static int shorten_ifname(char *ifname) {
|
||||
if (naming_scheme_has(NAMING_NSPAWN_LONG_HASH)) {
|
||||
uint64_t h;
|
||||
|
||||
/* Calculate 64bit hash value */
|
||||
/* Calculate 64-bit hash value */
|
||||
h = siphash24(ifname, strlen(ifname), SHORTEN_IFNAME_HASH_KEY.bytes);
|
||||
|
||||
/* Set the final four bytes (i.e. 32bit) to the lower 24bit of the hash, encoded in url-safe base64 */
|
||||
/* Set the final four bytes (i.e. 32-bit) to the lower 24bit of the hash, encoded in url-safe base64 */
|
||||
memcpy(new_ifname, ifname, IFNAMSIZ - 5);
|
||||
new_ifname[IFNAMSIZ - 5] = urlsafe_base64char(h >> 18);
|
||||
new_ifname[IFNAMSIZ - 4] = urlsafe_base64char(h >> 12);
|
||||
|
@ -408,7 +408,7 @@ static int fd_patch_uid_internal(int fd, bool donate_fd, uid_t shift, uid_t rang
|
||||
|
||||
/* Recursively adjusts the UID/GIDs of all files of a directory tree. This is used to automatically fix up an
|
||||
* OS tree to the used user namespace UID range. Note that this automatic adjustment only works for UID ranges
|
||||
* following the concept that the upper 16bit of a UID identify the container, and the lower 16bit are the actual
|
||||
* following the concept that the upper 16-bit of a UID identify the container, and the lower 16-bit are the actual
|
||||
* UID within the container. */
|
||||
|
||||
if ((shift & 0xFFFF) != 0) {
|
||||
@ -423,7 +423,7 @@ static int fd_patch_uid_internal(int fd, bool donate_fd, uid_t shift, uid_t rang
|
||||
}
|
||||
|
||||
if (range != 0x10000) {
|
||||
/* We only support containers with 16bit UID ranges for the patching logic */
|
||||
/* We only support containers with 16-bit UID ranges for the patching logic */
|
||||
r = -EOPNOTSUPP;
|
||||
goto finish;
|
||||
}
|
||||
@ -440,7 +440,7 @@ static int fd_patch_uid_internal(int fd, bool donate_fd, uid_t shift, uid_t rang
|
||||
}
|
||||
|
||||
/* Try to detect if the range is already right. Of course, this a pretty drastic optimization, as we assume
|
||||
* that if the top-level dir has the right upper 16bit assigned, then everything below will have too... */
|
||||
* that if the top-level dir has the right upper 16-bit assigned, then everything below will have too... */
|
||||
if (((uint32_t) (st.st_uid ^ shift) >> 16) == 0)
|
||||
return 0;
|
||||
|
||||
|
@ -1393,7 +1393,7 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to parse root hash: %s", optarg);
|
||||
if (l < sizeof(sd_id128_t))
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Root hash must be at least 128bit long: %s", optarg);
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Root hash must be at least 128-bit long: %s", optarg);
|
||||
|
||||
free_and_replace(arg_verity_settings.root_hash, k);
|
||||
arg_verity_settings.root_hash_size = l;
|
||||
|
@ -850,7 +850,7 @@ static int context_sum_weights(Context *context, FreeArea *a, uint64_t *ret) {
|
||||
return 0;
|
||||
|
||||
overflow_sum:
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EOVERFLOW), "Combined weight of partition exceeds unsigned 64bit range, refusing.");
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EOVERFLOW), "Combined weight of partition exceeds unsigned 64-bit range, refusing.");
|
||||
}
|
||||
|
||||
static uint64_t scale_by_weight(uint64_t value, uint64_t weight, uint64_t weight_sum) {
|
||||
@ -1590,7 +1590,7 @@ static int config_parse_uuid(
|
||||
|
||||
r = sd_id128_from_string(rvalue, &partition->new_uuid);
|
||||
if (r < 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse 128bit ID/UUID, ignoring: %s", rvalue);
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse 128-bit ID/UUID, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -5957,7 +5957,7 @@ static int help(void) {
|
||||
" Enroll signed TPM2 PCR policy against PEM public key\n"
|
||||
" --tpm2-public-key-pcrs=PCR1+PCR2+PCR3+…\n"
|
||||
" Enroll signed TPM2 PCR policy for specified TPM2 PCRs\n"
|
||||
" --seed=UUID 128bit seed UUID to derive all UUIDs from\n"
|
||||
" --seed=UUID 128-bit seed UUID to derive all UUIDs from\n"
|
||||
" --size=BYTES Grow loopback file to specified size\n"
|
||||
" --json=pretty|short|off\n"
|
||||
" Generate JSON output\n"
|
||||
|
@ -44,7 +44,7 @@ assert_cc(sizeof(struct iphdr) == 20);
|
||||
assert_cc(sizeof(struct udphdr) == 8);
|
||||
assert_cc(sizeof(DnsPacketHeader) == 12);
|
||||
|
||||
/* The various DNS protocols deviate in how large a packet can grow, but the TCP transport has a 16bit size
|
||||
/* The various DNS protocols deviate in how large a packet can grow, but the TCP transport has a 16-bit size
|
||||
* field, hence that appears to be the absolute maximum. */
|
||||
#define DNS_PACKET_SIZE_MAX 0xFFFFu
|
||||
|
||||
|
@ -19,7 +19,7 @@ assert_cc(sizeof(int) == sizeof(int32_t));
|
||||
assert_cc(sizeof(unsigned) == sizeof(uint32_t));
|
||||
#define bus_property_get_unsigned ((sd_bus_property_get_t) NULL)
|
||||
|
||||
/* On 64bit machines we can use the default serializer for size_t and
|
||||
/* On 64-bit machines we can use the default serializer for size_t and
|
||||
* friends, otherwise we need to cast this manually */
|
||||
#if __SIZEOF_SIZE_T__ == 8
|
||||
#define bus_property_get_size ((sd_bus_property_get_t) NULL)
|
||||
@ -36,7 +36,7 @@ int bus_property_get_ulong(sd_bus *bus, const char *path, const char *interface,
|
||||
#endif
|
||||
|
||||
/* uid_t and friends on Linux 32 bit. This means we can just use the
|
||||
* default serializer for 32bit unsigned, for serializing it, and map
|
||||
* default serializer for 32-bit unsigned, for serializing it, and map
|
||||
* it to NULL here */
|
||||
assert_cc(sizeof(uid_t) == sizeof(uint32_t));
|
||||
#define bus_property_get_uid ((sd_bus_property_get_t) NULL)
|
||||
|
@ -953,12 +953,12 @@ int config_parse_id128(
|
||||
|
||||
r = sd_id128_from_string(rvalue, &t);
|
||||
if (r < 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse 128bit ID/UUID, ignoring: %s", rvalue);
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse 128-bit ID/UUID, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (sd_id128_is_null(t)) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, 0, "128bit ID/UUID is all 0, ignoring: %s", rvalue);
|
||||
log_syntax(unit, LOG_WARNING, filename, line, 0, "128-bit ID/UUID is all 0, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -711,8 +711,8 @@ static int dissect_image(
|
||||
sd_id128_t fsuuid, vuuid;
|
||||
|
||||
/* If a root hash is supplied, then we use the root partition that has a UUID that match the
|
||||
* first 128bit of the root hash. And we use the verity partition that has a UUID that match
|
||||
* the final 128bit. */
|
||||
* first 128-bit of the root hash. And we use the verity partition that has a UUID that match
|
||||
* the final 128-bit. */
|
||||
|
||||
if (verity->root_hash_size < sizeof(sd_id128_t))
|
||||
return -EINVAL;
|
||||
|
@ -85,12 +85,9 @@ int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags f
|
||||
((unsigned) (n[1] - '0') * 10) +
|
||||
((unsigned) (n[2] - '0'));
|
||||
|
||||
/* Don't allow anything that doesn't
|
||||
* fit in 8bit. Note that we do allow
|
||||
* control characters, as some servers
|
||||
* (e.g. cloudflare) are happy to
|
||||
* generate labels with them
|
||||
* inside. */
|
||||
/* Don't allow anything that doesn't fit in 8 bits. Note that we do allow
|
||||
* control characters, as some servers (e.g. cloudflare) are happy to
|
||||
* generate labels with them inside. */
|
||||
if (k > 255)
|
||||
return -EINVAL;
|
||||
|
||||
@ -297,7 +294,7 @@ int dns_label_escape_new(const char *p, size_t l, char **ret) {
|
||||
int dns_label_apply_idna(const char *encoded, size_t encoded_size, char *decoded, size_t decoded_max) {
|
||||
_cleanup_free_ uint32_t *input = NULL;
|
||||
size_t input_size, l;
|
||||
bool contains_8bit = false;
|
||||
bool contains_8_bit = false;
|
||||
char buffer[DNS_LABEL_MAX+1];
|
||||
int r;
|
||||
|
||||
@ -315,9 +312,9 @@ int dns_label_apply_idna(const char *encoded, size_t encoded_size, char *decoded
|
||||
|
||||
for (const char *p = encoded; p < encoded + encoded_size; p++)
|
||||
if ((uint8_t) *p > 127)
|
||||
contains_8bit = true;
|
||||
contains_8_bit = true;
|
||||
|
||||
if (!contains_8bit) {
|
||||
if (!contains_8_bit) {
|
||||
if (encoded_size > DNS_LABEL_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
* interface with this. */
|
||||
|
||||
typedef union JsonValue {
|
||||
/* Encodes a simple value. This structure is generally 8 bytes wide (as double is 64bit). */
|
||||
/* Encodes a simple value. This structure is generally 8 bytes wide (as double is 64-bit). */
|
||||
bool boolean;
|
||||
double real;
|
||||
int64_t integer;
|
||||
|
@ -21,7 +21,7 @@
|
||||
In case you wonder why we have our own JSON implementation, here are a couple of reasons why this implementation has
|
||||
benefits over various other implementations:
|
||||
|
||||
- We need support for 64bit signed and unsigned integers, i.e. the full 64,5bit range of -9223372036854775808…18446744073709551615
|
||||
- We need support for 64-bit signed and unsigned integers, i.e. the full 64,5bit range of -9223372036854775808…18446744073709551615
|
||||
- All our variants are immutable after creation
|
||||
- Special values such as true, false, zero, null, empty strings, empty array, empty objects require zero dynamic memory
|
||||
- Progressive parsing
|
||||
|
@ -3972,7 +3972,7 @@ union bpf_attr {
|
||||
*
|
||||
* u64 bpf_jiffies64(void)
|
||||
* Description
|
||||
* Obtain the 64bit jiffies
|
||||
* Obtain the 64-bit jiffies
|
||||
* Return
|
||||
* The 64 bit jiffies
|
||||
*
|
||||
|
@ -1093,7 +1093,7 @@ struct ethtool_rx_flow_spec {
|
||||
/* How rings are laid out when accessing virtual functions or
|
||||
* offloaded queues is device specific. To allow users to do flow
|
||||
* steering and specify these queues the ring cookie is partitioned
|
||||
* into a 32bit queue index with an 8 bit virtual function id.
|
||||
* into a 32-bit queue index with an 8 bit virtual function id.
|
||||
* This also leaves the 3bytes for further specifiers. It is possible
|
||||
* future devices may support more than 256 virtual functions if
|
||||
* devices start supporting PCIe w/ARI. However at the moment I
|
||||
|
@ -6,9 +6,9 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
/* Wrapper around the QCMD() macro of linux/quota.h that removes some undefined behaviour. A typical quota
|
||||
* command such as QCMD(Q_GETQUOTA, USRQUOTA) cannot be resolved on platforms where "int" is 32bit, as it is
|
||||
* command such as QCMD(Q_GETQUOTA, USRQUOTA) cannot be resolved on platforms where "int" is 32-bit, as it is
|
||||
* larger than INT_MAX. Yikes, because that are basically all platforms Linux supports. Let's add a wrapper
|
||||
* that explicitly takes its arguments as unsigned 32bit, and then converts the shift result explicitly to
|
||||
* that explicitly takes its arguments as unsigned 32-bit, and then converts the shift result explicitly to
|
||||
* int, acknowledging the undefined behaviour of the kernel headers. This doesn't remove the undefined
|
||||
* behaviour, but it stops ubsan from complaining about it. */
|
||||
static inline int QCMD_FIXED(uint32_t cmd, uint32_t type) {
|
||||
|
@ -13,7 +13,7 @@
|
||||
* to write our own implementation relatively easily. However, the main reasons are these:
|
||||
*
|
||||
* • We want to use our own JSON subsystem, with all the benefits that brings (i.e. accurate unsigned+signed
|
||||
* 64bit integers, full fuzzing, logging during parsing and so on). If we'd want to use that with
|
||||
* 64-bit integers, full fuzzing, logging during parsing and so on). If we'd want to use that with
|
||||
* libvarlink we'd have to serialize and deserialize all the time from its own representation which is
|
||||
* inefficient and nasty.
|
||||
*
|
||||
|
@ -99,7 +99,7 @@ typedef void (*_sd_destroy_t)(void *userdata);
|
||||
} \
|
||||
struct _sd_useless_struct_to_allow_trailing_semicolon_
|
||||
|
||||
/* The following macro should be used in all public enums, to force 64bit wideness on them, so that we can
|
||||
/* The following macro should be used in all public enums, to force 64-bit wideness on them, so that we can
|
||||
* freely extend them later on, without breaking compatibility. */
|
||||
#define _SD_ENUM_FORCE_S64(id) \
|
||||
_SD_##id##_INT64_MIN = INT64_MIN, \
|
||||
|
@ -64,7 +64,7 @@ static int fdisk_partition_get_attrs_as_uint64(
|
||||
continue;
|
||||
}
|
||||
|
||||
if (u >= sizeof(flags)*8) { /* partition flags on GPT are 64bit. Let's ignore any further
|
||||
if (u >= sizeof(flags)*8) { /* partition flags on GPT are 64-bit. Let's ignore any further
|
||||
bits should libfdisk report them */
|
||||
log_debug("Partition flag above bit 63 (%s), ignoring.", word);
|
||||
continue;
|
||||
|
@ -229,7 +229,7 @@ static void test_apply_ambient_caps(void) {
|
||||
assert_se(prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_IS_SET, CAP_CHOWN, 0, 0) == 0);
|
||||
}
|
||||
|
||||
static void test_ensure_cap_64bit(void) {
|
||||
static void test_ensure_cap_64_bit(void) {
|
||||
_cleanup_free_ char *content = NULL;
|
||||
unsigned long p = 0;
|
||||
int r;
|
||||
@ -241,7 +241,7 @@ static void test_ensure_cap_64bit(void) {
|
||||
|
||||
assert_se(safe_atolu(content, &p) >= 0);
|
||||
|
||||
/* If caps don't fit into 64bit anymore, we have a problem, fail the test. */
|
||||
/* If caps don't fit into 64-bit anymore, we have a problem, fail the test. */
|
||||
assert_se(p <= 63);
|
||||
|
||||
/* Also check for the header definition */
|
||||
@ -303,7 +303,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
test_setup_logging(LOG_DEBUG);
|
||||
|
||||
test_ensure_cap_64bit();
|
||||
test_ensure_cap_64_bit();
|
||||
|
||||
test_last_cap_file();
|
||||
test_last_cap_probe();
|
||||
|
@ -25,7 +25,7 @@ TEST(parse_devnum) {
|
||||
}
|
||||
|
||||
TEST(device_major_minor_valid) {
|
||||
/* on glibc dev_t is 64bit, even though in the kernel it is only 32bit */
|
||||
/* on glibc dev_t is 64-bit, even though in the kernel it is only 32-bit */
|
||||
assert_cc(sizeof(dev_t) == sizeof(uint64_t));
|
||||
|
||||
assert_se(DEVICE_MAJOR_VALID(0U));
|
||||
|
@ -79,7 +79,7 @@ static double ts_to_d(const struct timespec *ts) {
|
||||
}
|
||||
|
||||
static uint32_t graceful_add_offset_1900_1970(time_t t) {
|
||||
/* Adds OFFSET_1900_1970 to t and returns it as 32bit value. This is handles overflows
|
||||
/* Adds OFFSET_1900_1970 to t and returns it as 32-bit value. This is handles overflows
|
||||
* gracefully in a deterministic and well-defined way by cutting off the top bits. */
|
||||
uint64_t a = (uint64_t) t + OFFSET_1900_1970;
|
||||
return (uint32_t) (a & UINT64_C(0xFFFFFFFF));
|
||||
|
Loading…
Reference in New Issue
Block a user