Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp100894imm; Thu, 11 Oct 2018 16:16:23 -0700 (PDT) X-Google-Smtp-Source: ACcGV63/e3ImwragE+Izqdu72NavLLkaqoq3QL2oSwkgdxKlC81A+CyB222yNo2zyRSoummpQfGf X-Received: by 2002:a17:902:89:: with SMTP id a9-v6mr3276953pla.279.1539299783098; Thu, 11 Oct 2018 16:16:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539299783; cv=none; d=google.com; s=arc-20160816; b=KEUyZmq+u/D/3mZk4Q0k1ECMs/L3DzBEGbptvnwVY0PsMrWRgqdLjtwiK4BOtzDe6O 2RkMmxRvnqUTSuV3HaEkJUJu0zq97HmNf/peDHCvxVbc6EkYqYRjYOUSw7gS5zYljmdk z31J+iX810XqyGI27/Nrn/nIlUvGxkF7N8Ie2Za3Osnz8p5pwkQmE+0jnbTmLgYEl7pq PtUJg6QcG7roM0PhD2GZY6IUeq/QKTsXuCAMr89IuTIi0a8KzJcbcmt0bXRxSL2y4nfA CZmJ4kwKBwPbEIjQ1d2DMUXH6RShPWJqC+4+U88HRCDoQtN8zoiVyK/R0gMA2tIIinfc fDpQ== 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=HMM0ExNCvmDxzlDGCEawmhGXMGzJ+j0Hg43+ilgyWXw=; b=0JZGSrU+J7vg22vTq0zqaD3wpV+gHbZqGgkIU6YSV021FBap4Or6Oojm2RUR8bXEgG WWJ4gZ2jAnTH8Pj/tnaLlaU1AtXTG7F3R1s/hqwtBUe8n+IdXJ/wmnDMxn1sp5kx5upE /60ihDUwywR41uafM3W+k9Ppp0Ol2olrKnS3W6wHjGCkrDhWBs/Pomve4DvNR7YQsovD UFQs1lZ0I10NQhBFP88YdpicGIogLST1EnSR9Y0e4CRSQ1kly2apNn2snhOy8gRomt4O yFOKPgypcsz09Rccw7x92aGCDJavElgXxxndDgZJJAz8EMX3o5jD1SDj9DKy75fGWeI1 a0AQ== 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 23-v6si27099519pge.453.2018.10.11.16.16.07; Thu, 11 Oct 2018 16:16:23 -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 S1726235AbeJLGpG (ORCPT + 99 others); Fri, 12 Oct 2018 02:45:06 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:48802 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725913AbeJLGpG (ORCPT ); Fri, 12 Oct 2018 02:45:06 -0400 Received: from p5492fe24.dip0.t-ipconnect.de ([84.146.254.36] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gAkAX-0003yj-Ms; Fri, 12 Oct 2018 01:15:01 +0200 Date: Fri, 12 Oct 2018 01:15:01 +0200 (CEST) From: Thomas Gleixner To: Jann Horn cc: Kees Cook , Andy Lutomirski , kristen@linux.intel.com, Kernel Hardening , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , the arch/x86 maintainers , kernel list Subject: Re: [PATCH] x86: entry: flush the cache if syscall error In-Reply-To: Message-ID: References: <20181011185458.10186-1-kristen@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 Thu, 11 Oct 2018, Jann Horn wrote: > On Thu, Oct 11, 2018 at 10:56 PM Kees Cook wrote: > > Seems like just changing this with "ax == 0" into "ax >= 0" would solve that? > > As spender points out on twitter > (https://twitter.com/grsecurity/status/1050497259937370118 - thanks, > spender!), struct pt_regs stores register values as "unsigned long", > and so you'll need to use something like IS_ERR_VALUE(). Ha, so it's not only me who noticed, but then I'm not reading twitter... Thanks, tglx