From patchwork Mon Jun 22 04:13:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 50131 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C66B2214B9 for ; Mon, 22 Jun 2015 04:22:59 +0000 (UTC) Received: by laar3 with SMTP id r3sf29376951laa.1 for ; Sun, 21 Jun 2015 21:22:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=PouaqXeyEvLmV7cnU3m4cqDrxXJfOuE3UwXsZ7HyqMA=; b=WPqR3UugOBR/RrpBQ13XWVO/6p5qgAyk82O86VanVII7UTtJZJcV106L//NJIvf3tN aKK3sLaoRP8YDvgSX2VUc2rwA3EV61df+gQFxycPXi+UK5zDWclk+4+5a5XwkN5dfr94 euJu5DgZl8BnHiQc6aODsxZyvTDA5XKUnf9R0cbCLhPR95Zb9KQpSfYzT+OkNMafaYc6 6hOI8E/pW2iQH8xVoJXU+cmn4qZRt6pPvmHa6X5AoN0f3EGCyrT/K0/TIRI40MeJgLcG 4CiRRImchfHl2sD0GNtvsDCBS2bbb/ESbR8pf/j7owm1TbBZmHUwXkui57OYJ5uV5Pyv XmjQ== X-Gm-Message-State: ALoCoQnb31ERbUOppSz6kmCnPODASIHZLHFumc/neFxQHiEB1v4F4qZfPUzlfRMA6fEsruRBGNmb X-Received: by 10.152.26.134 with SMTP id l6mr26345252lag.10.1434946978805; Sun, 21 Jun 2015 21:22:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.225.129 with SMTP id rk1ls166343lac.71.gmail; Sun, 21 Jun 2015 21:22:58 -0700 (PDT) X-Received: by 10.152.29.69 with SMTP id i5mr28109683lah.6.1434946978625; Sun, 21 Jun 2015 21:22:58 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id lv3si14442216lac.87.2015.06.21.21.22.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Jun 2015 21:22:58 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by lbbti3 with SMTP id ti3so101145178lbb.1 for ; Sun, 21 Jun 2015 21:22:58 -0700 (PDT) X-Received: by 10.152.88.68 with SMTP id be4mr27951418lab.76.1434946978196; Sun, 21 Jun 2015 21:22:58 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp2120836lbb; Sun, 21 Jun 2015 21:22:57 -0700 (PDT) X-Received: by 10.68.102.228 with SMTP id fr4mr54334357pbb.110.1434946482604; Sun, 21 Jun 2015 21:14:42 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id lw8si27666587pdb.54.2015.06.21.21.14.41; Sun, 21 Jun 2015 21:14:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753194AbbFVEOk (ORCPT + 2 others); Mon, 22 Jun 2015 00:14:40 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:32028 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752419AbbFVEOW (ORCPT ); Mon, 22 Jun 2015 00:14:22 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t5M4EIJP005619 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 22 Jun 2015 04:14:19 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t5M4EIRp023651 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 22 Jun 2015 04:14:18 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t5M4EIoj029958; Mon, 22 Jun 2015 04:14:18 GMT Received: from lappy.hsd1.nh.comcast.net (/10.154.108.26) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 21 Jun 2015 21:14:17 -0700 From: Sasha Levin To: stable@vger.kernel.org, stable-commits@vger.kernel.org Cc: Roy Franz , Matt Fleming , Sasha Levin Subject: [added to the 3.18 stable tree] x86/efi: Store upper bits of command line buffer address in ext_cmd_line_ptr Date: Mon, 22 Jun 2015 00:13:24 -0400 Message-Id: <1434946411-9021-58-git-send-email-sasha.levin@oracle.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1434946411-9021-1-git-send-email-sasha.levin@oracle.com> References: <1434946411-9021-1-git-send-email-sasha.levin@oracle.com> X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Roy Franz This patch has been added to the 3.18 stable tree. If you have any objections, please let us know. =============== [ Upstream commit 98b228f55014870092c15d7d168fecac69f2f12a ] Until now, the EFI stub was only setting the 32 bit cmd_line_ptr in the setup_header structure, so on 64 bit platforms this could be truncated. This patch adds setting the upper bits of the buffer address in ext_cmd_line_ptr. This case was likely never hit, as the allocation for this buffer is done at the lowest available address. Only x86_64 kernels have this problem, as the 1-1 mapping mandated by EFI ensures that all memory is 32 bit addressable on 32 bit platforms. The EFI stub does not support mixed mode, so the 32 bit kernel on 64 bit firmware case does not need to be handled. Signed-off-by: Roy Franz Cc: Signed-off-by: Matt Fleming Signed-off-by: Sasha Levin --- arch/x86/boot/compressed/eboot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index 1acf605..3790a66 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c @@ -1110,6 +1110,8 @@ struct boot_params *make_boot_params(struct efi_config *c) if (!cmdline_ptr) goto fail; hdr->cmd_line_ptr = (unsigned long)cmdline_ptr; + /* Fill in upper bits of command line address, NOP on 32 bit */ + boot_params->ext_cmd_line_ptr = (u64)(unsigned long)cmdline_ptr >> 32; hdr->ramdisk_image = 0; hdr->ramdisk_size = 0;