util-linux util-linux is a random collection of Linux utilities Note: for the years 2006-2010 this project was named "util-linux-ng". COMPILE & INSTALL: See Documentation/howto-compilation.txt. MAILING LIST: E-MAIL: [email protected] URL: http://vger.kernel.org/vger-lists.html#util-linux ARCHIVE: https://lore.kernel.org/util-linux/ The mailing list will reject email messages that contain: - more than 100K characters - html - spam phrases/keywords See: http://vger.kernel.org/majordomo-info.html#taboo IRC CHANNEL: #util-linux at freenode.net: irc://chat.freenode.net/util-linux The IRC channel and Mailing list are for developers and project maintainers. For end users it is recommended to utilize the distribution's support system. BUG REPORTING: E-MAIL: [email protected] Web: https://github.com/karelzak/util-linux/issues This project has no resources to provide support for distribution specific issues. For end users it is recommended to utilize the distribution's support system. NLS (PO TRANSLATIONS): PO files are maintained by: http://translationproject.org/domain/util-linux.html VERSION SCHEMA: Standard releases:. [. ] major = fatal and deep changes minor = typical release with new features maint = maintenance releases; bug fixes only Development releases: . -rc SOURCE CODE: Download archive: https://www.kernel.org/pub/linux/utils/util-linux/ See also: Documentation/howto-contribute.txt Documentation/howto-build-sys.txt Documentation/howto-pull-request.txt SCM (Source Code Management) Repository: Primary repository: git clone git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git Backup repository: git clone git://github.com/karelzak/util-linux.git Web interfaces: http://git.kernel.org/cgit/utils/util-linux/util-linux.git https://github.com/karelzak/util-linux Note: the GitHub repository may contain temporary development branches too. The kernel.org repository contains master (current development) and stable/* (maintenance) branches only. All master or stable/* changes are always pushed to both repositories at the same time. Repository Branches: 'git branch -a' master branch - current development - the source for stable releases when deemed ready. - day-to-day status is: 'it works for me'. This means that its normal state is useful but not well tested. - long-term development or invasive changes in active development are forked into separate 'topic' branches from the tip of 'master'. stable/ branches - public releases - branch name: stable/v . . - created from the 'master' branch after two or more release candidates and the final public release. This means that the stable releases are committed, tagged, and reachable in 'master'. - these branches then become forked development branches. This means that any changes made to them diverge from the 'master' branch. - maintenance releases are part of, and belong to, their respective stable branch. As such, they are tags( . . ) and not branches of their own. They are not part of, visible in, or have anything to do with the 'master' development branch. In git terminology: maintenance releases are not reachable from 'master'. - when initially cloned (as with the 'git clone' command given above) these branches are created as 'remote tracking branches' and are only visible by using the -a or -r options to 'git branch'. To create a local branch use the desired tag with this command: 'git checkout -b v2.29.2 v2.29.2' Tags: 'git tag' - a new tag object is created for every release. - tag name: v . - all tags are signed by the maintainer's PGP key. Known Bugs: - don't use tag v2.13.1 (created and published by mistake), use v2.13.1-REAL instead. WORKFLOW EXAMPLE: 1) development (branch: ) 2) master release (tags: v2.29-rc1, v2.29-rc2, v2.29, branch: ) 3) development (work on v2.30, branch: ) 4) fork -- create a new branch based on tag v2.29 4a) new patches or cherry-pick patches from (branch: ) 4b) stable release (tag: v2.29.1, branch: ) 4c) more patches; another release (tag: v2.29.2, branch: ) 5) master release v2.30 (branch: ) ... where 3) and 4) happen simultaneously.
util-linux is a random collection of Linux utilities
Overview
Comments
-
CD cannot be mounted automatically (The cd was burned twice in Windows)
A CD (DVD+R), formatted as udf file system. Burn the disc under the windows system for the first time, and the disc can be mounted normally under linux.
Then burn the disc for the second time under windows (additional burn). At this time, the disc cannot be automatically mounted, and it can be used after manual mounting.
Note that by changing the version of libblkid1, it is found that this problem does not exist in versions prior to 2.31.1-0.5 (including this version).
You can test it through the Ubuntu system.
The following is the blkid command information of the CD (Disc burned twice in the windos system) in the linux system.
libblkid1_2.31.1-0.5: uos-PC:~$ blkid …… /dev/sr0: UUID="0930121120554446" LABEL="kelu2" TYPE="udf" /dev/sdb1: LABEL_FATBOOT="UKNOWN" LABEL="UKNOWN" TYPE="vfat" uos-PC:~$ blkid -o list device fs_type label mount point UUID …… /dev/sr0 udf kelu2 /media/uos/disk 0930121120554446 libblkid1_2.32-0.1: uos-PC:~$ blkid …… /dev/sr0: UUID="0930121120554446" LABEL="kelu2" TYPE="udf" uos@uos-PC:~$ blkid -o list device fs_type label mount point UUID …… /dev/sr0 udf kelu2 (not mounted) 0930121120554446
-
RFC: lsfd, a brand new Linux specific replacement for lsof
As you noticed at https://github.com/lsof-org/lsof/issues/89, I have developed lsfd. lsfd is a command like lsof. The critical differences are (1) lsfd is specialized to Linux, and (2) lsfd is based on libsmartcols.
This pull request is for getting comments. Socket-related information is not extracted yet. The filtering feature that lsof is not implemented yet. Test cases are not available yet. The man page is not available yet. They are parts of future work.
A quirk in this pull request is about POSIX threads. I assumed using multiple threads may improve the performance of listing. After implementing and measuring the execution time, I found the performance is not so improved as I expected. So I deleted the code for multi-threading.
Anyway, I made so many commits. I would like to get comments before going ahead more.
example output:
$ sudo ./lsfd | grep -v mem | head -30 COMMAND PID USER ASSOC MODE TYPE DEVNAME MNTID INODE NAME systemd 1 root exe --- REG dm-0 0 201398717 /usr/lib/systemd/systemd systemd 1 root cwd --- DIR dm-0 0 96 / systemd 1 root rtd --- DIR dm-0 0 96 / systemd 1 root cgroup --- REG 0:4 0 4026531835 cgroup:[4026531835] systemd 1 root ipc --- REG 0:4 0 4026531839 ipc:[4026531839] systemd 1 root mnt --- REG 0:4 0 4026531840 mnt:[4026531840] systemd 1 root net --- REG 0:4 0 4026532000 net:[4026532000] systemd 1 root pid --- REG 0:4 0 4026531836 pid:[4026531836] systemd 1 root pid4c --- REG 0:4 0 4026531836 pid:[4026531836] systemd 1 root time --- REG 0:4 0 4026531834 time:[4026531834] systemd 1 root time4c --- REG 0:4 0 4026531834 time:[4026531834] systemd 1 root user --- REG 0:4 0 4026531837 user:[4026531837] systemd 1 root uts --- REG 0:4 0 4026531838 uts:[4026531838] ...
check list taken from @karelzak's [comments](https://github.com/karelzak/util-linux/pull/1418#issuecomment-905455422):
- [x] ~it would be nice to avoid generic struct names like "file", it would be better to have for example "struct lsfd_file", etc.~ the request for change is canceld
- [x] can we parse "name" and deduce TYPE rather than use UNKN? , for example...seems like we can use INOTIFY, SIGNAL, and TIMER there
- [ ] Why the same file for the same task is printed more than once: ... it would be nice to add a hint about the difference to the output. Now it's confusing.
- [ ] It would be nice to support more "views", the current output is huge, and add some aggregations to reduce it would be useful in some use-cases:
- [ ] commands/tasks -- provides complete info; (the current implementation) the relation COMMAND:INODE:etc is unique
- [ ] file - provide a list of used inodes; INODE is unique in output, COMMAND is not printed and replaced by the number of processes (aka NPROCS - see lsns where we do the same), USER is replaced by NUSERS, etc.
- [ ] user - provide a list of users who has open something; UID is unique in output, INODE is replaced by NFILES and COMMAND by NPROCS, etc.
- [x] summary - just two columns, description and value, something like:
- [x] number of open files: 123
- [x] number of processes: 567
- [x] used types: REG,DIR,SOCK,INOTIFY, ....
- [ ] used block devices: sda1, sdb2, ...
- [x] add MAJ:MIN for major and minor numbers, remove DEVICE (we use MAJ:MIN in other tools)
- [x] add DEVTYPE for blk, char, and nodev
- [x] remove "nodev:" from DEVNAME
- [x] maybe rename DEVNAME to SOURCE as we have here things like 'devtmpfs' etc.
- [ ] add filters; yes I know, you can use grep, but for some use-cases like JSON or when you filter by data that is missing in the output it's better to have a basic filter in the command:
- [x] ~add filter by TYPE (lsfd --type REG)~ → write the way to do the same with -Q option to lsfd.1.
- [ ] add filter by filename/path (lsfd /usr or lsfd /etc/passwd)
- [ ] ~add filter by SOURCE (lsfd --source sda1)~ → write the way to do the same with -Q option to lsfd.1.
- [x] ~add filter by DEVTYPE (lsfd --devtype blk)~ → write the way to do the same with -Q option to lsfd.1.
- [x] ~add filter by COMMAND (lsfd --command system)~ → write the way to do the same with -Q option to lsfd.1.
- [x] ~add filter by task type, userspace vs. kerne threads -- see ps(1) and commands with [name] (lsfd --kernel | --userspace)~
- [x] implement KTHREAD column.
- [x] write the way to do the same with -Q option to lsfd.1.
- [x] ~add --deleted and --nodeleted~ → write the way to do the same with -Q option to lsfd.1.
- [ ] filters should be possible to use with "views" (lsfd --summary --command systemd)
- [x] man page
- [x] cherry-pick @mariobl's work submitted to the utli-linux mailing list, https://lore.kernel.org/util-linux/CAHi0vA8dhcyzDUAfCjuo=vwEGK2Y_8K5GFZC9f8aaFUbO-hK1A@mail.gmail.com/T/#u as the base version
- [x] write about filtering
- [x] add examples
- [x] write the details of columns
my check list:
- [x] -p/--pids filter working at information gathering time. This option works well with pidof as strace's -p option does.
- [x] generic filtering engine
- [x] regex pattern in filter expression
- [ ] test cases
- file type aspects
- [x] regular file
- [x] pipe
- [x] directory
- [x] symlink
- [x] char dev
- [x] blk dev
- [x] sockets
- [x] socketpair (AF_UNIX, SOCK_STREAM, 0)
- [x] anon_inodes
- column aspects
- [ ] ASSOC
- [x] CHRDRV
- [x] COMMAND
- [ ] DELETED
- [x] DEV
- [x] DEVTYPE
- [x] FD
- [x] FLAGS
- [x] INODE
- [x] MAJ:MIN
- [ ] MAPLEN
- [ ] MISCDEV
- [x] MNTID
- [x] MODE
- [x] NAME
- [x] NLINK
- [ ] PARTITION
- [x] PID
- [x] POS
- [x] PROTONAME
- [x] RDEV
- [x] SIZE
- [x] SOURCE
- [ ] TID
- [x] TYPE
- [x] UID
- [x] USER
- [ ] FUID
- [ ] OWNER
- file type aspects
- [x] various status about socket
- [ ] IPC end points features like -E option implemented in lsof
- [ ] file desciptor based IPC end points
- [x] FIFOs
- [ ] UNIX socket
- [ ] PTY master/slave
- [ ] INET socket used in localhost
- [ ] posix_mqueue
- [ ] eventfd
- [ ] eventpoll?
- [ ] sheme based IPC end points
- [ ] file desciptor based IPC end points
- [ ] more consideration about namespaces
- [ ] collect more info from fdinfo
- [ ] inotify
- [ ] epoll
- [ ] eventfd
- [ ] pts
- [ ] /dev/net/tun
- [ ] cmdline completion rules for bash
- [ ]
--no-wrap
option - [ ] whatever lsof supports
-
How to compile util-linux on mac?
I got the following error when I run
make
on Mac OS X.Does anybody know what is wrong?
$ make sys-utils/flock gcc -g -O2 sys-utils/flock.c -o sys-utils/flock sys-utils/flock.c:42:10: fatal error: 'c.h' file not found #include "c.h" ^~~~~ 1 error generated. make: *** [sys-utils/flock] Error 1
$ make ... CC sys-utils/ipcrm.o sys-utils/ipcrm.c:246:17: error: variable has incomplete type 'struct seminfo' struct seminfo seminfo; ^ sys-utils/ipcrm.c:246:9: note: forward declaration of 'struct seminfo' struct seminfo seminfo; ^ sys-utils/ipcrm.c:253:21: error: use of undeclared identifier 'SHM_INFO' maxid = shmctl(0, SHM_INFO, &shmseg); ^ sys-utils/ipcrm.c:258:23: error: use of undeclared identifier 'SHM_STAT' rm_me = shmctl(id, SHM_STAT, &shmseg); ^ sys-utils/ipcrm.c:266:24: error: use of undeclared identifier 'SEM_INFO' maxid = semctl(0, 0, SEM_INFO, arg); ^ sys-utils/ipcrm.c:272:26: error: use of undeclared identifier 'SEM_STAT' rm_me = semctl(id, 0, SEM_STAT, arg); ^ 5 errors generated. make[2]: *** [sys-utils/ipcrm.o] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
-
enabling libcryptsetup dependency (for verity) causes conflicts with other libraries
Until recently, libmount was a low-level library with few dependencies, that could be safely depended on by things like GLib.
The addition of the optional libcryptsetup dependency changes that somewhat. There seem to be two main problem areas causing crashes in distributions that have enabled it, such as recent development versions of Debian and Ubuntu:
-
The json-c library contains symbols that collide with other JSON libraries such as libjansson (akheron/jansson#523, json-c/json-c#621) and json-glib (json-glib#33), because it seems every implementation of JSON in C has chosen to use the
json_
namespace. This is particularly troublesome for anything that depends on json-glib, which depends on GLib, which depends on libmount, which depends on libcryptsetup, which depends on json-c, almost guaranteeing symbol conflicts. -
libcryptsetup's default/recommended OpenSSL backend for crypto has symbol conflicts with anything that statically links a different version of OpenSSL, which seems to be popular in the proprietary software world (Steam and Minecraft are known to be affected). ValveSoftware/steam-for-linux#7223 and ValveSoftware/steam-for-linux#6861 are examples of this.
I don't know which project(s) should take action to solve this, but I'm trying to make sure all the upstreams involved in this collision are at least aware that there's a problem, so that whatever action is taken can be somewhat coordinated.
One way that this might be solved within libmount (if that is considered to be a desirable place to solve it) would be to move the verity feature into a helper executable, or perhaps into a dlopened module that is loaded with
RTLD_LOCAL
to avoid it interfering with symbol resolution in the flat default ELF namespace.Another possible solution, if the verity feature is mostly of interest to embedded or special-purpose distributions, would be to recommend that general-purpose distributions disable that feature.
-
-
libblkid: improve identification of ISO9660 partition
This addresses some feedback on https://github.com/karelzak/util-linux/pull/872 by ensuring (rather than assuming) that a partition table entry corresponds to the ISO9660 filesystem, and by only applying the logic to restrict the metadata to a partition device in cases where there is actually a device (which does not happen for CD/DVD /dev/sr0).
As noted, the udev behaviour here is also questionable and indeed if it behaved differently I might not have put attention into modifying blkid. However, I think the information presented by blkid in the case of a combined ISO & partition setup (where a partition points at the ISO data too) is questionable, where it effectively reports the same filesystem on two devices, so I think this approach still makes sense for blkid. Separately I'll take another look at the udev side, but probably not until next week.
-
ci: build & test util-linux on Fedora Rawhide via Packit
Let's run at least the unit-tests on Fedora Rawhide via Packit, as it supports a couple of alternative architectures (aarch64, ppc64le, s390x) as well as i*86, which were source of issues in the past.
-
hwclock Timed out waiting for time change Error
Good morning,
I have installed an RTC module with and when trying to read the time it gives me this error.
hwclock -r -v --rtc /dev/rtc1 hwclock from util-linux 2.37.154-c2ca2 System Time: 1625749015.843650 Using the rtc interface to the clock. Last drift adjustment done at 1625749005 seconds after 1969 Last calibration done at 1625749005 seconds after 1969 Hardware clock is on UTC time Assuming hardware clock is kept in UTC time. Waiting for clock tick... ioctl(3, RTC_UIE_ON, 0): Invalid argument Waiting in loop for time from /dev/rtc1 to change hwclock: Timed out waiting for time change. ...synchronization failed
Any idea?
Thanks!
-
Fedora hardlink vs Debian hardlink
It seems you have merged the Fedora version of hardlink into util-linux. This is unfortunate, as Debian, Ubuntu, Arch, and others are shipping a different hardlink, developed my me, that has a lot more features:
Usage: ./hardlink [options] directory|file ... Options: -V, --version show program's version number and exit -h, --help show this help message and exit -v, --verbose Increase verbosity (repeat for more verbosity) -n, --dry-run Modify nothing, just print what would happen -f, --respect-name Filenames have to be identical -p, --ignore-mode Ignore changes of file mode -o, --ignore-owner Ignore owner changes -t, --ignore-time Ignore timestamps (when testing for equality) -X, --respect-xattrs Respect extended attributes -m, --maximize Maximize the hardlink count, remove the file with lowest hardlink cout -M, --minimize Reverse the meaning of -m -O, --keep-oldest Keep the oldest file of multiple equal files (lower precedence than minimize/maximize) -x REGEXP, --exclude=REGEXP Regular expression to exclude files -i REGEXP, --include=REGEXP Regular expression to include files/dirs -s <num>[K,M,G], --minimum-size=<num>[K,M,G] Minimum size for files. Optional suffix allows for using KiB, MiB, or GiB Compatibility options to Jakub Jelinek's hardlink: -c Compare only file contents, same as -pot
Switching to this version of hardlink would break things for a lot of users. Apart from the meaning of
-f
, mine is a superset option-wise.I'd argue given that my version is a superset of this version, we should probably consolidate on this one. I think I mentioned this to Jakub back in the day, but I'm not sure.
ASSIGNED -
lscpu 2.38 crashing with seg fault on aarch64_cortex-a53
Recent OpenWrt install seg faults with all the parameter combinations I've tested (except -h and -V, they work fine). Reported on https://github.com/openwrt/openwrt/issues/10737, where it's felt to be an upstream issue.
$ cat /etc/os-release NAME="OpenWrt" VERSION="SNAPSHOT" ID="openwrt" ID_LIKE="lede openwrt" PRETTY_NAME="OpenWrt SNAPSHOT" VERSION_ID="snapshot" HOME_URL="https://openwrt.org/" BUG_URL="https://bugs.openwrt.org/" SUPPORT_URL="https://forum.openwrt.org/" BUILD_ID="r20614-c27279dc26" OPENWRT_BOARD="mediatek/mt7622" OPENWRT_ARCH="aarch64_cortex-a53" OPENWRT_TAINTS="" OPENWRT_DEVICE_MANUFACTURER="OpenWrt" OPENWRT_DEVICE_MANUFACTURER_URL="https://openwrt.org/" OPENWRT_DEVICE_PRODUCT="Generic" OPENWRT_DEVICE_REVISION="v0" OPENWRT_RELEASE="OpenWrt SNAPSHOT r20614-c27279dc26" $ opkg install lscpu Package lscpu (2.38-2) installed in root is up to date. $ lscpu -V lscpu from util-linux 2.38 $ lscpu Segmentation fault $ strace lscpu execve("/usr/bin/lscpu", ["lscpu"], 0x7fe684d110 /* 15 vars */) = 0 set_tid_address(0x7f8f939248) = 6160 brk(NULL) = 0x2980f000 brk(0x29811000) = 0x29811000 mmap(0x2980f000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2980f000 openat(AT_FDCWD, "/etc/ld-musl-aarch64.path", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/libsmartcols.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/local/lib/libsmartcols.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/libsmartcols.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 fstat(3, {st_mode=S_IFREG|0755, st_size=98307, ...}) = 0 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0`R\0\0\0\0\0\0"..., 960) = 960 mmap(NULL, 167936, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x7f8f879000 mmap(0x7f8f8a0000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x17000) = 0x7f8f8a0000 close(3) = 0 openat(AT_FDCWD, "/lib/libgcc_s.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 fstat(3, {st_mode=S_IFREG|0644, st_size=73744, ...}) = 0 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\0-\0\0\0\0\0\0"..., 960) = 960 mmap(NULL, 143360, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x7f8f856000 mmap(0x7f8f877000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x11000) = 0x7f8f877000 close(3) = 0 mprotect(0x7f8f8a0000, 4096, PROT_READ) = 0 mprotect(0x7f8f877000, 4096, PROT_READ) = 0 mprotect(0x428000, 4096, PROT_READ) = 0 ioctl(1, TIOCGWINSZ, {ws_row=60, ws_col=200, ws_xpixel=2200, ws_ypixel=1200}) = 0 mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8f92e000 openat(AT_FDCWD, "/sys/devices/system/cpu", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 openat(3, "kernel_max", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8f92d000 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 read(4, "1\n", 1024) = 2 lseek(4, -1, SEEK_CUR) = 1 close(4) = 0 munmap(0x7f8f92d000, 4096) = 0 openat(3, "possible", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8f92d000 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 read(4, "0-1\n", 1024) = 4 close(4) = 0 munmap(0x7f8f92d000, 4096) = 0 openat(3, "present", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8f92d000 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 read(4, "0-1\n", 1024) = 4 close(4) = 0 munmap(0x7f8f92d000, 4096) = 0 openat(3, "online", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8f92d000 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 read(4, "0-1\n", 1024) = 4 close(4) = 0 munmap(0x7f8f92d000, 4096) = 0 openat(AT_FDCWD, "/proc", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 openat(4, "cpuinfo", O_RDONLY|O_LARGEFILE) = 5 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8f92d000 read(5, "processor\t: 0\nBogoMIPS\t: 25.00\nF"..., 1024) = 374 read(5, "", 1024) = 0 close(5) = 0 munmap(0x7f8f92d000, 4096) = 0 uname({sysname="Linux", nodename="panther", ...}) = 0 personality(PER_LINUX32) = 0 (PER_LINUX) personality(PER_LINUX) = 0x8 (PER_LINUX32) openat(3, "dispatching", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(3, "cpufreq/boost", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(4, "sysinfo", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) openat(3, "vulnerabilities", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5 fstat(5, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 fcntl(5, F_GETFL) = 0x20000 (flags O_RDONLY|O_LARGEFILE) mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8f92c000 fcntl(5, F_SETFD, FD_CLOEXEC) = 0 getdents64(5, 0x7f8f92c098 /* 13 entries */, 2048) = 416 getdents64(5, 0x7f8f92c098 /* 0 entries */, 2048) = 0 lseek(5, 0, SEEK_SET) = 0 getdents64(5, 0x7f8f92c098 /* 13 entries */, 2048) = 416 openat(3, "vulnerabilities/spectre_v2", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 6 read(6, "Not affected\n", 1023) = 13 read(6, "", 1010) = 0 close(6) = 0 openat(3, "vulnerabilities/itlb_multihit", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 6 read(6, "Not affected\n", 1023) = 13 read(6, "", 1010) = 0 close(6) = 0 openat(3, "vulnerabilities/mmio_stale_data", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 6 read(6, "Not affected\n", 1023) = 13 read(6, "", 1010) = 0 close(6) = 0 openat(3, "vulnerabilities/mds", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 6 read(6, "Not affected\n", 1023) = 13 read(6, "", 1010) = 0 close(6) = 0 openat(3, "vulnerabilities/l1tf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 6 read(6, "Not affected\n", 1023) = 13 read(6, "", 1010) = 0 close(6) = 0 openat(3, "vulnerabilities/spec_store_bypass", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 6 read(6, "Not affected\n", 1023) = 13 read(6, "", 1010) = 0 close(6) = 0 openat(3, "vulnerabilities/tsx_async_abort", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 6 read(6, "Not affected\n", 1023) = 13 read(6, "", 1010) = 0 close(6) = 0 openat(3, "vulnerabilities/spectre_v1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 6 read(6, "Mitigation: __user pointer sanit"..., 1023) = 40 read(6, "", 983) = 0 close(6) = 0 openat(3, "vulnerabilities/retbleed", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 6 read(6, "Not affected\n", 1023) = 13 read(6, "", 1010) = 0 close(6) = 0 openat(3, "vulnerabilities/srbds", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 6 read(6, "Not affected\n", 1023) = 13 read(6, "", 1010) = 0 close(6) = 0 openat(3, "vulnerabilities/meltdown", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 6 read(6, "Not affected\n", 1023) = 13 read(6, "", 1010) = 0 close(6) = 0 close(5) = 0 munmap(0x7f8f92c000, 8192) = 0 openat(AT_FDCWD, "/sys/devices/system/node", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory) faccessat(3, "cpu0/topology/thread_siblings", F_OK) = 0 openat(3, "cpu0/topology/thread_siblings", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8f92d000 fcntl(5, F_SETFD, FD_CLOEXEC) = 0 read(5, "", 1024) = 0 close(5) = 0 munmap(0x7f8f92d000, 4096) = 0 openat(3, "cpu0/topology/core_siblings", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8f92d000 fcntl(5, F_SETFD, FD_CLOEXEC) = 0 read(5, "", 1024) = 0 close(5) = 0 munmap(0x7f8f92d000, 4096) = 0 openat(3, "cpu0/topology/book_siblings", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(3, "cpu0/topology/drawer_siblings", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory) faccessat(3, "cpu1/topology/thread_siblings", F_OK) = 0 openat(3, "cpu1/topology/thread_siblings", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8f92d000 fcntl(5, F_SETFD, FD_CLOEXEC) = 0 read(5, "", 1024) = 0 close(5) = 0 munmap(0x7f8f92d000, 4096) = 0 openat(3, "cpu1/topology/core_siblings", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8f92d000 fcntl(5, F_SETFD, FD_CLOEXEC) = 0 read(5, "", 1024) = 0 close(5) = 0 munmap(0x7f8f92d000, 4096) = 0 openat(3, "cpu1/topology/book_siblings", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(3, "cpu1/topology/drawer_siblings", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory) --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x10} --- +++ killed by SIGSEGV +++ Segmentation fault
-
lscpu L3 cache size on Ryzen 5 1600
lscpu version 2.32 reports the CPU has 8 MiB cache, while the correct value is 16 MiB:
$ lscpu Model name: AMD Ryzen 5 1600 Six-Core Processor L3 cache: 8192K
/sys (Linux 4.17.0) provides the correct cache IDs:
$ cat /sys/devices/system/cpu/cpu0/cache/index3/id 0 $ cat /sys/devices/system/cpu/cpu6/cache/index3/id 1 $ cat /sys/devices/system/cpu/cpu0/cache/index3/size 8192K
It would be nice if lscpu printed the number of L1/L2/L3 caches, such as:
L1d cache: 6*32K L1i cache: 6*64K L2 cache: 6*512K L3 cache: 2*8192K
For comparison, lstopo version 1.11.2 (http://www.open-mpi.org/projects/hwloc/) works OK.
TODO -
[lsfd] tests failed
Hello!
@masatake
sparc64 host:
tests$ git describe v2.37-648-g1b44d0923 tests$ ./run.sh --show-diff lsfd -------------------- util-linux regression tests -------------------- For development purpose only. Don't execute on production system! kernel: 5.16.0-rc2 options: --show-diff \ --srcdir=/1/mator/util-linux/tests/.. \ --builddir=/1/mator/util-linux/tests/.. lsfd: directory ... SKIPPED (no root permissions) lsfd: directory ... OK lsfd: pipe, no fork ... OK lsfd: read-only regular file ... diff-{{{ --- /1/mator/util-linux/tests/expected/lsfd/mkfds-ro-regular-file 2021-11-26 16:29:39.397686937 +0300 +++ /1/mator/util-linux/tests/output/lsfd/mkfds-ro-regular-file 2021-11-26 17:57:41.055617042 +0300 @@ -13,4 +13,4 @@ MNTID[RUN]: 0 DEV[RUN]: 0 FINDMNT[RUN]: 0 -DEV[STR]: 0 +DEV[STR]: 1 }}}-diff FAILED (lsfd/mkfds-ro-regular-file) lsfd: character device with O_RDWR ... OK lsfd: AF_UNIX socket pair created with socketpair(2) ... diff-{{{ --- /1/mator/util-linux/tests/expected/lsfd/mkfds-socketpair 2021-11-26 16:29:39.397686937 +0300 +++ /1/mator/util-linux/tests/output/lsfd/mkfds-socketpair 2021-11-26 17:57:41.831650266 +0300 @@ -1,3 +1,3 @@ - 3 rw- SOCK sockfs UNIX - 4 rw- SOCK sockfs UNIX + 3 rw- SOCK sockfs UNIX-STREAM + 4 rw- SOCK sockfs UNIX-STREAM ASSOC,MODE,TYPE,SOURCE,PROTONAME: 0 }}}-diff FAILED (lsfd/mkfds-socketpair) lsfd: symbolic link itself opened with O_PATH ... OK lsfd: directory ... SKIPPED (no root permissions) lsfd: directory ... OK --------------------------------------------------------------------- 2 tests of 9 FAILED ---------------------------------------------------------------------
ppc64 host:
tests$ ./run.sh --show-diff lsfd -------------------- util-linux regression tests -------------------- For development purpose only. Don't execute on production system! kernel: 5.15.0-1-powerpc64 options: --show-diff \ --srcdir=/home/mator/util-linux.git/tests/.. \ --builddir=/home/mator/util-linux.git/tests/.. lsfd: directory ... SKIPPED (no root permissions) lsfd: directory ... OK lsfd: pipe, no fork ... OK lsfd: read-only regular file ... OK lsfd: character device with O_RDWR ... diff-{{{ --- /home/mator/util-linux.git/tests/expected/lsfd/mkfds-rw-character-device 2021-11-26 18:08:03.405921213 +0300 +++ /home/mator/util-linux.git/tests/output/lsfd/mkfds-rw-character-device 2021-11-26 19:08:30.724078893 +0300 @@ -3,4 +3,4 @@ MNTID[RUN]: 0 DEV[RUN]: 0 FINDMNT[RUN]: 0 -DEV[STR]: 0 +DEV[STR]: 1 }}}-diff FAILED (lsfd/mkfds-rw-character-device) lsfd: AF_UNIX socket pair created with socketpair(2) ... diff-{{{ --- /home/mator/util-linux.git/tests/expected/lsfd/mkfds-socketpair 2021-11-26 18:08:03.405921213 +0300 +++ /home/mator/util-linux.git/tests/output/lsfd/mkfds-socketpair 2021-11-26 19:08:30.868079286 +0300 @@ -1,3 +1,3 @@ - 3 rw- SOCK sockfs UNIX - 4 rw- SOCK sockfs UNIX + 3 rw- SOCK sockfs UNIX-STREAM + 4 rw- SOCK sockfs UNIX-STREAM ASSOC,MODE,TYPE,SOURCE,PROTONAME: 0 }}}-diff FAILED (lsfd/mkfds-socketpair) lsfd: symbolic link itself opened with O_PATH ... OK lsfd: directory ... SKIPPED (no root permissions) lsfd: directory ... OK --------------------------------------------------------------------- 2 tests of 9 FAILED ---------------------------------------------------------------------
-
libmount: ensure child hangs around until we persisted namespace
When we create a new namespace in a child process to persist it we need to ensure that the child hangs around. During exit the child will drop all references to its namespaces and so by the time we call open we might already fail to open the namespace. Fix this.
Signed-off-by: Christian Brauner (Microsoft) [email protected]
-
schedutils: clarify the usage and behavior of the taskset command
Provide some minor improvements to the existing taskset man page, namely:
-- Illustrate the ability to specify cpumasks without a leading "0x" with an example that is clearly hexadecimal.
-- Clarify that a successful return code from the command does not mean that a process has actually migrated.
-- Provide a couple of examples to further explain the significance of the taskset return code.
-
[ Question ] Just a few questions how mount working.
I see this link from " man umont ". I am not reporting any bugs. I tried only ask.
I've been a Linux user for many years and I don't always see a change for the better . Maybe it's just a problem with my Linux distribution, so I tried ask. For now I tried test Ubuntu 22.04.1 LTS (Jammy Jellyfish) MATE 1.26.0
- I don't see GUI which will work from Desktop or file manager.
- For to change disk partition permissions.
Fedora created gnome-disks , but it's a separate app and when I used it , the path was changed every time, when I booted the system. I need constant path, so for now I'm using /etc/fstab ( and path /media )
- I see snap in mount point where there should only be hard drive partitions.
$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 7:0 0 4K 1 loop /snap/bare/5 loop1 7:1 0 146,6M 1 loop /snap/chromium/2238 loop2 7:2 0 146,9M 1 loop /snap/chromium/2254 loop3 7:3 0 63,2M 1 loop /snap/core20/1738 loop4 7:4 0 63,3M 1 loop /snap/core20/1778 loop5 7:5 0 55,1M 1 loop /snap/cups/836 loop6 7:6 0 55M 1 loop /snap/cups/872
- I can't uninstall all partitions with one command.
I used before something like
umount -all
Today, after this command is only partially functional.
- I can't start the terminal
- the partition is still unmounted
- when I tried to restart the system, the system showed red errors on a black background about snap.
- Today, that may not be a problem. But I don't remember how to check which process is blocking mount access. Maybe there is some command that shows the processes using the lock. For example when I'm using GParted mount is locked / busy.
I wanted to ask how it looks in your Linux distribution ? Is there any chance of an idea of the specification in https://www.freedesktop.org/wiki/Specifications/
Do you see a chance for a better future now?
-
new libmount-mountfd api is incompatible with python libmount
Python libmount fails if libmount was built with mountfd api.
ctx = libmount.Context() ctx.fstype="overlay" ctx.source="overlay" lower = ":".join("{:x}".format(x) for x in range(int(yamldata["maxidx"]))) ctx.options="lowerdir={},upperdir={},workdir={}".format(lower, yamldata["upper"], yamldata["work"]) ctx.target=yamldata["target"] ctx.mount()
Traceback (most recent call last): File "/home/asavah/kross/kbs/overmount.py", line 61, in <module> main() File "/home/asavah/kross/kbs/overmount.py", line 51, in main __do_mount(options.mount) File "/home/asavah/kross/kbs/overmount.py", line 27, in __do_mount ctx.mount() TypeError: Invalid argument
Building util-linux with
NEEDINFO--disable-libmount-mountfd-support
works as intended.
Collection of human friendly terminal interface for git.
A collection of human friendly terminal user interface for git.
📖 A collection of pure bash alternatives to external processes.
NEW: pure sh bible ( ?? A collection of pure POSIX sh alternatives to external processes). pure bash bible A collection of pure bash alternatives to e
crypted admin shell: SSH-like strong crypto remote admin shell for Linux, BSD, Android, Solaris and OSX
crypted admin shell: SSH-like strong crypto remote admin shell for Linux, BSD, Android, Solaris and OSX
Graphs the activity of a chia harvester in a linux terminal.
Chia Harvest Graph Monitor for Chia Harvesting Introduction The chiaharvestgraph tool will graph Chia Harvesting activity in a linux terminal. Use a 2
a simple to use linux terminal
a simple to use linux terminal
Toybox: all-in-one Linux command line.
Toybox: all-in-one Linux command line.
Free open-source modern C++17 / C++20 framework to create console, forms (GUI like WinForms) and unit test applications on Microsoft Windows, Apple macOS and Linux.
xtd Modern C++17/20 framework to create console (CLI), forms (GUI like WinForms) and tunit (unit tests like Microsoft Unit Testing Framework) applicat
Linux Shell Implementation In C - Language
Linux-Shell ASSIGNMENT 2 Name : Naman Anand Roll no : 200101070 SUBJECT : CS242 ASSIGNMENT : 2 COMPILING AND FOR RUNNING COMMANDS :-> 1)gcc -o 2001010
A command-line tool to generate Linux manual pages from C source code.
mangen A command-line tool to generate Linux manual pages from C source code. Description mangen is, as said above, a program to generate Linux manual
Linux Shell Implementation In C - Language
Linux-Mini-Shell This is a C code for Linux Shell (a mini version). The code is designed to work properly in LINUX terminal. To compile the code and r
FastReport.Cloud console tool for Linux and perhaps some other OSes
FastReport Cloud console shell This is a simple console shell to FastReport Cloud service. Prerequests GNU packages for build shell: curl-development
A native port of Lotus 1-2-3 to Linux.
Lotus 1-2-3 for Linux This is a native port of Lotus 1-2-3 Release 3 to Linux. This is possible because Lotus 1-2-3 for UNIX SystemV used a trick call
Minimal Linux Live (MLL) is a tiny educational Linux distribution, which is designed to be built from scratch by using a collection of automated shell scripts. Minimal Linux Live offers a core environment with just the Linux kernel, GNU C library, and Busybox userland utilities.
Minimal Linux Live (MLL) is a tiny educational Linux distribution, which is designed to be built from scratch by using a collection of automated shell scripts. Minimal Linux Live offers a core environment with just the Linux kernel, GNU C library, and Busybox userland utilities.
🎨 Modern 2D/3D - Importer • Exporter • Util - Library, also called (AssetIO)
Brand-new modern 3D asset importer, exporter library. This library will include common 3D utils funcs. It is written with C99 but C++ wrappers or othe
🎨 Modern 2D/3D - Importer • Exporter • Util - Library, also called (AssetIO)
Brand-new modern 3D asset importer, exporter library. This library will include common 3D utils funcs. It is written with C99 but C++ wrappers or othe
Parallel-util - Simple header-only implementation of "parallel for" and "parallel map" for C++11
parallel-util A single-header implementation of parallel_for, parallel_map, and parallel_exec using C++11. This library is based on multi-threading on
A collection of single-file C libraries. (generic containers, random number generation, argument parsing and other functionalities)
cauldron A collection of single-file C libraries and tools with the goal to be portable and modifiable. Libraries library description arena-allocator.
This is a collection of widgets and utilities for the immediate mode GUI (imgui) that I am developing for the critic2 GUI
ImGui Goodies This is a collection of widgets and utilities for the immediate mode GUI (imgui) that I am developing for the critic2 GUI. Currently, th
A personal collection of Windows CVE I have turned in to exploit source, as well as a collection of payloads I've written to be used in conjunction with these exploits.
This repository contains a personal collection of Windows CVE I have turned in to exploit source, as well as a collection of payloads I've written to
LibTomCrypt is a fairly comprehensive, modular and portable cryptographic toolkit that provides developers with a vast array of well known published block ciphers, one-way hash functions, chaining modes, pseudo-random number generators, public key cryptography and a plethora of other routines.
libtomcrypt Previously the git repository contained doc/crypt.pdf for detailed documentation. This was changed and the file is now only available from