From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9201 Path: news.gmane.org!not-for-mail From: Markus Wichmann Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH v2] mips: add vdso support Date: Tue, 26 Jan 2016 16:32:16 +0100 Message-ID: <20160126153216.GA3074@debian> References: <1453762812-3187-1-git-send-email-hauke@hauke-m.de> <20160125232118.GD238@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1453822352 13294 80.91.229.3 (26 Jan 2016 15:32:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Jan 2016 15:32:32 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9214-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jan 26 16:32:32 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1aO5ba-0000Uc-Q0 for gllmg-musl@m.gmane.org; Tue, 26 Jan 2016 16:32:30 +0100 Original-Received: (qmail 15816 invoked by uid 550); 26 Jan 2016 15:32:29 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 15798 invoked from network); 26 Jan 2016 15:32:28 -0000 Content-Disposition: inline In-Reply-To: <20160125232118.GD238@brightrain.aerifal.cx> User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:WLzKIBN+v+pdgNgwPT3lZE2Bv7dFDROV0Etjp8UM/9tSyVO432A pdrMF+DKP9LPk60pm+gik2gQJbqBXyI2nYwOKjgN5MsUITC/KOOvVlH/tS+Fkht6oIhlQFY YlGtrHxgKpkXxGOE6RXcO4ggmRUI8Fy9VC+YFD1+yoKxPHw9doarMoYLRlFI5MBHES79tXj epYxW+JbbQfVF0ciVRVpg== X-UI-Out-Filterresults: notjunk:1;V01:K0:W8eUM4rOlcI=:Ler7MO/Z0zkLgcKT6wTGYR 59Ahf9+B2eM52iDUdxaEWiwPIiZ3dtdV5yR8QrTjEo2dvepVZNFdCq0Pp1leY2/3GxshwPahv sSpenmHX86dY6VOCDlpngvHNXRyCEArh2CMjkBYWO92ieNswAnGQmoR1paTNzDXj9a6E7/0g9 F2F2ch7nReg3PMr15UZcgiPvepQCOlvxOKjNT0DK0A1CpW77bxx3mT3biEoLM3JbaHzclfKmL KiwLqIusxiMiGQCGBCC+vvubjZpb9bhN7b6yUE/D/qMHs+FM5Jcrc7DM99ZZPEPkOUswAeIH/ kKzXEc5hfVrgBMaUzxMo+36MKjSTpUi6NTSzE4dO+vGxlbNJyQ5wsWahQtLuNE+fsA1PLRDz+ yLKgyjOEWjSCHAOfir7H5uUds9sxRxsa9uYVcFu/6kPx23Ldsz0WcOreJKyQxcm2DiwyMf9hm dtyZbNVHYtc72seFlTI3qKWMgSCQErXKrj2Vp+T7wbWVbLSEwCQgZzoN81YWHihtN1LwkZ2uU Uyc3U5IWoWmGgaUKzOVKj3FkOGAOF599m1+GSOz68xxZ+SocoKgXASIopKPOlJBA6ZgTMA9mA n+iMjUS+sowpINKybLowOp2AMgMjhpKMr8bGIdV+4LTaf8xfVxIhTHJPsO/nXj1AQGSdio4rE J8NzUiNf8L9jQ7mHwqY/5wj+5UNkR/wYSOfcYqjnlZ85HrEP3rSz0CvkNzQZEa655viPNNMS6 3iC6vQyJd6urQnervV8056SzAqDMBhQBtx3DxYnlhdc3R/GfaWu03P6x2V0= Xref: news.gmane.org gmane.linux.lib.musl.general:9201 Archived-At: 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