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  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:	Mon, 6 Jan 2014 10:29:29 +0100
From:	Peter Zijlstra <>
To:	Yann Droneaud <>
Cc:	Paul Mackerras <>, Ingo Molnar <>,
	Arnaldo Carvalho de Melo <>,, Al Viro <>,
	Andrew Morton <>
Subject: Re: [PATCHv5 6/7] perf: introduce a flag to enable close-on-exec in

On Sun, Jan 05, 2014 at 09:36:33PM +0100, Yann Droneaud wrote:
> Unlike recent modern userspace API such as
>   epoll_create1 (EPOLL_CLOEXEC), eventfd (EFD_CLOEXEC),
>   fanotify_init (FAN_CLOEXEC), inotify_init1 (IN_CLOEXEC),
>   signalfd (SFD_CLOEXEC), timerfd_create (TFD_CLOEXEC),
>   or the venerable general purpose open (O_CLOEXEC),
> perf_event_open() syscall lack a flag to atomically set FD_CLOEXEC
> (eg. close-on-exec) flag on file descriptor it returns to userspace.
> The present patch adds a PERF_FLAG_FD_CLOEXEC flag to allow
> perf_event_open() syscall to atomically set close-on-exec.
> Having this flag will enable userspace to remove the file descriptor
> from the list of file descriptors being inherited across exec,
> without the need to call fcntl(fd, F_SETFD, FD_CLOEXEC) and the
> associated race condition between the current thread and another
> thread calling fork(2) then execve(2).
> Links:
>  - Secure File Descriptor Handling (Ulrich Drepper, 2008)
>  - Excuse me son, but your code is leaking !!! (Dan Walsh, March 2012)
>  - Notes in DMA buffer sharing: leak and security hole
> Cc: Peter Zijlstra <>
> Cc: Al Viro <>
> Signed-off-by: Yann Droneaud <>

Seems sane enough.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists