Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp432560ybb; Wed, 8 Apr 2020 02:50:52 -0700 (PDT) X-Google-Smtp-Source: APiQypINUipYOXqhRxxDNi0PkRMqj6STFERjux3FdCmmsg9b61N330EFck1goGreMin+45kkqYSq X-Received: by 2002:a4a:e144:: with SMTP id p4mr5222477oot.55.1586339452705; Wed, 08 Apr 2020 02:50:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586339452; cv=none; d=google.com; s=arc-20160816; b=CijML8Xt+6n4pUDsGP29Ak+/rvCuNKPOrSyRgq614zredZ5o7bMlo777tglAkntqcs dVff0sx2aHcokGBuIysRJKRaXMLU0eRnfIDPb4g5BW3uX+ZUIfzWdwAxANQkGu/W5LWR sPYO0wc7qF/rdm3qaKQGpZvePiw35sMziFfoaYbdjrE88lOsvLJmMymtYs2l/YXkr4uK JAVMCa0uKEEy84l0To8BRDgjlhou6LIOfW/JkTewdVohJ0qTUvgRFuY4oUCteekzoI++ n0q2FgWEdqQKg5ibZRFCvQZ2b/Rj1q5ryYZaZs/g5RuBQnMZFUvkpYc/BNSPVm7rCjBf CXkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=iscLQ++x12l+2Wv2OXY78edHa685HyNPwWCs76BNT2w=; b=j4shTtdumk691v8oeu+P56mpnehKSo0IMj4jGdJ4Ii/uGM9x/VEHiznH6Gxxml4BVe EvKWUnkv000XJ5XKoFFXayvNOSyLusN0vibgiSCc4OWLP1LlBAXtQNtDpV/hADlZAtI3 jk1kpv00ZU8X60SyUJsFgmINDVehUsNKD8OMixwXStcyayPViY49e3v8+2OyhFMS+Njb UhpITSx2inhQBAfn/dAnN8lftwcralOfYG5tKp1FbUluoL/0BIHwVqe6enblGQQuP9Vp NhWqCDeq3x1WMFodIIfY94R4vC1VJG0FK1P0xgGl8p1SXJD57hE8KY+LAXUPmFbybaqg kc2A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v61si2389704otb.20.2020.04.08.02.50.38; Wed, 08 Apr 2020 02:50: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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726876AbgDHJAQ (ORCPT + 99 others); Wed, 8 Apr 2020 05:00:16 -0400 Received: from gecko.sbs.de ([194.138.37.40]:37245 "EHLO gecko.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726632AbgDHJAQ (ORCPT ); Wed, 8 Apr 2020 05:00:16 -0400 Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id 0388xBxW009550 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 8 Apr 2020 10:59:11 +0200 Received: from [167.87.145.84] ([167.87.145.84]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 0388x2iT023319; Wed, 8 Apr 2020 10:59:03 +0200 Subject: Re: [PATCH 4/4] x86,module: Detect CRn and DRn manipulation To: Peter Zijlstra Cc: Steven Rostedt , 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, gregkh@linuxfoundation.org, jannh@google.com, keescook@chromium.org, David.Laight@aculab.com, dcovelli@vmware.com, mhiramat@kernel.org, Wolfgang Mauerer References: <20200407110236.930134290@infradead.org> <20200407111007.429362016@infradead.org> <20200407174824.5e97a597@gandalf.local.home> <137fe245-69f3-080e-5f2b-207cd218f199@siemens.com> <20200408085138.GQ20713@hirez.programming.kicks-ass.net> From: Jan Kiszka Message-ID: Date: Wed, 8 Apr 2020 10:59:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200408085138.GQ20713@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08.04.20 10:51, Peter Zijlstra wrote: > On Wed, Apr 08, 2020 at 07:58:53AM +0200, Jan Kiszka wrote: >> On 07.04.20 23:48, Steven Rostedt wrote: > >>> Hmm, wont this break jailhouse? > > Breaking it isn't a problem, it's out of tree and it should be fixable. > >> Yes, possibly. We load the hypervisor binary via request_firmware into >> executable memory and then jump into it. So most of the "suspicious" code is > > W.T.H. does the firmware loader have the ability to give executable > memory? We need to kill that too. /me goes find. > At the risk of cutting our own branch off: That's not the firmware loader, it's ioremap with PAGE_KERNEL_EXEC. Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux