Re: SRC Contributions: Advice and Objections

From: Brooks Davis <brooks_at_freebsd.org>
Date: Mon, 29 Aug 2022 20:39:47 UTC
On Mon, Aug 29, 2022 at 03:17:51PM -0500, Jake Freeland wrote:
> * Implementing timerfd:
> https://man7.org/linux/man-pages/man2/timerfd_gettime.2.html
> I am unsure whether it would be beneficial to upstream POSIX timer
> patches for igt-gpu-tools or to implement timerfd for FreeBSD. I am
> erring on the side of implementing timerfd if other applications need
> to use it in the future.

This might be a good place to start on kernel work because we already
have an implementation for linux compat.  You'd need to move the
implementation into sys/kern and add manpages, syscall, and libc
wrappers.  IMO this is a good idea vs using a wrapper epoll-shim because
it allows better support for timers in capability mode.

> * Adding %m format specifier to scanf:
> The %m format specifier is a POSIX extension to the ISO C standard that can
> precede
> %c, %s, and %[. The %m allocates a memory buffer to hold the string
> including a
> terminating null character.

This seems reasonable (unless there's a move afoot to deprecate this in
a future POSIX, but I don't think I've seen traffic to that effect.)

-- Brooks