Karel Zak [Thu, 2 Feb 2023 15:33:53 +0000 (16:33 +0100)]
Merge branch 'lsfd-minor-updates' of https://github.com/masatake/util-linux
* 'lsfd-minor-updates' of https://github.com/masatake/util-linux:
lsfd: use skip_space()
lsfd: use "struct in_addr" to represent IPv4 addresses
lsfd: don't put a spcae between a function and its arguments
lsfd: delete a redundant cast operation
tests: (mkfds) fix typos in error messages
tests: (mkfds) fix typos in factory descriptions
tests: (mkfds) check the privilege required in the factory to run
Karel Zak [Thu, 2 Feb 2023 15:20:43 +0000 (16:20 +0100)]
include/cctype: fix License header
This file has been originally imported from gnulib with GPL header,
but it's now available with LGPLv2+ now (since gnulib commit https://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/c-ctype.h?id=5ffa144085078c72e7d60759ab2d6100b04cd2c2).
Fixes: https://github.com/util-linux/util-linux/issues/2050 Signed-off-by: Karel Zak <kzak@redhat.com>
ThomasKaiser [Tue, 31 Jan 2023 10:58:24 +0000 (11:58 +0100)]
Adding older Apple cores based on XNU kernel source
Naming based on https://opensource.apple.com/source/xnu/xnu-7195.81.3/osfmk/arm/cpuid.h.auto.html and https://en.wikipedia.org/wiki/List_of_Apple_codenames#Apple-designed_processors
No idea about IDs of the new and more interesting Sawtooth and Everest cores in the A16 SoC. I'll leave this for the Asahi people to discover...
Antoine Beaupré [Thu, 26 Jan 2023 16:21:16 +0000 (11:21 -0500)]
add more concrete examples of how to use chrt(1)
I've come looking at this manpage with the simple "how do I make this
process use realtime scheduling?" question and couldn't find a
definite answer. Of course, RT is more complicated than "just make
this real time": there's various queues and scheduling classes, but I
think it's worth giving a good, simple example that should basically
work.
In particular, my use case was "my audio is stuttering, is this a
scheduling problem?" By picking the RR scheduler, we set a realtime
scheduling priority that's lower than kernel threads (e.g. migration
is FF/99, irq is FF/50) so that we go above existing processes, but
without kicking out more critical systems.
This, of course, is a matter of taste, and the settings here are a
little arbitrary. I send this patch in the hope that either those are
accepted as canon (which would surprise me) or that someone comes up
with a more canonical example.
The "reset" example also seems like a more critical addition to the
manual.
Finally, I change the name of the section from USAGE to the more
standard EXAMPLES, as per man-pages(7).
These checks are redundant as we already validated
* `dev_idx < bcs->nr_devices` in `probe_bcachefs()`
* `field + BYTES(field) < sb_end` in `probe_bcachefs_sb_fields()`
* `member_field_end(members, bcs->nr_devices - 1) == field + BYTES(field)`
right above.
Karel Zak [Wed, 25 Jan 2023 11:40:30 +0000 (12:40 +0100)]
Merge branch 'dmesg-subsecond' of https://github.com/t-8ch/util-linux
* 'dmesg-subsecond' of https://github.com/t-8ch/util-linux:
dmesg: use subsecond granularity in iso format
dmesg: add subsecond granularity for --since and --until
lib/monotonic: get_suspended_time: use usec_t
timeutils: add utilities for usec_t conversions
dmesg: add test for --since and --until
Thomas Weißschuh [Wed, 11 Jan 2023 19:10:57 +0000 (19:10 +0000)]
lib/sysfs: fix semantics of blkdev_is_hotpluggable
This is now decoubled from the kernels notion of a removable *block*
device and instead uses removable kobjects.
This is the correct semantic for hotpluggable devices.
Thomas Weißschuh [Wed, 11 Jan 2023 18:13:50 +0000 (18:13 +0000)]
lib/sysfs: add function blkdev_is_removable
This exactly represents the kernels notion of a "removable" blockdevice.
That is, the device itself is persistent but can contain some sort of
medium that can be changed at runtime.
Specifically it is *not* hotpluggable.
Karel Zak [Tue, 24 Jan 2023 15:45:42 +0000 (16:45 +0100)]
Merge branch 'signal_safety' of https://github.com/crrodriguez/util-linux
* 'signal_safety' of https://github.com/crrodriguez/util-linux:
sulogin: only assign to variables written by signal handlers
hardlink: calling putchar is off-limits on a signal handler
hardlink: last_signal should be a volatile sig_atomic_t
pg: calling exit on signal handler is not allowed
lib:pager: fix signal safety issues
write: signal_received should be volatile qualified
flock: timeout_expired must be volatile qualified
last: should not use errx/warnx on signal handlers
su-common: bool is a distinct type in c2x
fsck: only assign to cancel_requested
fsck: use sig_atomic_t type fot signal handler global vars
Karel Zak [Mon, 23 Jan 2023 13:09:27 +0000 (14:09 +0100)]
Merge branch 'bcachefs-fuzz' of https://github.com/t-8ch/util-linux
* 'bcachefs-fuzz' of https://github.com/t-8ch/util-linux:
libblkid: bcachefs: limit maximum size of read superblock
libblkid: iso9660: don't warn on isonum mismatch
libblkid: bcachefs: fix member_field_end
libblkid: bcachefs: validate size of member field
libblkid: bcachefs: fix field type
libblkid: bcachefs: add reproducer for oss-fuzz 55282
libblkid: bcachefs: fix endless loop
Samanta Navarro [Fri, 20 Jan 2023 11:57:15 +0000 (11:57 +0000)]
fsck.cramfs: print correct error on 32-bit systems
On 32-bit systems the file length check does not handle files correctly
which are larger than 4 GB. Use an unsigned long long which is already
in place for blkdev_get_size.
ThomasKaiser [Sun, 22 Jan 2023 09:36:01 +0000 (10:36 +0100)]
Add HiSilicon's 0x48/0xd40 Cortex-A76 variant.
Both Kirin 980 and Kirin 810 feature big cores with 0x48/0xd40 ID though they are marketed/documented as Cortex-A76 by HiSilicon themselves. Kirin 980 shows a r1p0 stepping while newer 810 has r3p0.
ThomasKaiser [Sat, 21 Jan 2023 17:03:11 +0000 (18:03 +0100)]
Add 53/002:Samsung Exynos-m3
ID 002 for the Exynos-m3 core seems weird since Exynos-m1 had 001 but Samsung's Mongoose line differs only by stepping between M1 and M2
* Mongoose 1, for example [Exynos 8890](https://github.com/ThomasKaiser/sbc-bench/blob/master/results/Exynos-8890-highperformance.cpuinfo): Exynos-m1 / r1p1
* Mongoose 2, for example [Exynos 8895](https://github.com/ThomasKaiser/sbc-bench/blob/master/results/Exynos-8895.cpuinfo): Exynos-m1 / r4p0
* Mongoose 3, for example [Exynos 9810](https://github.com/ThomasKaiser/sbc-bench/blob/master/results/Exynos-9810.cpuinfo): Exynos-m3 / r1p0