Bug 10192 - Use writev_not_cancel_no_status in elf/dl-misc.c
Summary: Use writev_not_cancel_no_status in elf/dl-misc.c
Status: RESOLVED WONTFIX
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-23 12:43 UTC by Aurelien Jarno
Modified: 2014-07-01 20:20 UTC (History)
1 user (show)

See Also:
Host: i686-unknown-kfreebsd7.1-gnu
Target: i686-unknown-kfreebsd7.1-gnu
Build: i686-unknown-kfreebsd7.1-gnu
Last reconfirmed:
fweimer: security-


Attachments
Patch to fix the problem (781 bytes, patch)
2009-05-23 12:44 UTC, Aurelien Jarno
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.