From patchwork Thu Jun 25 03:15:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 50300 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 796E522900 for ; Thu, 25 Jun 2015 03:23:00 +0000 (UTC) Received: by wiea6 with SMTP id a6sf18079586wie.1 for ; Wed, 24 Jun 2015 20:22:59 -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=nWeyGwND+vu6j5ynlQsAxD+aE5mf7DBI3DE1SiEnM5w=; b=cZBzrf1o8KAAAS/0CNYx3zy4ytXunJbDsHFz0IywvF/TjXHZZ1HxxYj8Gqtr5Ybal3 QPHvVIKEu1I7SxdfrPZQBZx3ZKdFWQtYa7BStZHyGWu+CRSsHigEn6mh/SWu8C0PJ/KW gt5eidXvRwV+w33rtcpmFNRSIsvueZrgwE6wl2NoCvu+nDbRoyKgdeCg8ETILiH/Mg2b fY3Z8UFxiS1c6qirBsodrkv6XX15UJwqRPDwS61Z6cfR9vS8f77fbf9hOm2w/LA4VbO0 NGIsIL1BX9HdflMZsYErRgFmyBHa84uGMYyyZ1tH+/yE3ltOW7mvn/As5hCBnnbtuaOj ztJA== X-Gm-Message-State: ALoCoQmHv9Lb1JKiFYuCWbgTWABzIiw7i5YIWEH05ZI3j1p0z1GDgQ3/RA2fDYINN6oHgWi+RtLZ X-Received: by 10.112.40.45 with SMTP id u13mr38144598lbk.0.1435202579806; Wed, 24 Jun 2015 20:22:59 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.164 with SMTP id az4ls277363lab.16.gmail; Wed, 24 Jun 2015 20:22:59 -0700 (PDT) X-Received: by 10.152.5.98 with SMTP id r2mr42840575lar.8.1435202579689; Wed, 24 Jun 2015 20:22:59 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id 8si23564438laj.83.2015.06.24.20.22.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jun 2015 20:22:59 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by lacny3 with SMTP id ny3so36971502lac.3 for ; Wed, 24 Jun 2015 20:22:59 -0700 (PDT) X-Received: by 10.152.36.161 with SMTP id r1mr42819915laj.88.1435202579589; Wed, 24 Jun 2015 20:22:59 -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 hn6csp305810lbb; Wed, 24 Jun 2015 20:22:58 -0700 (PDT) X-Received: by 10.68.198.101 with SMTP id jb5mr87484365pbc.84.1435202236772; Wed, 24 Jun 2015 20:17:16 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ko11si11687318pbd.60.2015.06.24.20.17.15; Wed, 24 Jun 2015 20:17:16 -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 S1753047AbbFYDRA (ORCPT + 2 others); Wed, 24 Jun 2015 23:17:00 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:38833 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752762AbbFYDQa (ORCPT ); Wed, 24 Jun 2015 23:16:30 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t5P3GTbf012130 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 25 Jun 2015 03:16:29 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t5P3GT19012848 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 25 Jun 2015 03:16:29 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t5P3GTAS023111; Thu, 25 Jun 2015 03:16:29 GMT Received: from lappy.hsd1.nh.comcast.net (/10.154.137.172) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 24 Jun 2015 20:16:28 -0700 From: Sasha Levin To: stable@vger.kernel.org, stable-commits@vger.kernel.org Cc: sasha.levin@oracle.com Subject: [PATCH 3.18 84/91] x86/efi: Store upper bits of command line buffer address in ext_cmd_line_ptr Date: Wed, 24 Jun 2015 23:15:18 -0400 Message-Id: <1435202125-27785-85-git-send-email-sasha.levin@oracle.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1435202125-27785-1-git-send-email-sasha.levin@oracle.com> References: <1435202125-27785-1-git-send-email-sasha.levin@oracle.com> X-Source-IP: aserv0021.oracle.com [141.146.126.233] 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.215.53 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 [ 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;