Page MenuHomeFreeBSD

Replace libc's call to pipe(2) with pipe2(2).
ClosedPublic

Authored by brooks on Jun 11 2016, 8:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 5, 6:13 AM
Unknown Object (File)
Wed, May 1, 11:34 PM
Unknown Object (File)
Wed, May 1, 11:34 PM
Unknown Object (File)
Wed, May 1, 11:34 PM
Unknown Object (File)
Wed, May 1, 11:34 PM
Unknown Object (File)
Mon, Apr 29, 7:18 PM
Unknown Object (File)
Thu, Apr 25, 2:20 PM
Unknown Object (File)
Feb 29 2024, 9:05 AM
Subscribers

Details

Summary

pipe2() with flags=0 is idential to pipe(), but the pipe() system call
abuses the fact that system calls return two registers to avoid the use of
copyout() making it hard to trace with dtrace (since the kernel ignores
the arguments) and requring a machine dependent assembly wrapper in libc
for each version.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

brooks retitled this revision from to Replace libc's call to pipe(2) with pipe2(2)..
brooks updated this object.
brooks edited the test plan for this revision. (Show Details)
brooks added reviewers: peter, andrew.

Does pipe.o need to be added to NOASM, or does t figure this out when pipe.c is in SRCS?

brooks edited edge metadata.

Add pipe.o to NOASM and fix a missing declaration.

It looks like NOASM wasn't required in my test tree because D6816 was applied. Now fixed.

andrew edited edge metadata.
This revision is now accepted and ready to land.Jun 17 2016, 11:27 AM

Is this intended to be done for 11.0, or after?

Is this intended to be done for 11.0, or after?

I'd like to squeeze it in for 11 so aarch64 and riscv can not support the syscall, but it's not critical. I need to test the result more thoroughly before I can propose it.

This revision was automatically updated to reflect the committed changes.