search for: austingroupbug

Displaying 20 results from an estimated 28 matches for "austingroupbug".

Did you mean: austingroupbugs
2023 Mar 22
1
[libnbd PATCH v4 0/2] lib/utils: introduce async-signal-safe execvpe()
...aced by <shell path>. (Look for _PATH_BSHELL in said historical glibc commit, and also in today's glibc file "posix/execvpe.c".) Aside - what a funny filename, since execvpe() is a glibc extension not in POSIX ;) I've now filed a bug report to the Austin Group: https://www.austingroupbugs.net/view.php?id=1645 And while researching for that, I found that FreeBSD had the same bug up until 2020: https://cgit.freebsd.org/src/commit/?id=301cb491ea On the other hand, the fact that FreeBSD changed and didn't suffer an immediate backlash of breaking programs means that glibc might con...
2019 Jul 31
13
[nbdkit PATCH 0/8] fd leak safety
There's enough here to need a review; some of it probably needs backporting to stable-1.12. This probably breaks tests on Haiku or other platforms that have not been as on-the-ball about atomic CLOEXEC; feel free to report issues that arise, and I'll help come up with workarounds (even if we end up leaving a rare fd leak on less-capable systems). Meanwhile, I'm still working on my
2019 Jul 31
0
[nbdkit PATCH 8/8] rate: Atomically set CLOEXEC on fds
...rms already support it. Failure to support it will not be seen at compile time, and it's hard to state whether our unit tests will catch it; thus, I decided to also add a comment to another use of fopen("re") that is much more likely to show if we hit a problematic system. [1] http://austingroupbugs.net/view.php?id=411 Signed-off-by: Eric Blake <eblake@redhat.com> --- filters/rate/rate.c | 2 +- server/utils.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/filters/rate/rate.c b/filters/rate/rate.c index f8dda0b0..9476a27f 100644 --- a/filters/rate/rate.c...
2013 Oct 22
1
10.0-ALPHA1: /usr/bin/read: strange return code with -t option
When using /usr/bin/read with the -t option the "timeout" return code should be 1 (verified with 8.4-RELEASE and 9.2-RELEASE). When used with 10.0-BETA1, the return code is 142. How to recreate: /usr/bin/read -t 1 RESPONSE JUNK (allow this to timeout) echo $? 142 Also with /bin/sh: builtin read -t 1 RESPONSE JUNK (allow this to timeout) echo $? 142 Thanks for
2023 Feb 22
1
[libnbd PATCH v3 09/29] lib/utils: introduce async-signal-safe execvpe()
...the whole thing. (And there's a really sore lesson for me in this, regarding cleanups for standards conformance.) > > >> Can you please elaborate on "+s"? (I'd like to understand your point > >> regardless of this patch, too.) > > > > https://www.austingroupbugs.net/view.php?id=1440 is where it came up > > in the Austin Group. Basically, having system("+s") be _required_ to > > invoke ["/path/to/sh", "-c", "+s"] is risky - "+s" is ambiguous > > between being the name of a real script and...
2019 Jul 31
0
[nbdkit PATCH 4/8] Revert "RHEL 5: Define O_CLOEXEC and SOCK_CLOEXEC."
...atory in the next revision of POSIX. Most modern OS have caught up to that (RHEL 6 and FreeBSD 10 support SOCK_CLOEXEC, for example), and we're doing ourselves a disservice by using silent fallback instead of actively detecting with compile failure on systems that are still behind. [1] http://austingroupbugs.net/view.php?id=411 Conflicts: filters/xz/xzfile.c - The fallback moved from plugins/xz/xzfile.c (and in fact has been dead code since commit c879d310 made it a filter) plugins/file/file.c - context changes in the meantime src/internal.h - Moved to server/internal.h --- server/internal.h...
2019 Aug 01
2
Re: [nbdkit PATCH 4/8] Revert "RHEL 5: Define O_CLOEXEC and SOCK_CLOEXEC."
...n of POSIX. Most modern OS have caught up to that (RHEL 6 > and FreeBSD 10 support SOCK_CLOEXEC, for example), and we're doing > ourselves a disservice by using silent fallback instead of actively > detecting with compile failure on systems that are still behind. > > [1] http://austingroupbugs.net/view.php?id=411 > > Conflicts: > filters/xz/xzfile.c - The fallback moved from plugins/xz/xzfile.c (and > in fact has been dead code since commit c879d310 made it a filter) > plugins/file/file.c - context changes in the meantime > src/internal.h - Moved to server/internal...
2023 Feb 24
1
[libnbd PATCH v3 07/29] lib/utils: add async-signal-safe assert()
On 2/21/23 07:33, Laszlo Ersek wrote: > On 2/20/23 19:21, Laszlo Ersek wrote: >> On 2/15/23 21:57, Eric Blake wrote: >>> On Wed, Feb 15, 2023 at 03:11:36PM +0100, Laszlo Ersek wrote: > >>>> + >>>> + xwrite (STDERR_FILENO, file, strlen (file)); >>>> + xwrite (STDERR_FILENO, ":", 1); >>> >>> Presumably, if our
2019 Sep 30
1
Re: [PATCH libnbd v2 1/2] lib: Don't use perror after fork in nbd_connect_callback.
On 9/30/19 11:32 AM, Richard W.M. Jones wrote: > perror is not fork-safe and so could deadlock. Instead open code a > fork-safe version of perror. While this fixes the current behaviour, > in the long term we'd like to capture the error message into the usual > error mechanism, so this is not the full and final fix for this issue. > > Also this fixes the exit code to be
2019 Aug 12
2
Re: [PATCH libnbd 1/7] api: Add semi-private function for freeing persistent data.
...lloc_free_callbacks; > + > + new_callbacks = realloc (h->free_callbacks, > + sizeof (struct free_callback) * new_alloc); Should we start relying on reallocarray() to guarantee no multiplication overflow? (Not yet in POSIX, but it has been proposed: http://austingroupbugs.net/view.php?id=1218) > + if (new_callbacks == NULL) { > + set_error (errno, "realloc"); > + goto out; > + } > + h->alloc_free_callbacks = new_alloc; > + h->free_callbacks = new_callbacks; > + } > + > + /* Need to keep the list so...
2019 Aug 02
0
[nbdkit PATCH v2 04/17] Revert "RHEL 5: Define O_CLOEXEC and SOCK_CLOEXEC."
...ng a globally-silent and leaky fallback instead of actively documenting at each site that prefers to use the new interfaces whether the use is essential or merely reducing lines of code, for the sake of systems that are behind in atomic support. [1] https://dev.haiku-os.org/ticket/15219 [2] http://austingroupbugs.net/view.php?id=411 Conflicts: filters/xz/xzfile.c - The fallback moved from plugins/xz/xzfile.c (and in fact has been dead code since commit c879d310 made it a filter) plugins/file/file.c - context changes in the meantime src/internal.h - Moved to server/internal.h plugins/split/split.c - No...
2019 Jul 16
2
Re: [PATCH libnbd] generator: Swap parameters of nbd_add_close_callback.
On 7/16/19 10:39 AM, Eric Blake wrote: > On 7/16/19 10:04 AM, Richard W.M. Jones wrote: >> The API changes from: >> >> int nbd_add_close_callback (struct nbd_handle *h, >> nbd_close_callback cb, >> void *user_data); >> >> to: >> >> int nbd_add_close_callback (struct nbd_handle
2019 Sep 23
0
Re: [PATCH nbdkit v2] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...ared as >> 64-bit, even though getpid() returns a 32-bit 'int'; I wish they'd fix >> their headers, but it violates the assumption of pid_t == int. >> >> Also, POSIX is considering standardizing fcntl(F_SETOWN_EX) in order to >> allow pid_t > int: http://austingroupbugs.net/view.php?id=1274 >> >> So while your assumption may hold for now on Linux and BSD, I wouldn't >> hold my breath on it lasting forever. > > I should say our existing code already has this bug, this > patch doesn't change it :-) True. > > Below is V2...
2023 Feb 22
1
[libnbd PATCH v3 09/29] lib/utils: introduce async-signal-safe execvpe()
...n if we should just drop the whole thing. (And there's a really sore lesson for me in this, regarding cleanups for standards conformance.) >> Can you please elaborate on "+s"? (I'd like to understand your point >> regardless of this patch, too.) > > https://www.austingroupbugs.net/view.php?id=1440 is where it came up > in the Austin Group. Basically, having system("+s") be _required_ to > invoke ["/path/to/sh", "-c", "+s"] is risky - "+s" is ambiguous > between being the name of a real script and being a shell...
2014 Aug 20
6
Full MVCC in Brass
I'm one of the developers of Notmuch, an email client that makes extensive use of Xapian. For some time, full multi-version concurrency control (MVCC) has been on our wish list. Olly mentioned that brass now uses free lists---a key step toward full MVCC---and I offered to pitch in on putting the other pieces into place. Before I wade too deep into this, I wanted to propose my plan. Full
2023 Mar 15
4
[libnbd PATCH v4 0/3] lib/utils: add async-signal-safe assert()
This is version 4 of the following sub-series: [libnbd PATCH v3 06/29] lib/utils: introduce xwrite() as a more robust write() [libnbd PATCH v3 07/29] lib/utils: add async-signal-safe assert() [libnbd PATCH v3 08/29] lib/utils: add unit test for async-signal-safe assert() http://mid.mail-archive.com/20230215141158.2426855-7-lersek at redhat.com
2019 Sep 23
0
Re: [PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...had a long-standing bug that pid_t was declared as 64-bit, even though getpid() returns a 32-bit 'int'; I wish they'd fix their headers, but it violates the assumption of pid_t == int. Also, POSIX is considering standardizing fcntl(F_SETOWN_EX) in order to allow pid_t > int: http://austingroupbugs.net/view.php?id=1274 So while your assumption may hold for now on Linux and BSD, I wouldn't hold my breath on it lasting forever. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
2019 Aug 12
0
Re: [PATCH libnbd 1/7] api: Add semi-private function for freeing persistent data.
...t; > + new_callbacks = realloc (h->free_callbacks, > > + sizeof (struct free_callback) * new_alloc); > > Should we start relying on reallocarray() to guarantee no multiplication > overflow? (Not yet in POSIX, but it has been proposed: > http://austingroupbugs.net/view.php?id=1218) I guess - didn't know about it. Seems like it's not available in glibc yet? > > + if (new_callbacks == NULL) { > > + set_error (errno, "realloc"); > > + goto out; > > + } > > + h->alloc_free_callbacks =...
2019 Aug 03
0
[nbdkit PATCH 3/3] server: Add and use nbdkit_nanosleep
...ded it in common and documented it for plugins. Note that ppoll is not yet POSIX [1], so we may have to provide fallbacks to older interfaces. But rather than write those now, I just punted on the compilation, and we'll deal with it when we actually encounter platforms needing it. [1] http://austingroupbugs.net/view.php?id=1263 Signed-off-by: Eric Blake <eblake@redhat.com> --- docs/nbdkit-plugin.pod | 28 +++++++++++++++++++ configure.ac | 1 + include/nbdkit-common.h | 1 + filters/delay/delay.c | 14 ++-------- filters/rate/rate.c | 10 +++---- server/public.c |...
2016 Apr 13
3
[PATCH libguestfs] launch: Implement a safer getumask.
The current implementation of getumask involves writing a file with mode 0777 and then testing what mode was created by the kernel. This doesn't work properly if the user set a per-mount umask (or fmask/ dmask). This alternative method was suggested by Josh Stone. By forking, we can use the thread-unsafe method (calling umask) and pass the result back over a pipe. This change also fixes