From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from vmicros1.altlinux.org (vmicros1.altlinux.org [194.107.17.57]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF84E25A646 for ; Mon, 27 Jan 2025 11:20:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.107.17.57 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737976826; cv=none; b=QSZd2Lx6rWCFHNB5F8v3Wf4j8By+xWUtwt/dGLCAM0kG7eKIDpB5mLKa+zcfepSWTC8o3j/ONjSUiSP4pZzNmXw2AV/3AUxx0SNMNHqHimNkhYYdzJ+xUinz91yGo4t12PqmLMTI4Wr6eoR+9XyDDRfPIqXYy8n6oSm9BXyvn64= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737976826; c=relaxed/simple; bh=lmf84bTjtAmWLh1iXwIO6Ww1LisrRR+v/zXD4bm2/uI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ONeBPcz91AD2++y5tI0CqjmZzp7ZSqdAufVCswMJRoOIQo4YItR/JKzaEWBOl11tHHxz+BlJgEvpFMrI9C7tclqiWcpbvLTgbPSl5mlxRBmzBvXd5sEUXm76SDEWlEAEbGgg7vweE3b4G7MVzl4Ww1X6RcPDy1BwMQxtMvKsptI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strace.io; spf=pass smtp.mailfrom=altlinux.org; arc=none smtp.client-ip=194.107.17.57 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strace.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=altlinux.org Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id A0E3972C8CC; Mon, 27 Jan 2025 14:20:23 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id 8F3167CCB3A; Mon, 27 Jan 2025 13:20:23 +0200 (IST) Date: Mon, 27 Jan 2025 13:20:23 +0200 From: "Dmitry V. Levin" To: Christophe Leroy Cc: Alexey Gladkov , Oleg Nesterov , Michael Ellerman , Eugene Syromyatnikov , Mike Frysinger , Renzo Davoli , Davide Berardi , strace-devel@lists.strace.io, Madhavan Srinivasan , Nicholas Piggin , Naveen N Rao , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/7] powerpc: properly negate error in syscall_set_return_value() Message-ID: <20250127112023.GB29522@strace.io> References: <20250113171054.GA589@strace.io> <6558110c-c2cb-4aa3-9472-b3496f71ebb8@csgroup.eu> <20250114170400.GB11820@strace.io> <20250123182815.GA20994@strace.io> <86079b5c-e124-489b-8136-05ae5700cb61@csgroup.eu> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86079b5c-e124-489b-8136-05ae5700cb61@csgroup.eu> On Thu, Jan 23, 2025 at 11:07:21PM +0100, Christophe Leroy wrote: [...] > To add a bit more to the confusion, Looks like there is no end to it: static inline long regs_return_value(struct pt_regs *regs) { if (trap_is_scv(regs)) return regs->gpr[3]; if (is_syscall_success(regs)) return regs->gpr[3]; else return -regs->gpr[3]; } static inline void regs_set_return_value(struct pt_regs *regs, unsigned long rc) { regs->gpr[3] = rc; } This doesn't look consistent, does it? -- ldv