Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp545608ybh; Wed, 11 Mar 2020 06:13:54 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtkgNokBxBAuDtJYH7QGPCwIXQw299tJevjASqDb541M3Crp5fLNmDqJDnVeyfR3ldWEI5X X-Received: by 2002:aca:4843:: with SMTP id v64mr1807029oia.13.1583932434592; Wed, 11 Mar 2020 06:13:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583932434; cv=none; d=google.com; s=arc-20160816; b=dQEPCv8oefUYDumzBiNwK1wzOxXksrHk3HdyeOsXtZ/J+kTY4N6kOE9wFUilC8xIfh X8SoHyCa/FIUTWULR5OUhaR3Odnzyma/JMfWsQc0I6/1V3zXZH/S8WPTp8Nmr6AItBJN srzCvXnHhOBxoxvkT9FGPhqxrnjFflYQ5SbNndLCfqfpk1JTggbsK63R6rx/+T2mFDx6 GRvasSSCpiwYGdTX9P0AeVIxtuaT5KVojiNs5do6XL64AhNIZL3FDMN6cAnacEi4LvQZ HkRXUM34jW1x7E2wDVzcnETLXcsNjYaem2NGpUAwJEytUPFfO8OB7g6jE9CmBnfKNvj6 WGHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=mXl8NZittBaHEIyr/F8t+K9Y7N5tQ+dCcdoIFWN4Lts=; b=sWbyK4rDResICDYksJBmYKdiDYQQlIXJKeHzhRa4purvKTGCuul0nob6soZlNc2TRB yaKTpRTbSsdOB49P6gocmZn7ejtkvqyPXCFNujilRJpxlU6u/NUMFKL3lUMy2CcRJ+P3 xpvetLtj/6JT2y5GUzCBXGmUmhcc2VzE3VlK01SgMoMHzdq9BaVh8JgwHaK7i4H71VF2 2JDGDgSAv+TkxKcPa+KiQzSCIeSwjeoOEkFrgVoUN5mEVkk1F1M3LWkNyw8wlHbOevaX QoI3E7UewWcrNb117LkXdu/Dp80bYlXRuZ75PUNXR3iIfe9Jlbj52GI8ic+bhgjs1SCm AXDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qxxNTPn7; 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 v22si1151446oia.165.2020.03.11.06.13.37; Wed, 11 Mar 2020 06:13:54 -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=pass header.i=@kernel.org header.s=default header.b=qxxNTPn7; 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 S1729498AbgCKNNP (ORCPT + 99 others); Wed, 11 Mar 2020 09:13:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:45774 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729414AbgCKNNP (ORCPT ); Wed, 11 Mar 2020 09:13:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7E2E322464; Wed, 11 Mar 2020 13:13:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583932394; bh=1oMyqZhhouDDxXXOvmwgcXgxgUJvVopRYYmca3y7TKk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qxxNTPn7MlwKwTypoj3+toFl5CVBiuIbgmaxMRvo9wEkhDAEr9ZveGaTfHuY4+nZD htik0wu7e/K8QusJBFTZpVQD2ljJwL4xnxoY0DWyVQQHDVRK38Xqf4bguvDSo1OXcf frcmSmNL4rOhMQiW1Kvw2vDuscYgJCE/Znn75HRw= Date: Wed, 11 Mar 2020 14:13:11 +0100 From: Greg Kroah-Hartman To: Pavel Machek Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Ard Biesheuvel , Ingo Molnar , linux-efi@vger.kernel.org, Thomas Gleixner Subject: Re: [PATCH 4.19 84/86] efi/x86: Handle by-ref arguments covering multiple pages in mixed mode Message-ID: <20200311131311.GA3858095@kroah.com> References: <20200310124530.808338541@linuxfoundation.org> <20200310124535.409134291@linuxfoundation.org> <20200311130106.GB7285@duo.ucw.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200311130106.GB7285@duo.ucw.cz> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 11, 2020 at 02:01:07PM +0100, Pavel Machek wrote: > Hi! > > > Currently, the mixed mode runtime service wrappers require that all by-ref > > arguments that live in the vmalloc space have a size that is a power of 2, > > and are aligned to that same value. While this is a sensible way to > > construct an object that is guaranteed not to cross a page boundary, it is > > overly strict when it comes to checking whether a given object violates > > this requirement, as we can simply take the physical address of the first > > and the last byte, and verify that they point into the same physical > > page. > > Dunno. If start passing buffers that _sometime_ cross page boundaries, > we'll get hard to debug failures. Maybe original code is better > buecause it catches problems earlier? > > Furthermore, all existing code should pass aligned, 2^n size buffers, > so we should not need this in stable? For some crazy reason you cut out the reason I applied this patch to the stable tree. From the changelog text: Fixes: f6697df36bdf0bf7 ("x86/efi: Prevent mixed mode boot corruption with CONFIG_VMAP_STACK=y")