Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1548389ybi; Sat, 27 Jul 2019 12:14:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIxD9ZpJ8l3VGGcNPheCRTw74P6ToZdHtCwKJsYpUR5/LtE78bc3m5qB0OmpjzjvQVNzjj X-Received: by 2002:a17:902:2a27:: with SMTP id i36mr100702893plb.161.1564254861069; Sat, 27 Jul 2019 12:14:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564254861; cv=none; d=google.com; s=arc-20160816; b=przpB+6XI7BCr218QajjmpK0IZebTrERPyLbd9lh9OX8fLRxJo8q8C+AIBRUpdxKVX PvxYWN77M5WeTkYHGlXerWUUXNNP152P6VhApDJnwLKJKn0Vv5IcW/qe6G2GXzZWI+5z DPTm/SXdJ9CIdSBhcQrjNuwXqrVRsJKumT3bu6QbGKRPlvgQAlXzeATnUTbfVk7Ben4h VVlXRCG71DO1U817xJMAb60S7NXhfNvgt0EQ3feB/As3VarmUoa3E8b9Ulol0SD00Dx5 B68kwDJf6knn7L/kJAAd1dcniQSpq8X5qj6U4EVUco/m5CVqBdexhZ3s7WqpfJV2EmD4 DCQA== 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=Edd1FdEKPmZrl3xjDy9mhOR7D5z0KUm5Kra1cpF9uNc=; b=lQbor+IsSNGJUASiins0qvAZMo0eEzBAwi7YamVRvWqsZOyytaxNJgBVce2twDjJTO asHjAsNfRKjQ2tzWCUFSGL6d72OYqF3oBVyfkHvfAHPhW96jNENLeCM4HKCxgfMW2iD7 JFels9o2mZaWcPi7EVXComqrt5AwXrkpT4v/LKK9YqAmNl40ZSPyHqE7qgtK6HReD2pJ s3t3GrTC8GKVo8v7JGnGVoTcThaZvIuBhxfa3ofDFJcvtjG6nuetGhh2Knd95wQoBRhj TtMVHBbnFSpdbwVQmYCZL0sY2mgZHEY2cMEUkxDFfLQmWQa8zWScXn+cSj4JdJxuJE7w Y4YQ== 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 s9si20248851plr.146.2019.07.27.12.14.05; Sat, 27 Jul 2019 12:14:21 -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 S2388078AbfG0SnO (ORCPT + 99 others); Sat, 27 Jul 2019 14:43:14 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:51164 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387880AbfG0SnO (ORCPT ); Sat, 27 Jul 2019 14:43:14 -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 1hrRer-00084q-Tj; Sat, 27 Jul 2019 20:43:06 +0200 Date: Sat, 27 Jul 2019 20:43:04 +0200 (CEST) From: Thomas Gleixner To: Andy Lutomirski cc: 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 Sat, 27 Jul 2019, Andy Lutomirski wrote: > On Fri, Jul 26, 2019 at 11:01 AM Sean Christopherson > wrote: > > > > +cc Paul > > > > On Wed, Jul 24, 2019 at 01:56:34AM +0200, Thomas Gleixner wrote: > > > On Tue, 23 Jul 2019, Kees Cook wrote: > > > > > > > On Wed, Jul 24, 2019 at 12:59:03AM +0200, Thomas Gleixner wrote: > > > > > And as we have sys_clock_gettime64() exposed for 32bit anyway you need to > > > > > deal with that in seccomp independently of the VDSO. It does not make sense > > > > > to treat sys_clock_gettime() differently than sys_clock_gettime64(). They > > > > > both expose the same information, but the latter is y2038 safe. > > > > > > > > Okay, so combining Andy's ideas on aliasing and "more seccomp flags", > > > > we could declare that clock_gettime64() is not filterable on 32-bit at > > > > all without the magic SECCOMP_IGNORE_ALIASES flag or something. Then we > > > > would alias clock_gettime64 to clock_gettime _before_ the first evaluation > > > > (unless SECCOMP_IGNORE_ALIASES is set)? > > > > > > > > (When was clock_gettime64() introduced? Is it too long ago to do this > > > > "you can't filter it without a special flag" change?) > > > > > > clock_gettime64() and the other sys_*time64() syscalls which address the > > > y2038 issue were added in 5.1 > > > > Paul Bolle pointed out that this regression showed up in v5.3-rc1, not > > v5.2. In Paul's case, systemd-journal is failing. > > I think it's getting quite late to start inventing new seccomp > features to fix this. I think the right solution for 5.3 is to change > the 32-bit vdso fallback to use the old clock_gettime, i.e. > clock_gettime32. This is obviously not an acceptable long-term > solution. Sigh. I'll have a look.... Thanks, tglx