Debian Bug report logs - #930817
Nice=19 IOSchedulingClass=idle (not alsactl -n19 -c)

version graph

Package: alsa-utils; Maintainer for alsa-utils is Debian ALSA Maintainers <[email protected]>; Source for alsa-utils is src:alsa-utils (PTS, buildd, popcon).

Reported by: "Trent W. Buck" <[email protected]>

Date: Fri, 21 Jun 2019 09:27:02 UTC

Severity: wishlist

Tags: patch

Found in version alsa-utils/1.1.8-2

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Debian ALSA Maintainers <[email protected]>:
Bug#930817; Package alsa-utils. (Fri, 21 Jun 2019 09:27:05 GMT) (full text, mbox, link).


Acknowledgement sent to "Trent W. Buck" <[email protected]>:
New Bug report received and forwarded. Copy sent to Debian ALSA Maintainers <[email protected]>. (Fri, 21 Jun 2019 09:27:05 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: "Trent W. Buck" <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: Nice=19 IOSchedulingClass=idle (not alsactl -n19 -c)
Date: Fri, 21 Jun 2019 19:25:25 +1000
Package: alsa-utils
Version: 1.1.8-2
Severity: wishlist
File: /lib/systemd/system/alsa-state.service
Tags: patch

alsa-state.service tells alsactl to lower its own priority.
This can be done "natively" in systemd.
This allows us to use seccomp-bpf to completely block access to those syscalls within alsa-state's slice.

   -ExecStart=-@sbindir@/alsactl -E HOME=@alsactlhome@ -s -n 19 -c rdaemon
   +ExecStart=-@sbindir@/alsactl -E HOME=@alsactlhome@ -s rdaemon
   +Nice=19
   +CPUSchedulingPolicy=idle
   +IOSchedulingClass=idle

This will make the ExecStop also run "niced", which I think is fine.
If you disagree, I *think* you can use a "+" like this:

   -ExecStop=-@sbindir@/alsactl -E HOME=@alsactlhome@ -s kill save_and_quit
   +ExecStop=-+@sbindir@/alsactl -E HOME=@alsactlhome@ -s kill save_and_quit

Doing this allows a tight seccomp BPF, because the nice/ionice system
calls happen in systemd PID 1, before the seccomp BPF loads.

   +CapabilityBoundingSet=
   +SystemCallFilter=@system-service
   +SystemCallFilter=~@privileged @resources

PS: While stdout/stderr of systemd units ends up in syslog by default,
the "-s" option SHOULD be kept, because alsactl/utils.c includes
log priorities (LOG_ERR &c) in syslog, but not in stdout.


-- System Information:
Debian Release: 10.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'testing-proposed-updates'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages alsa-utils depends on:
ii  kmod              26-1
ii  libasound2        1.1.8-1
ii  libc6             2.28-10
ii  libfftw3-single3  3.3.8-2
ii  libncursesw6      6.1+20181013-2
ii  libsamplerate0    0.1.9-2
ii  libtinfo6         6.1+20181013-2
ii  lsb-base          10.2019051400
ii  whiptail          0.52.20-8

alsa-utils recommends no packages.

alsa-utils suggests no packages.

-- no debconf information



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Thu May 15 19:09:09 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.