Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2658009.jRRjQAZNrc@omega>
Date: Mon, 25 Jan 2021 17:07:36 +0100
From: Bruno Haible <bruno@...sp.org>
To: Rich Felker <dalias@...c.org>
Cc: musl@...ts.openwall.com
Subject: Re: insufficient checking in posix_spawn_file_actions_add{open,dup2}

Rich Felker wrote:
> I would very much prefer not to have to enforce such a max here since
> ... wastes a syscall in an
> operation that should not require one.

sysconf (_SC_OPEN_MAX) is equivalent to the rlim_cur value from
getrlimit(RLIMIT_NOFILE, ...).

A mechanism for avoiding syscalls is the vdso [1][2]. How about adding
getlimit to the vdso? Do you know why even simple syscalls like getpid()
exist in the vdso only for ia64?

Bruno

[1] https://man7.org/linux/man-pages/man7/vdso.7.html
[2] https://lwn.net/Articles/615809/

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.