[PATCH 04/13] linux: Consolidate Linux tee implementation

Florian Weimer fweimer@redhat.com
Mon May 15 11:42:00 GMT 2017


On 05/15/2017 01:40 PM, Joseph Myers wrote:
> On Mon, 15 May 2017, Florian Weimer wrote:
> 
>> On 05/12/2017 07:58 PM, Adhemerval Zanella wrote:
>>> -tee		EXTRA	tee		Ci:iiii	tee
>>
>>> +ssize_t
>>> +tee (int src, int dest, size_t len, unsigned int flags)
>>> +{
>>> +  return SYSCALL_CANCEL (tee, src, dest, len, flags);
>>> +}
>>
>> This might be a silly question, but could we adjust the “C” system call
>> generation to make this kind of change automatically?
>>
>> Or is the goal to remove the C handling eventually?
> 
> My understanding is that the goal is to eliminate generation of
> cancellable syscalls via asm templates.  Generating them via generated C
> code with inline asm (rather than having such code checked in as a .c file
> for each syscall) would be possible - but preferably with more information
> about appropriate return type and argument types and names (which could in
> principle come from the public headers), to generate useful debug
> information and so help users with a program stopped in such a syscall.

Okay, in that case, the patch looks okay to me.

> (There's an old notion that even with asm templates for syscalls we should
> generate debug info somehow to help users debugging through them.)

Right, I ran into that deficiency many times, too.

Florian



More information about the Libc-alpha mailing list