lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 7 Feb 2020 15:34:51 +0100
From:   Christian Zigotzky <chzigotzky@...osoft.de>
To:     arnd@...db.de
Cc:     Michael Ellerman <mpe@...erman.id.au>,
        Jakub Kicinski <kuba@...nel.org>,
        Christophe Leroy <christophe.leroy@....fr>,
        DTML <devicetree@...r.kernel.org>,
        Darren Stevens <darren@...vens-zone.net>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linuxppc-dev@...abs.org, "contact@...on.com" <contact@...on.com>,
        "R.T.Dickinson" <rtd2@...a.co.nz>, Christoph Hellwig <hch@....de>,
        mad skateman <madskateman@...il.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Christian Zigotzky <info@...osoft.de>
Subject: Latest Git kernel: avahi-daemon[2410]: ioctl(): Inappropriate ioctl
 for device

Hello Arnd,

We regularly compile and test Linux kernels every day during the merge 
window. Since Thursday last week we have very high CPU usage because of 
the avahi daemon on our desktop Linux systems (Ubuntu, Debian etc). The 
avahi daemon produces a lot of the following log message. This generates 
high CPU usage.

Error message: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for device

strace /usr/sbin/avahi-daemon:

poll([{fd=4, events=POLLIN}, {fd=16, events=POLLIN}, {fd=15, 
events=POLLIN}, {fd=14, events=POLLIN}, {fd=13, events=POLLIN}, {fd=12, 
events=POLLIN}, {fd=11, events=POLLIN}, {fd=10, events=POLLIN}, {fd=9, 
events=POLLIN}, {fd=8, events=POLLIN}, {fd=6, events=POLLIN}], 11, 65) = 
2 ([{fd=12, revents=POLLIN}, {fd=9, revents=POLLIN}])
ioctl(12, FIONREAD, 0xffba6f24)         = -1 ENOTTY (Inappropriate ioctl 
for device)
write(2, "ioctl(): Inappropriate ioctl for"..., 39ioctl(): Inappropriate 
ioctl for device) = 39
write(2, "\n", 1
)                       = 1

----------------------

I bisected the latest kernel source code today.

Result:

77b9040195dea3fcddf19e136c9e99a501351778 is the first bad commit
commit 77b9040195dea3fcddf19e136c9e99a501351778
Author: Arnd Bergmann <arnd@...db.de>
Date:   Wed Nov 27 21:25:36 2019 +0100

     compat_ioctl: simplify the implementation

     Now that both native and compat ioctl syscalls are
     in the same file, a couple of simplifications can
     be made, bringing the implementation closer together:

     - do_vfs_ioctl(), ioctl_preallocate(), and compat_ioctl_preallocate()
       can become static, allowing the compiler to optimize better

     - slightly update the coding style for consistency between
       the functions.

     - rather than listing each command in two switch statements
       for the compat case, just call a single function that has
       all the common commands.

     As a side-effect, FS_IOC_RESVSP/FS_IOC_RESVSP64 are now available
     to x86 compat tasks, along with FS_IOC_RESVSP_32/FS_IOC_RESVSP64_32.
     This is harmless for i386 emulation, and can be considered a bugfix
     for x32 emulation, which never supported these in the past.

     Reviewed-by: Ben Hutchings <ben.hutchings@...ethink.co.uk>
     Signed-off-by: Arnd Bergmann <arnd@...db.de>

:040000 040000 5c4b62f4d1bfe643d3bbf9d9a3b50ee50ae0f159 
5ca610e3197df96adfcae4f94fceeb496756609b M    fs
:040000 040000 086f2e2ac49384988733cbb706243943748c4ce7 
b906926e53dfa2e8927629e77a0708dda6f49d31 M    include

----------------------

Link to the first bad commit: 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=77b9040195dea3fcddf19e136c9e99a501351778

I was able to revert the first bad commit.

git revert 77b9040195dea3fcddf19e136c9e99a501351778

[master a91dcf9dc14c] Revert "compat_ioctl: simplify the implementation"
  4 files changed, 105 insertions(+), 64 deletions(-)

After that the avahi daemon works without any problems again.

I created a patch today. (attached)

It is also possible to deactivate the avahi daemon with the following lines
in the file "/etc/avahi/avahi-daemon.conf":

use-ipv4=no
use-ipv6=no

Could you please check your commit?

Thanks,
Christian

View attachment "compat_ioctl-v1.patch" of type "text/x-patch" (9093 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ