Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2541217ybi; Sun, 28 Jul 2019 11:18:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxgA7MMuQOaT1KhH57YEiVbLNMNYTX5kNOSpexNPxX5nC0/TdlgPoucCq/bpACZRobSkkqd X-Received: by 2002:a63:6c46:: with SMTP id h67mr92701479pgc.248.1564337917713; Sun, 28 Jul 2019 11:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564337917; cv=none; d=google.com; s=arc-20160816; b=V7Wt2XV2K4tBAI4Wj/mekTKXlg1rujZ8CWscMqGIsx80K99qkfKDm+dFY1dncjxNhS K1ZqUyK+QXGnPULyeWnLeY4mwBAeuyF1N/fPhzoA/7+2i1TdR1ZvpK1+qdn3RMx4WxgA v+Yv8lRVwigW7mxO/Cu4btM2S/kHtbR5lEs/EIIYmoGGD7tOhabalncIsY399b2jRQJG iASD9sid1XpvM9lvBKLEqkBFNp8roMOj5zTl2W9w/fB6Z5k/PhmT7GVq9NYeVlmBgp4a FAUzQCtG5xw9uGCFTOJu6ZyTDihQhg117nEcNqEkj9xrO60QdI8Z9DPUzzgbox7WG/pC 4kWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=6m/WEVOYFbwqEi9sbmTXqJvPGxInFfsP/1lH35xBrCk=; b=OCqjMYulPeXv0osy48P7KpIvKkIq1ZNjzLs/uTOH+PChVOkNPirV6uvlNR2xYnM7cC N4X7yFbldWzQgWnpMDbfeCCdBU2VzYAum1CXvVTCbmwPYOMSRsNANjcMf2hYu8ZPVhp5 UNuLaOHwcC+WMDmrKRw0CVEj8sB8UWKVRtwlLj20NrUI4Jbq+zKFgr6Oo/IV9jRrNF0X 2oQpq+lPqhcYBpGTLnUAIaAvTpfYfhaW9g2WucT5+moavWgFAzbnAKYSp1TeRMpKCfrs 5pQ71d4IOE510oVYVduIyiSLJCDelBQCMuuZk9YeDj0TTviLLbFFzba/Ff3AimGunfSL 9OXw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 83si26737925pgc.207.2019.07.28.11.18.22; Sun, 28 Jul 2019 11:18:37 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726138AbfG1SRC (ORCPT + 99 others); Sun, 28 Jul 2019 14:17:02 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:51916 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726098AbfG1SRB (ORCPT ); Sun, 28 Jul 2019 14:17:01 -0400 Received: from pd9ef1cb8.dip0.t-ipconnect.de ([217.239.28.184] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hrnj6-0007hm-66; Sun, 28 Jul 2019 20:16:56 +0200 Date: Sun, 28 Jul 2019 20:16:55 +0200 (CEST) From: Thomas Gleixner To: Arnd Bergmann cc: Andy Lutomirski , Sean Christopherson , Kees Cook , Vincenzo Frascino , X86 ML , LKML , Paul Bolle Subject: Re: [5.2 REGRESSION] Generic vDSO breaks seccomp-enabled userspace on i386 In-Reply-To: Message-ID: References: <201907221012.41504DCD@keescook> <201907221135.2C2D262D8@keescook> <201907221620.F31B9A082@keescook> <201907231437.DB20BEBD3@keescook> <201907231636.AD3ED717D@keescook> <20190726180103.GE3188@linux.intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 28 Jul 2019, Thomas Gleixner wrote: > On Sun, 28 Jul 2019, Arnd Bergmann wrote: > > > On Sun, Jul 28, 2019 at 12:30 PM Thomas Gleixner wrote: > > > On Sun, 28 Jul 2019, Arnd Bergmann wrote: > > > > On Sat, Jul 27, 2019 at 7:53 PM Andy Lutomirski wrote: > > > > > Which is totally irrelevant because res is NULL and that NULL pointer check > > > should simply return -EFAULT, which is what the syscall fallback returns > > > because the pointer is NULL. > > > > > > But that NULL pointer check is inconsistent anyway: > > > > > > - 64 bit does not have it and never had > > > > > > - the vdso is not capable of handling faults properly anyway. If the > > > pointer is not valid, then it will segfault. So just preventing the > > > segfault for NULL is silly. > > > > > > I'm going to just remove it. > > > > Ah, you are right, I misread. > > > > Anyway, if we want to keep the traditional behavior and get fewer surprises > > for users of seccomp and anything else that might observe clock_gettime > > behavior, below is how I'd do it. (not even build tested, x86-only. I'll > > send a proper patch if this is where we want to take it). > > I posted a series which fixes up the mess 2 hours before you sent this mail :) And stupid me forgot to CC you. I was entirely sure that I did.... https://lkml.kernel.org/r/20190728131251.622415456@linutronix.de Sorry tglx