Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1419723ybl; Wed, 18 Dec 2019 18:49:27 -0800 (PST) X-Google-Smtp-Source: APXvYqx/o7KyHJeMQ7GW5CZkcFduXN3yNTs8u0Vr0IWEIm1Jx6CHRkdE3yx16JxYPfDkjQBxaJU6 X-Received: by 2002:a05:6830:4b9:: with SMTP id l25mr6357678otd.266.1576723767361; Wed, 18 Dec 2019 18:49:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576723767; cv=none; d=google.com; s=arc-20160816; b=HI5Y07OVXj5lX12QiIlZ+6hHCcPKGQnS2KbQU7fXYvmpypRzvXAEW3U84CJSIR/Psb rL3jLA8vkNORepjXC8EYGv6XC1DtlqP3mPeHlYudYClLzQJRgbYThDGZ7p4bf1SNucc8 L66X/JwO4XaU6mEGSZCWGNZ5zNHyswsXkZyGpFpIGz7xS4e/lA/y8E/hV/9BFSCpZIGg QQEWu6O88pCGb4jxV3aG02uWwlmP4U7XlzTc+GVqxnz6W5/R+OKkg0H82HKXsCNWZpPx WTGPlRQbT/uwiSl/shUOW1y5Gx9G+Ts3rg9A14uI4v3cbTa/iFmGCAmio1YkQYJS61IB BPRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ZBS3EYHlTAsDBc1KB8tg0Xechr+SQYmWSoZlApjWUcQ=; b=XcBU3Ee9z7xyBPK+B9qNRn+5Tn5+GvMuxOFvC5LBXlFP9p0GLspVjLhLnaKq0M6iuz djlaMwi3iMwz2imGTdjvjOtnX25yGK2OLMFW2ykT9kFfmeOZ48zOHRBgIOb8//da7SXO /6lkN0CZYL3vwubRevy22w0gCPw5k6IOpF/D+SBNdU4Xg5TV5MhAdqXMOSL0wAAVR0cD xGJGgMd/jNWyXr2tx0J18uEi/y1PFxxGklmKZOvqYXa5rHbIy7B6NCFIqA1BB3/pv01p MrnZWcc0igbKxAxA3qNWgW5y8+e9+920rWHASH6PNHWm359iNbdGuQecmbuGQgzgFH1+ w64A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KtDVa4AY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t130si2470425oib.202.2019.12.18.18.49.16; Wed, 18 Dec 2019 18:49:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KtDVa4AY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726882AbfLSCsi (ORCPT + 99 others); Wed, 18 Dec 2019 21:48:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:56860 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726463AbfLSCsi (ORCPT ); Wed, 18 Dec 2019 21:48:38 -0500 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5A4B024680 for ; Thu, 19 Dec 2019 02:48:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576723717; bh=2EXJXzAEGIHXEfPa6nkVtL3FzloAs4v91fJ3KzYNT5Q=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=KtDVa4AYNTPZy8VE550NbmwG03kUR++u4xYHWWU0WooYL65BsDijqksELTit44lFs TTMzUwVCIMNcOpicLAlYVQ7RHWp9MHtlUp+tt/AAeCI7WGs5SeqYHRxrFfT66kDd1W 7T5rFAZDXHUlzstHWKH832zo0+yVN+h89jiImX+I= Received: by mail-wm1-f45.google.com with SMTP id p9so3897714wmc.2 for ; Wed, 18 Dec 2019 18:48:37 -0800 (PST) X-Gm-Message-State: APjAAAVMCRP9hG364jyxnFO8w4nL1ZOoPAeSMhPqsFAjp9pomMmTqUTz /AT8+wzHGJxcqMkkJw+1OtybyCeKYkBRrmH9vxnnlg== X-Received: by 2002:a1c:20d6:: with SMTP id g205mr7154296wmg.38.1576723715742; Wed, 18 Dec 2019 18:48:35 -0800 (PST) MIME-Version: 1.0 References: <20191126110659.GA14042@redhat.com> <20191203141239.GA30688@redhat.com> <20191218151904.GA3127@redhat.com> In-Reply-To: From: Andy Lutomirski Date: Wed, 18 Dec 2019 18:48:24 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/4] x86: fix get_nr_restart_syscall() To: Linus Torvalds Cc: Oleg Nesterov , Andrew Morton , Andy Lutomirski , Borislav Petkov , Ingo Molnar , Jan Kratochvil , Pedro Alves , Peter Anvin , Thomas Gleixner , Linux Kernel Mailing List , "the arch/x86 maintainers" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 18, 2019 at 12:02 PM Linus Torvalds wrote: > > On Wed, Dec 18, 2019 at 7:19 AM Oleg Nesterov wrote: > > > > Andy, Linus, do you have any objections? > > It's ok by me, no objections. I still don't love your "hide the bit in > thread flags over return to user space", and would still prefer it in > the restart block, but I don't care _that_ deeply. > I'd rather stick it in restart_block. I'd also like to see the kernel *verify* that the variant of restart_syscall() that's invoked is the same as the variant that should be invoked. In my mind, very few syscalls say "I can't believe there are no major bugs in here" like restart_syscall(), and being conservative is nice.