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:	Tue, 17 May 2011 14:33:07 +0200
From:	Denys Vlasenko <vda.linux@...glemail.com>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	linux-kernel@...r.kernel.org, libc-alpha@...rceware.org,
	Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 4/5] Add a sysconf syscall

On Mon, May 16, 2011 at 6:01 PM, Andi Kleen <andi@...stfloor.org> wrote:
>> ...and libc will start making many such calls in a row in order to retrieve
>> a dozen of such values.
>
> It doesn't because the user interface is sysconf(). So the user program
> just asks for it piece by piece.

Not if libc is caching known-to-be-constant-until-reboot data on the first call.

>> It's rather inefficient to return just one word.
>> Try to return more data per call.
>
> I considered that, but is there a concrete use case?
> I didn't want to code it up without concrete use case.

Look at recent history of having to add more syscalls
(such as signalfd/signalfd4) only because we didn't think through
how they will need to be extended.

It's likely you will need to return more than one long word
for some data, eventually. Therefore, better add struct now
than needing to add horrible hacks later in order to be able
to return an uint64_t value.

-- 
vda
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ