From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752741AbbIOPYd (ORCPT ); Tue, 15 Sep 2015 11:24:33 -0400 Received: from mga03.intel.com ([134.134.136.65]:48952 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752366AbbIOPYc (ORCPT ); Tue, 15 Sep 2015 11:24:32 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,536,1437462000"; d="scan'208";a="769504121" From: Alexander Shishkin To: Johannes Berg , Jonathan Corbet Cc: Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, vince@deater.net, eranian@google.com, Arnaldo Carvalho de Melo Subject: Re: [PATCH RFC v3 1/6] exterr: Introduce extended syscall error reporting In-Reply-To: <1442327514.1914.31.camel@sipsolutions.net> References: <1441987205-4021-1-git-send-email-alexander.shishkin@linux.intel.com> <1441987205-4021-2-git-send-email-alexander.shishkin@linux.intel.com> <20150914141931.39f6be92@lwn.net> <87a8snn4zz.fsf@ashishki-desk.ger.corp.intel.com> <1442327514.1914.31.camel@sipsolutions.net> User-Agent: Notmuch/0.20.2 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Tue, 15 Sep 2015 18:24:28 +0300 Message-ID: <877fnrn1sj.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Johannes Berg writes: > On Tue, 2015-09-15 at 17:15 +0300, Alexander Shishkin wrote: >> >> > It seems to me that current->ext_err_code needs to be cleared on >> > each system call entry (except for your special prctl() of >> > course!). >> >> I'd say, it should be up to the program to decide for how long they >> want to keep the extended error code around. >> > > I'm not convinced that works - imagine a library wanting to use the > prctl(), but the main application isn't doing that. Should the library > clear it before every call, to be sure it's not getting stale data? > etc. In other words, a syscall that's capable of throwing an extended error does clear the current::ext_err_code every time, but not other syscalls. Otherwise it will indeed get very confusing. Regards, -- Alex