Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp187601imj; Thu, 14 Feb 2019 18:15:33 -0800 (PST) X-Google-Smtp-Source: AHgI3IaxLHZxjJyrnsFNgBuqxN4csbDQg7WvGaUXVyPqUVZsYf0P81JeoT2sHCmkSIEVT9wBms9l X-Received: by 2002:a62:2cf:: with SMTP id 198mr7349760pfc.67.1550196933124; Thu, 14 Feb 2019 18:15:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550196933; cv=none; d=google.com; s=arc-20160816; b=P0NPxg4qKd4/D0js6apy9vJhb4+qaRYWAimFCRQ5IxaLqRsr8dqybnhMg+VOw8ajfF uazyjLkCHb5RAhWXmWToZ3Ai7QmEMcoePtrwcgN61Bo7IjLJXWRRYMtyu/O3Yey3jf6U TqIGOqTginSZKolpGqhLCtaCxvpRqQIvDEYa1GfITw46JZatMp0DZuKdgEKmjFZKV7IN NjuExHMXnF68SEvqozJsX+z+k8NDepLq7EzF/F28wZmtlfaWsKws/95c1IUJH3UdeYYv N06U0JWoRALnkjAzhu8Wfh0IXRx3RvvCEQDnzWVLn00tGV5Asjp6dn6q73uJoIaEyYnI sikA== 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-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date; bh=57NJ8bpjx1O8t1bRYihRxvKic3Iu/4ozVUJAlI0cU0U=; b=KvMEnDm6NSKGU9nUQIq3AKxVK03k1So14KcaB++8qWMqRfdTNE43miJpDlLrEDQFpH yM3rJSWr1e5lLPUCCa+5Lzstc8Ikr1Az9YSNN2OLqhF/ynCXx7LsOsin+9S4M50mkwMv nYp1kNp74hpqaCKzEsbbYpTteUkBvaURnyoQWh7MgORiNMYVzKDwNZrzb//8k7N0I6wj gbPQwWiWd2bBTKzhrXK2XenZAVZgT10b4hU5wB4n7coqfwiRN88UgpPQkjFO5iunN+Kr tCBg0WGgBzfJwPg/dFqrpG1ZhSXo6KaUl4YH0S6QiCD3YbCBNfIwI5XcsTfY25u286CL zpqA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s5si3743607pgp.64.2019.02.14.18.15.16; Thu, 14 Feb 2019 18:15:33 -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; 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 S2394691AbfBNVJD (ORCPT + 99 others); Thu, 14 Feb 2019 16:09:03 -0500 Received: from mx0a-002e3701.pphosted.com ([148.163.147.86]:38020 "EHLO mx0a-002e3701.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393552AbfBNVJB (ORCPT ); Thu, 14 Feb 2019 16:09:01 -0500 Received: from pps.filterd (m0148663.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1EL1Ecq019562; Thu, 14 Feb 2019 21:08:41 GMT Received: from g4t3425.houston.hpe.com (g4t3425.houston.hpe.com [15.241.140.78]) by mx0a-002e3701.pphosted.com with ESMTP id 2qnevd8g78-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Feb 2019 21:08:41 +0000 Received: from g4t3433.houston.hpecorp.net (g4t3433.houston.hpecorp.net [16.208.49.245]) by g4t3425.houston.hpe.com (Postfix) with ESMTP id 89B1CBE; Thu, 14 Feb 2019 21:08:40 +0000 (UTC) Received: from hpe.com (ben.americas.hpqcorp.net [10.33.153.7]) by g4t3433.houston.hpecorp.net (Postfix) with ESMTP id 980C75B; Thu, 14 Feb 2019 21:08:39 +0000 (UTC) Date: Thu, 14 Feb 2019 15:08:39 -0600 From: Russ Anderson To: Ard Biesheuvel Cc: Hedi Berriche , Ingo Molnar , Thomas Gleixner , Borislav Petkov , Linux Kernel Mailing List , Bhupesh Sharma , "H. Peter Anvin" , linux-efi , the arch/x86 maintainers , Mike Travis , Dimitri Sivanich , Steve Wahl , stable Subject: Re: [Patch v3 0/4] Protect against concurrent calls into UV BIOS Message-ID: <20190214210839.fpghjsexpfid4bc4@hpe.com> Reply-To: Russ Anderson References: <20190213193413.25560-1-hedi.berriche@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170421 (1.8.2) X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-14_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902140139 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 14, 2019 at 09:17:37AM +0100, Ard Biesheuvel wrote: > On Wed, 13 Feb 2019 at 20:34, Hedi Berriche wrote: > > > > - Changes since v2 > > Addressed comments from Ard Biesheuvel: > > * expose efi_runtime_lock to UV platform only instead of globally > > * remove unnecessary #ifdef CONFIG_EFI from bios_uv.c > > > > - Changes since v1: > > Addressed comments from Bhupesh Sharma, Thomas Gleixner, and Ard Biesheuvel: > > * made __uv_bios_call() static > > * moved the efi_enabled() cleanup to its own patchlet > > * explained the reason for renaming the efi_runtime_lock semaphore > > * dropped the reviewed-bys as they should be given on the mailing list > > * Cc'ng stable@vger.kernel.org given the nature of the problem addressed by the patches > > > > Hi Hedi, > > The patches look good to me now. > > For the series, > > Reviewed-by: Ard Biesheuvel > > However, I don't think all the patches should go to -stable. Only 4/4 > fixes an actual bug, and the remaining patches don't look like they > are prerequisites for that change. > > Also, if your colleagues reviewed your patches, now would be the time > to ask them to give their Reviewed-by as well. Reviewed-by: Russ Anderson Thanks. > -- > Ard. > > > > > --- > > > > Calls into UV BIOS were not being serialised which is wrong as it violates EFI > > runtime rules, and bad as it does result in all sorts of potentially hard to > > track down hangs and panics when efi_scratch.prev_mm gets clobbered whenever > > efi_switch_mm() gets called concurrently from two different CPUs. > > > > Patch #1 removes an unnecessary #ifdef CONFIG_EFI guard from bios_uv.c. > > > > Patch #2 removes uv_bios_call_reentrant() because it's dead code. > > > > Patch #3 is a cleanup that drops test_bit() in favour of the ad hoc efi_enabled(). > > > > Patch #4 makes uv_bios_call() variants use the efi_runtime_lock semaphore to > > protect against concurrency. > > > > Cc: Russ Anderson > > Cc: Mike Travis > > Cc: Dimitri Sivanich > > Cc: Steve Wahl > > Cc: stable@vger.kernel.org # v4.9+ > > > > Hedi Berriche (4): > > x86/platform/UV: remove unnecessary #ifdef CONFIG_EFI > > x86/platform/UV: kill uv_bios_call_reentrant() as it has no callers > > x86/platform/UV: use efi_enabled() instead of test_bit() > > x86/platform/UV: use efi_runtime_lock to serialise BIOS calls > > > > arch/x86/include/asm/uv/bios.h | 13 ++++----- > > arch/x86/platform/uv/bios_uv.c | 35 ++++++++++++++----------- > > drivers/firmware/efi/runtime-wrappers.c | 7 +++++ > > 3 files changed, 34 insertions(+), 21 deletions(-) > > > > -- > > 2.20.1 > > -- Russ Anderson, SuperDome Flex Linux Kernel Group Manager HPE - Hewlett Packard Enterprise (formerly SGI) rja@hpe.com