Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp3940410ybn; Fri, 27 Sep 2019 13:42:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6N++pQ1XteyJYWimZz9eVoMThDUpeAYQe3gweBXWBQxg8IkSmJyMrG67HxsK6clgVtOFb X-Received: by 2002:a50:ed01:: with SMTP id j1mr6753018eds.268.1569616930158; Fri, 27 Sep 2019 13:42:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569616930; cv=none; d=google.com; s=arc-20160816; b=etP/5q5vZsplenTu+4JI1cqNlgjDbOX/yvljFyAr8yNcxgTavSA8a/AaajXR5N6IYN rv30pbzt+SDrYiOOh107h/DSyDUatLvT/rBRjuwvlwGUMvcnPLVup4kEkMLrx2zPPYGp dXYwzoDJWko9cbyxI8WVDeqtIPggGgSbvongqo+ExDC6FiVCctVAKdYmrUzCiXqqdHe2 TKI753SvWGCjOmAE4i6TmETYA+xXVABXjOnrz4Ashb/sz8RC/n22tRq15LK1RZir41Je zTzZOy8HFq/eCICYagrOFu5tvZaNm6V/FWEzWGxdgtxkXzTmlbcMSzRshwbR8UXa+/kk FXUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references; bh=lYMp/k2OPeQYx2d64Og2IkAZIsxU4+0Wc9GktQAL/Jo=; b=qHdCArkCVkV9F/IcyxqvVJYbpx9I8i4S+PI3iRiwLoFJc3qX6R70Z6zuOE+WhM9bTg kaORa5L1gJ9lrw5uHC0o+EHg+rCnlKr+hu5sl8dC69TQ3J3DWd+mm7UWQC+v5L8mB0WJ jWct6KFaOYASdPzpX9+GkL1DseJSsmkEm/bcjtg3NESfMwl7he9MRxY35y9ZnGbk41Cr Pzvb/WDZ1giaeof8gBRA2MvMtpGEXAGS8amZd6OpAYv4/zeZDYn15QcY9x2YuArok06t 3qgifA209l2pHPETHRpgrcIADOuO3cH2aVQL7b/I28Sum+8PkyeD8p5hw9Ay7VNkqEFD SOQA== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c52si2488933eda.132.2019.09.27.13.41.45; Fri, 27 Sep 2019 13:42:10 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728222AbfI0Ui4 (ORCPT + 99 others); Fri, 27 Sep 2019 16:38:56 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:7994 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725789AbfI0Ui4 (ORCPT ); Fri, 27 Sep 2019 16:38:56 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x8RKasNA040269; Fri, 27 Sep 2019 16:38:44 -0400 Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0a-001b2d01.pphosted.com with ESMTP id 2v9rd7j4u1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Sep 2019 16:38:43 -0400 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x8RKUd4c029263; Fri, 27 Sep 2019 20:38:43 GMT Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by ppma01wdc.us.ibm.com with ESMTP id 2v5bg7u5k2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Sep 2019 20:38:43 +0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x8RKcfPX38142260 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 27 Sep 2019 20:38:42 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E4DD2112063; Fri, 27 Sep 2019 20:38:41 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 659D6112062; Fri, 27 Sep 2019 20:38:40 +0000 (GMT) Received: from morokweng.localdomain (unknown [9.85.194.136]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTPS; Fri, 27 Sep 2019 20:38:40 +0000 (GMT) References: <20190911163433.12822-1-bauerman@linux.ibm.com> <875zly1jbo.fsf@morokweng.localdomain> User-agent: mu4e 1.2.0; emacs 26.2 From: Thiago Jung Bauermann To: linuxppc-dev@lists.ozlabs.org Cc: Paul Mackerras , Mike Anderson , Ram Pai , linux-kernel@vger.kernel.org Subject: Re: [PATCH] powerpc/prom_init: Undo relocation before entering secure mode In-reply-to: <875zly1jbo.fsf@morokweng.localdomain> Date: Fri, 27 Sep 2019 17:38:38 -0300 Message-ID: <87v9td5vap.fsf@morokweng.localdomain> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-09-27_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=907 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1909270171 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thiago Jung Bauermann writes: > Thiago Jung Bauermann writes: > >> The ultravisor will do an integrity check of the kernel image but we >> relocated it so the check will fail. Restore the original image by >> relocating it back to the kernel virtual base address. >> >> This works because during build vmlinux is linked with an expected virtual >> runtime address of KERNELBASE. >> >> Fixes: 6a9c930bd775 ("powerpc/prom_init: Add the ESM call to prom_init") >> Signed-off-by: Thiago Jung Bauermann > > I meant to put a Suggested-by: Paul Mackerras > > Sorry. Will add it if there's a v2. Ping? -- Thiago Jung Bauermann IBM Linux Technology Center