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 16:32:16 +0100
From: Markus Wichmann <nullplan@....net>
To: musl@...ts.openwall.com
Subject: Re: [PATCH v2] mips: add vdso support

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.

> 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.