Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8990965ybi; Tue, 23 Jul 2019 19:35:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxD2gjC2k8OMHyRewpgBEM9cP61rY175MFkDXAOp1WLzTtqrlnqVc8fQseZ/xJRPZaYNXD X-Received: by 2002:a17:902:e202:: with SMTP id ce2mr80432388plb.272.1563935752719; Tue, 23 Jul 2019 19:35:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563935752; cv=none; d=google.com; s=arc-20160816; b=Fkl06CRY7qcfJvBmWuJypJhCNzlK4+VEMix76EfGEOYg9CCIPlL60xOTyOUbca0XaL /wPOKqzXJpBqN3xnRpVgh8T8JVTsv8RmE0llv2jFD59Og1GBwxjRepv79XccRVJLEgfV 3didz24AjpAkWoaxM9I8O3MdarE0HFajKbV7hxpRJ/sQl5238B95xkN2XMPCcmS0hi2w ACFLhgzcZoG63z/7nIcMgUAuzh8JFE61v9UvGvvntMKudVAyeaP52K1si6n8wweneGbC nIYZYdqBtWXVeAgS0bc4D5zJlcYmZYW0LzzSrz2GboNEsBnBKRKZhVQXFSCBd/HMYpe5 ZiLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ULjvNu8XqxCLyK7lX3vJgWCh6vPqYwiwOi/5y16BH3Y=; b=U0j8Ry/Wf27sj3SJFgZkJgrfYKZcLlowrNEpUHFi14DwEzzXJcRS5arXTFmb0KUhEZ P8JAH1VWDAGhAYjgoaGX9ksjVeFvL/Zmz2fLnfYRfRihZe3Q1TdbvD+wb5JPSIJ7ER64 u/AbWkhijlBUoRlzg9svErTFMe+TzxfHCj1zP6lnO8BmXXVp4lVDOREQXyifq9WCExPz bMWsSerArgZZmLhyI8dj00YIUV7fhLcF4yn6usF1Q62X+ZyDIK1jZ+sH9iDoSp9c9L/r FlCNQRDgQbw0C/rBh4efNSxFF1iyBBvZsG5rIVCFdDb8YU1C4oAt4pFsbxTeh11Z0uNu KKDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GybFe+jt; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g28si11385045pgl.84.2019.07.23.19.35.38; Tue, 23 Jul 2019 19:35:52 -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; dkim=pass header.i=@chromium.org header.s=google header.b=GybFe+jt; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727289AbfGWXnH (ORCPT + 99 others); Tue, 23 Jul 2019 19:43:07 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:41143 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726871AbfGWXnG (ORCPT ); Tue, 23 Jul 2019 19:43:06 -0400 Received: by mail-pg1-f196.google.com with SMTP id x15so9844184pgg.8 for ; Tue, 23 Jul 2019 16:43:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ULjvNu8XqxCLyK7lX3vJgWCh6vPqYwiwOi/5y16BH3Y=; b=GybFe+jttEiHAN54hWf3fGA7UFjS+U2eNj3SotzkCQljsnOD9pSo4HeEXHRUjzwYq0 dqioBctjZKd0XfyyrX85hkdUUbv9K4F6HB4+KvmNyTDd2z5YRZMgWRLWwyLuxWhvyT5U hu3dagm6zvIxm7JavoPfQC18+BL65C3Lr7aXs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ULjvNu8XqxCLyK7lX3vJgWCh6vPqYwiwOi/5y16BH3Y=; b=L9riMK0Is8LFtx689ez2ZpNxsuz1FzBVE/hZNKKKd8etM3r8PNyCgkn0HU541PF4IF 4raXY46adepefZX+mxU64zY0ru/ESICqHnqvYtiEJC+GVyNtagMOojVms7nzF6l5+Bqq Dpb6F9an0MtLrlGINe1Zer7MQP/81vvf4P8mGRPKBBYzyIJqqzcDLbGAiPjn5YBzwB0l IaDi+jVUjyZrnL+2yJjHQOUa18S0ZwVlpnmzJbBKKBY2/zs36AzO0VAswhLCXeUv4+q8 cCPkUovW9amLYAr8tIublObe1Y6hG+NFhVcafsLcDX26pyuZRJd0OTBXJAjA8YgbehNt JzWA== X-Gm-Message-State: APjAAAUJ6WGevldrYaM7DYPmnlqLHKKQp79BbzHaoWj9ekSD3MR5pqbi 1jyBYvAyqWop/lyJFshpxxg6rA== X-Received: by 2002:a62:7552:: with SMTP id q79mr8304730pfc.71.1563925386175; Tue, 23 Jul 2019 16:43:06 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id j12sm34825460pff.4.2019.07.23.16.43.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Jul 2019 16:43:05 -0700 (PDT) Date: Tue, 23 Jul 2019 16:43:04 -0700 From: Kees Cook To: Thomas Gleixner Cc: Andy Lutomirski , Sean Christopherson , Vincenzo Frascino , X86 ML , LKML Subject: Re: [5.2 REGRESSION] Generic vDSO breaks seccomp-enabled userspace on i386 Message-ID: <201907231636.AD3ED717D@keescook> References: <20190719170343.GA13680@linux.intel.com> <19EF7AC8-609A-4E86-B45E-98DFE965DAAB@amacapital.net> <201907221012.41504DCD@keescook> <201907221135.2C2D262D8@keescook> <201907221620.F31B9A082@keescook> <201907231437.DB20BEBD3@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?) -- Kees Cook