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]
Message-ID: <7d506ede564d425db116ff646f267f4f@AcuMS.aculab.com>
Date:   Tue, 24 Jan 2023 08:54:24 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Mateusz Guzik' <mjguzik@...il.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>
CC:     Al Viro <viro@...iv.linux.org.uk>, Uros Bizjak <ubizjak@...il.com>,
        "Andrew Morton" <akpm@...ux-foundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] lib/genalloc: use try_cmpxchg in {set,clear}_bits_ll

From: Mateusz Guzik
> Sent: 24 January 2023 00:11
...
> So if you strace something like gcc compiling stuff you will find:
> - some access calls on shared dirs, for example:
> 78533 access("/usr/lib/gcc/x86_64-linux-gnu/11/", X_OK) = 0
> 78533 access("/usr/lib/gcc/x86_64-linux-gnu/11/", X_OK) = 0
> 78533 access("/usr/lib/gcc/x86_64-linux-gnu/11/", X_OK) = 0

Are they back to back? Which is just stupid.
Once per invocation of gcc would be noise.

> - same with newfstatat:
> 87428 newfstatat(AT_FDCWD, "./arch/x86/include", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
> 87428 newfstatat(AT_FDCWD, "./arch/x86/include/generated", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
> 87428 newfstatat(AT_FDCWD, "./include", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
> 87428 newfstatat(AT_FDCWD, "./arch/x86/include/uapi", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
> - there is also quite a bit of readlink:
> 87502 readlink("/tmp", 0x7ffe28847ac0, 1023) = -1 EINVAL (Invalid argument)
> 87502 readlink("/tmp/ccTh37oI.s", 0x7ffe28847ac0, 1023) = -1 EINVAL (Invalid argument)
> 
> that last bit is glibc doing realpath(). A case can be made for making
> realpath into a syscall instead, but I'm not going to flame over for
> the time being. :)

I remember looking at syscall counts during a (NetBSD) build
and deciding that the dominant system call was actually failed
opens from the compiler searching long -I paths looking for
headers.
You can speed things up by copying all the .h files from the
fixed -I path list into a single directory.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ