Bug 10192

Summary: Use writev_not_cancel_no_status in elf/dl-misc.c
Product: glibc Reporter: Aurelien Jarno <aurelien>
Component: libcAssignee: Ulrich Drepper <drepper.fsp>
Status: RESOLVED WONTFIX    
Severity: normal CC: glibc-bugs
Priority: P2 Flags: fweimer: security-
Version: unspecified   
Target Milestone: ---   
Host: i686-unknown-kfreebsd7.1-gnu Target: i686-unknown-kfreebsd7.1-gnu
Build: i686-unknown-kfreebsd7.1-gnu Last reconfirmed:
Attachments: Patch to fix the problem

Description Aurelien Jarno 2009-05-23 12:43:34 UTC
elf/dl-misc.c does a few direct call to __writev() when inline syscalls are not 
available. With some kernels it does not make sense to use inline syscalls as 
the arguments are passed on the stack with the default calling convention.

Since version 2.10, the code of writev includes a cancellation call to free a 
potentially malloced buffer. This means that ld.so should have unwind support 
which is not possible.

A solution is to use writev_not_cancel_no_status from not-cancel.h which seems 
to have been done exactly from this problem. A patch will follow.
Comment 1 Aurelien Jarno 2009-05-23 12:44:07 UTC
Created attachment 3959 [details]
Patch to fix the problem
Comment 2 Ulrich Drepper 2009-06-16 04:08:27 UTC
(In reply to comment #0)
> elf/dl-misc.c does a few direct call to __writev() when inline syscalls are not 
> available. With some kernels it does not make sense to use inline syscalls as 
> the arguments are passed on the stack with the default calling convention.

That's no argument.  Implementing the inlining won't hurt either.  Uniformity of
the ports is essential.