Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 26 Jan 2016 19:17:53 +0100
From: Hauke Mehrtens <hauke@...ke-m.de>
To: musl@...ts.openwall.com
Cc: nullplan@....net
Subject: Re: [PATCH v2] mips: add vdso support

On 01/26/2016 04:32 PM, Markus Wichmann wrote:
> On Mon, Jan 25, 2016 at 06:21:18PM -0500, Rich Felker wrote:
>> This could probably be written better as:
>>
>> 	if (ret != -ENOSYS) return ret;
>> #endif
>> 	return sc_clock_gettime(clk, ts);
>>
> 
> And one additional idea: If the kernel did return ENOSYS, set cgt to
> sc_clock_gettime. Because if the kernel returned ENOSYS, we can assume
> this is a permanent failure and not a temporary one, so there's no point
> in keeping to try the VDSO version.

It is not permanently, but it depends on the input parameters, see this
code:
http://lxr.free-electrons.com/source/arch/mips/vdso/gettimeofday.c?v=4.4#L207

It only returns -ENOSYS if it can not handle requested clkid.

> 
>> i.e. reject any error but EINVAL from the vdso and try the syscall,
>> since EINVAL is the only one that should be possible.
>>
> 
> clock_gettime() takes a pointer argument, so EFAULT is always possible.
> 
> Ciao,
> Markus
> 

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.