Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4751994ybb; Tue, 7 Apr 2020 13:49:59 -0700 (PDT) X-Google-Smtp-Source: APiQypK4my9OcRrvZkPcb6UwaHkpF4on+RzQ2tfMRzdY/nMGl52oFrvjiXp8hG8h1QvUxV85utdX X-Received: by 2002:aca:bc56:: with SMTP id m83mr40361oif.11.1586292599285; Tue, 07 Apr 2020 13:49:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586292599; cv=none; d=google.com; s=arc-20160816; b=df6tOSRzx7GYj05jf1oBGEo1zGO69MaEmjHCuLrzX4Vu6yFDITqVyLV70k5NNDWrpi iHVRRTzlXvFBQsXsv387WJVWrAy2+e2sczapHXr+AaN7h+th2PtdKmECyoG1J4xdktsA sjsAIjxcQr+phcHW3CXuRiiZo62dgoiDdcmx3ouJI4QBn3i6Aifb/q2iKqBufkFDxfSV UtW4+F8tloKIjz71kP2WA+EjFZ4VDAuX+fnh3Bac1Z6JSG6vt+fRAEJweVxEI+rjcgI4 Z4EMjV6dA+M7qlrymKEOI1AF0tSA68aJJVpJc+WuB1JEgGW7RzstDqpI4QN0UNsc8GxU PLsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8rULhhQv+p0WTqb/15WNhl9X+GtDbdBlJB2dPAS4ssQ=; b=VPVq3EZyo46qTZGYPZ5jOklkq3F4CX+1nRUOyeW/yeborozVuTNErCKKgI1FStm3zW O36bBm/PjNTUmK83lH7fC2qJTDkSJQbdcA3BqEnyMJkj4mMKLnk5PX5p/JTNwCnKeQuq n4pKj//7OqTn45PCvBS/lpNIITEgfMA2GLn5cSSBPXMqdCJAOAja6mr3uMLu2anbNg4I lOobCRtwO9Ougaj1voIgvb4p6VME1TKUxa1vFleX0HwfqASoj+i+tv7xBEmsUpht25aM ZeaoHO7AJksXVioYx4PhBMxCqK9NasGR1zYOra+Fc78Ig49Ot9ZWsU/MUU6YUwXCO6nq P+Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=G5DykvVs; 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 u8si1702272ote.311.2020.04.07.13.49.44; Tue, 07 Apr 2020 13:49:59 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=G5DykvVs; 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 S1726444AbgDGUsp (ORCPT + 99 others); Tue, 7 Apr 2020 16:48:45 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:33942 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726370AbgDGUsp (ORCPT ); Tue, 7 Apr 2020 16:48:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=8rULhhQv+p0WTqb/15WNhl9X+GtDbdBlJB2dPAS4ssQ=; b=G5DykvVsj9weI1ijkNnZFk14vc MgS9CreBR9Hj6KGryZjxmduj0xr3m6Q9C742GdlxPpiCwkNb41h7COmr+/GYM0iO1JrqutybdANm2 ItatJujji3D5hNY32Dqjzibx2mtQI4ps1fNAMAPp0MFBtSHCRDvKolcrrY75H0yt41L04nQxU5xHb tWQ0nSYqAVzemq8az2pK77oKW3bnl/X1dlDV6/MCtPT7gTlVOv5gmZBbgefJLyHSOORkiQMCw64xR gUhdDaYz3SNfJ9FML13hAeHVf+1uD8gauVQkL7ykK0s90LTAIlcMD53OEizyF33MIpVzdm9n/P5Gy BrMHHvjg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jLv90-0002vB-6a; Tue, 07 Apr 2020 20:48:26 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 02FCA982F1A; Tue, 7 Apr 2020 22:48:23 +0200 (CEST) Date: Tue, 7 Apr 2020 22:48:23 +0200 From: Peter Zijlstra To: Andrew Cooper Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, hch@infradead.org, sean.j.christopherson@intel.com, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, x86@kernel.org, kenny@panix.com, jeyu@kernel.org, rasmus.villemoes@prevas.dk, pbonzini@redhat.com, fenghua.yu@intel.com, xiaoyao.li@intel.com, nadav.amit@gmail.com, thellstrom@vmware.com, tony.luck@intel.com, rostedt@goodmis.org, gregkh@linuxfoundation.org, jannh@google.com, keescook@chromium.org, David.Laight@aculab.com, dcovelli@vmware.com, mhiramat@kernel.org Subject: Re: [PATCH 0/4] x86/module: Out-of-tree module decode and sanitize Message-ID: <20200407204823.GS2452@worktop.programming.kicks-ass.net> References: <20200407110236.930134290@infradead.org> <20200407194112.GQ2452@worktop.programming.kicks-ass.net> <3245cf5e-b21b-634e-a9d7-a63d55145c33@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3245cf5e-b21b-634e-a9d7-a63d55145c33@citrix.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 07, 2020 at 09:21:31PM +0100, Andrew Cooper wrote: > > + switch (insn->opcode.bytes[1]) { > > + case 0x00: > > + if (modrm_mod != 0x03) > > + break; > > + > > Apologies - missed this before.? LLDT and LTR can be encoded with a > memory operand, so you need to drop the modrm_mod check to spot all > instances. I spotted the same, already fixed. Sorry for the mistake, reading opcode tables it a pain at the best of times :/