Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp435575imn; Fri, 29 Jul 2022 11:26:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uXeVe3gIPqFPuADrvdJ5Z1qwckodnLPI9KscvI4SFycQXHjj5yKev+yvO3dT820Zjjhx+R X-Received: by 2002:a17:907:1b03:b0:6ff:78d4:c140 with SMTP id mp3-20020a1709071b0300b006ff78d4c140mr3715576ejc.554.1659119197485; Fri, 29 Jul 2022 11:26:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659119197; cv=none; d=google.com; s=arc-20160816; b=sZmE0eS6LsjZqH8RX1WyBESwJvyzlRBWKw05OauFqRZBlVxrEzA+hmPhiWiAXmx4LA 1Uhn6y1g7KMux6XYcaFK0DUVmTYAqrAKTczSo/fnBRjtFbZD80mzTmXa7a8dUAkEdH1e MKfs1h+r4PDRlZCgvdyYNRIGbcgirbYmyv/oXbxHRqF+0yFBzt2v1qW29MYOpItHkB6t LwxBXE2pNuhsI1i6emUFt1zFUFR+bn3J6Y9VZ2yFaXEhJ+LygQdlzMzrFmuKghxipu5v PRAR6xIAFY6Rw98eempVmn1wGIvgafh3vBGhKl49FGR3/8IGLdWEKM4uqiy80RqLe1/9 KEHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GWJUI0U1W5ywU2OH1p9iE3oY+56py9fLb6+OGTHG8KU=; b=0FQVe8WGpg6ni1oCyAT4rXdRUVmyubE9ncy3fBZStWk5jkln0jIvInSEXcFiwLiJoy 2PCC4Yn7B2efrIcJNF7URwgmd+9bWqDR/Fm7Lijusb7aF6ONK1EcpKcnE67fc/YyShb8 IdWZGsgG6zi/Xw1QuanqiphhfKzcdWIM2wOS+1j8HlmCcH1r5drUMvjOCj7NRVGx8Y24 uR0pxUHVHBnE+uPf+/xzVpz1zl3Xer8D9ZUOlItF7cVHcrCctgZZ3hPxZgAGzAAVrvKV 8tiQtoSvVA+MnUdtXy6ksdEY/UVm38rrEAolbh8qMiO17aw0kQU42LQY1iiaegvAQVz2 NW8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=g7zUaw4w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d13-20020a170906344d00b006efe41f067asi3237232ejb.234.2022.07.29.11.26.12; Fri, 29 Jul 2022 11:26:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=g7zUaw4w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S237887AbiG2SWu (ORCPT + 99 others); Fri, 29 Jul 2022 14:22:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229509AbiG2SWs (ORCPT ); Fri, 29 Jul 2022 14:22:48 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F107C45057 for ; Fri, 29 Jul 2022 11:22:46 -0700 (PDT) Received: from zn.tnic (p57969665.dip0.t-ipconnect.de [87.150.150.101]) (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 4E79A1EC04CB; Fri, 29 Jul 2022 20:22:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1659118961; 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:in-reply-to:in-reply-to: references:references; bh=GWJUI0U1W5ywU2OH1p9iE3oY+56py9fLb6+OGTHG8KU=; b=g7zUaw4wzmaBskwPa+ar+pwDz9DAJenFceA98+ELtTGGyv84CNMsYLpVxw9lsMogDyyq/p GJYeoF/tZLoZxZh2VkX/LExLgv+oH+q+S/RdcADQD3okxXi5PCf7Q9RgQCcqQDCpwINAjW ldAetvo8CyvuAn7gKZ4/H4jqN+TGcZA= Date: Fri, 29 Jul 2022 20:22:36 +0200 From: Borislav Petkov To: Thadeu Lima de Souza Cascardo Cc: Dimitri John Ledkov , Andrew Cooper , linux-kernel@vger.kernel.org, x86@kernel.org, Peter Zijlstra Subject: Re: [PATCH] x86/bugs: Do not enable IBPB at firmware entry when IBPB is not available Message-ID: References: <20220728122602.2500509-1-cascardo@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 28, 2022 at 02:01:57PM -0300, Thadeu Lima de Souza Cascardo wrote: > I may be completely wrong here, so excuse me throwing out this idea. > > But isn't it also possible that userspace attacks the kernel by leveraging > speculative execution when in firmware? So even when firmware is trusted, it > might not have mitigations like retpoline and rethunks. So userspace will train > the BTB in order to make a RET in the firmware speculate to a firmware gadget > that may spill out kernel bits to the cache. > > Even though there is some limited mapping when doing the firmware calls, there > are still some kernel pages mapped. Yah, I dunno. That's why I raised this and added Andy. I certainly see your point tho. And what I know is, I don't want to be dealing with imaginary virt guest configurations just because some cloud providers wanna do whatever they like. I've put this mitigation selection spaghetti on my to-give-a-stern-look list. Because it is looking insane already and it'll get even worse with time. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette