Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17243413ybl; Thu, 2 Jan 2020 01:28:46 -0800 (PST) X-Google-Smtp-Source: APXvYqwi0mTODKjA76+OlHxwXmn7uMxoZINtmzAc/bTVHTLgrCVCrfnohy0Zu/UGFFbX9yP2DO6Z X-Received: by 2002:a9d:53c2:: with SMTP id i2mr85990522oth.43.1577957326532; Thu, 02 Jan 2020 01:28:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577957326; cv=none; d=google.com; s=arc-20160816; b=EGekfyjWCrlJJevG6kuMFTjbKkvI/tUJeYTN3jliqcViquFs7lxXnGbr+EQ8lGMQdN 1Av4AMw4EvyCS6HXiYLHaCQOiM+AG7MRrTl3kCpht4be7z/rbadHIGEIyTGGsA1iarfN 1xcwCkxFrQVKkUt1h8YxfrF4QFgAZ8792vrM01FOJi8EliyUCPmwD+arvbTwSbrpS3VT VkJwTU//oflSofosyoFGvVSdw9yZ0epymAG9fnu+ZhUcgjSt66pbUqfeHrNxL2ctwSq1 GepHTeFy+rHIG2R2GURsHvSXxDwhVmXdzmCOTsmP4uPfwnVwpFW0ySc0Wt3vDz2gSiqb nZPw== 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=qFX5xVhEa7R6fr10YXKpmVLCawy4p5svcRjomdy8DBQ=; b=Cmh1dein4M/UPsEp7jdJgPIHFSpfOSBaFlb4Ab14Ji/KwWdpXDPzKOvrppP8QkvSj4 Cnapk3FVCWNEC+fRAXXculUxsxOtlbf5oB0nHjvi4OZuc/L2eaEDGEVvqub+ObGeUGS8 3kfL4C/6ZIWAsDni3zhzWqwMV2a8KtA56B51yInzXTCcy6M/Vuo2GPsdCKoDg8YqBYTL pJjFv8Iq1GbuszU0lrR40L7LtqF5r6/VvKbe+LcRkoq9MLqxhjU/F+j3mnBPaZDQwv/S aeHiOfsg4IGFqgDIaT6h0ySYVhQ+wcTUlgSelLTnR9+9Facbl4uM2fdKl/5ezjYnILec 0+RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=MUKjLCQD; 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=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q9si23975871oij.125.2020.01.02.01.28.34; Thu, 02 Jan 2020 01:28:46 -0800 (PST) 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=@alien8.de header.s=dkim header.b=MUKjLCQD; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727940AbgABJ1l (ORCPT + 99 others); Thu, 2 Jan 2020 04:27:41 -0500 Received: from mail.skyhub.de ([5.9.137.197]:38390 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727801AbgABJ1k (ORCPT ); Thu, 2 Jan 2020 04:27:40 -0500 Received: from zn.tnic (p200300EC2F00E700329C23FFFEA6A903.dip0.t-ipconnect.de [IPv6:2003:ec:2f00:e700:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 69C2D1EC0716; Thu, 2 Jan 2020 10:27:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1577957259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qFX5xVhEa7R6fr10YXKpmVLCawy4p5svcRjomdy8DBQ=; b=MUKjLCQD1JNs43TEo80ZyQGe6REMTVzv1MkowPEINyWckqer8X4mLpKXeKIYZD14Z2pwhj Q9QEP84QKwzMwGzN/jQiFInFnGjw7WTqUeIXhMgMSxQysq5RkPB0H5csjxWI/PjlRaaOdg 7awFmhh4D6kCCmRfRnQkmHXf9I+r/Ks= Date: Thu, 2 Jan 2020 10:27:33 +0100 From: Borislav Petkov To: Andy Lutomirski Cc: "Kirill A. Shutemov" , Jann Horn , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, Andrey Konovalov , Andy Lutomirski , Sean Christopherson Subject: Re: [PATCH v7 1/4] x86/insn-eval: Add support for 64-bit kernel mode Message-ID: <20200102092733.GA8345@zn.tnic> References: <20200102074705.n6cnvxrcojhlxqr5@box.shutemov.name> <498AAA9C-4779-4557-BBF5-A05C55563204@amacapital.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <498AAA9C-4779-4557-BBF5-A05C55563204@amacapital.net> 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 Thu, Jan 02, 2020 at 04:55:22PM +0900, Andy Lutomirski wrote: > > In most cases you have struct insn around (or can easily pass it down to > > the place). Why not use insn->x86_64? > > What populates that? insn_init() AFAICT. However, you have cases where you don't have struct insn: fixup_umip_exception() uses it and it calls insn_get_seg_base() which does use it too. > FWIW, this code is a bit buggy: it gets EFI mixed mode wrong. I’m > not entirely sure we care. We'll cross that bridge when we get there, I'd say. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette