From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751800AbcFWVUc (ORCPT ); Thu, 23 Jun 2016 17:20:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56607 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751040AbcFWVUb (ORCPT ); Thu, 23 Jun 2016 17:20:31 -0400 Date: Thu, 23 Jun 2016 23:21:13 +0200 From: Oleg Nesterov To: Andy Lutomirski Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Borislav Petkov , Pedro Alves , Kees Cook Subject: Re: [PATCH v3 2/3] x86/signal: Rewire the restart_block() syscall to have a constant nr Message-ID: <20160623212113.GA14180@redhat.com> References: <6347a4fe9e8c67d511e7b8a68e8ee5ffb02ca968.1466464928.git.luto@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6347a4fe9e8c67d511e7b8a68e8ee5ffb02ca968.1466464928.git.luto@kernel.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 23 Jun 2016 21:20:31 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org So I think this series is fine, yesterday I misread it completely. On 06/20, Andy Lutomirski wrote: > > Suppose a 64-bit task A traces a 32-bit task B. And even if they are both 64-bit ... > B makes a syscall > that uses ERESTART_RESTARTBLOCK and gets a signal. A catches > syscall exit, snapshots B's regs, changes the regs, and resumes. > Then A restores the snapshot of B's regs. perhaps in this case gdb should always turn ERESTART_RESTARTBLOCK into EINTR, because we can't know if B->restart_block is still the same; it can be changed if the tracee does another RESTARTBLOCK syscall after the first resume. But anyway the patch looks good to me. Oleg.