Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1B22C4360F for ; Wed, 3 Apr 2019 08:09:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B182320830 for ; Wed, 3 Apr 2019 08:09:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gNP4devJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B182320830 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bXYdXVxIGLaWFHgxW8tOsTt+ui20bMNcRkpcRjtS4TQ=; b=gNP4devJEX4L/iCxtbSzhQuAk 4kkCn+kqX8kUJyW2hNRy5D5R6jMwEKYE+Z0eKwFU124JJqtWs3Kd0FoBbLmXksdLM9SVFeWLLd9S6 6keoNwRui3t6Rj2prTLOtsi5J4+V2OSxEZvRpZjh7zpockIbwJUr28x6wXcpfzz9d+31UjSxX8q1q rx03OhKGfhwZ8S1BUqEHtk0Hp2rZkWoxGxDNyB81bL7pe5xae3zclnewm+3MH+6UOVKRLyYDN86pP vdSItgQgdluUIhX40I9OWUL5BeAJFfK4Ii3fg/mjzE3CfMT/2Rc7boCzFxDojVYbpLmeLIs1DJV2q U4ECjeCHw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBaxz-0002pS-Ku; Wed, 03 Apr 2019 08:09:51 +0000 Received: from mail-pg1-f196.google.com ([209.85.215.196]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBaxw-0002p2-Iw for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2019 08:09:50 +0000 Received: by mail-pg1-f196.google.com with SMTP id q1so7897638pgv.13 for ; Wed, 03 Apr 2019 01:09:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=mnk0QjVYePph3HIIKvWD83pr6G+3veUlZYJgEoCbSDo=; b=gJhLMnpbVhG8Rb18ptJehZHo52uRjZL9fAixMyWUHSoQ6Od4OLyXyRxzlnvtFk9AN+ +cCaYWHpOF3xd7XUcR78hFjNPqCuxT8AOanqVkqpV3/6Zaag1jgpxLN3dDsScz/L58VF umC6trgx3drklXIkWnUwVnfns8AhqN3fI7dg7LDYLCpL0KzGpcQZ09iPrJxodSfrTHhs 7QX1PLdS6u7h4ImimAPiDaiWKfpwpY3QVrFBBMdoCnwltMhW5h9uTz+lWXkAgHKO76tC RYYVF4/7vMtzL0MiGWuykXpjn8LufHCPYxIunedhehn5nkZNUtIvsJBk0oWWAEoEsHfM mwYQ== X-Gm-Message-State: APjAAAUNicIj3N5siRqM74L4lRWJLKUj1HmoLawwzD41amgfheDrr7ks A69MIFQARdRkZDiZV/E5zlL+Jg== X-Google-Smtp-Source: APXvYqwKLXpcauLIfcOomTLjPIevNQ2vZ12L9BVBJ0LiH2ZueOOfnJd7alWWvV9ljm8SVHLGoSiokQ== X-Received: by 2002:a63:3f8d:: with SMTP id m135mr31156969pga.228.1554278987507; Wed, 03 Apr 2019 01:09:47 -0700 (PDT) Received: from localhost.localdomain ([110.227.177.36]) by smtp.gmail.com with ESMTPSA id d68sm3212051pfg.16.2019.04.03.01.09.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Apr 2019 01:09:46 -0700 (PDT) Subject: Re: [PATCH 0/9] 52-bit kernel + user VAs To: Steve Capper , linux-arm-kernel@lists.infradead.org References: <20190218170245.14915-1-steve.capper@arm.com> From: Bhupesh Sharma Message-ID: <0b20407f-71ab-165b-2fce-ae8c43fc3316@redhat.com> Date: Wed, 3 Apr 2019 13:39:36 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20190218170245.14915-1-steve.capper@arm.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190403_010948_619739_99F24390 X-CRM114-Status: GOOD ( 19.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: crecklin@redhat.com, Ard Biesheuvel , marc.zyngier@arm.com, Catalin Marinas , Suzuki K Poulose , will.deacon@arm.com, Dave Anderson , James Morse , Bhupesh SHARMA Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Steve, On 02/18/2019 10:32 PM, Steve Capper wrote: > This patch series adds support for 52-bit kernel VAs using some of the > machinery already introduced by the 52-bit userspace VA code in 5.0. > > As 52-bit virtual address support is an optional hardware feature, > software support for 52-bit kernel VAs needs to be deduced at early boot > time. If HW support is not available, the kernel falls back to 48-bit. > > A significant proportion of this series focuses on "de-constifying" > VA_BITS related constants. > > In order to allow for a KASAN shadow that changes size at boot time, one > must fix the KASAN_SHADOW_END for both 48 & 52-bit VAs and "grow" the > start address. Also, it is highly desirable to maintain the same > function addresses in the kernel .text between VA sizes. Both of these > requirements necessitate us to flip the kernel address space halves s.t. > the direct linear map occupies the lower addresses. > > One obvious omission is 52-bit kernel VA + 48-bit userspace VA which I > can add with some more #ifdef'ery if needed. Thanks for the patchset. I did some work on the user-space side to see how user-space tools like makedumpfile and kexec-tools are affected by these changes. I see that Dave Anderson (in Cc) also did some work on crash-utility side [0] to have the basic framework in place to have the user-space tools work with the inverted memory map. I have a couple of concerns regarding: 1. VA_BITS_ACTUAL, and how user-space gets to know its value. 2. Overall bits that we need to be aware in user-space now to address the following combinations of address space (phew ..): a) 48-bit Kernel VA + 48-bit User-space VA + 48-bit PA b) 48-bit Kernel VA + 48-bit User-space VA + 52-bit PA c) 48-bit Kernel VA + 52-bit User-space VA + 52-bit PA d) 52-bit Kernel VA + 52-bit User-space VA + 52-bit PA e) 52-bit Kernel VA + 48-bit User-space VA + 52-bit PA (is this even used-somewhere? Not sure but James [in Cc] had some queries on this [1]. Personally, I am not aware of any users of this combination). I have added detailed comments/concerns in individual patches in mails to follow regarding the above points. [0]. https://github.com/crash-utility/crash/commit/b0b3ef2eda543413762b32710b8a63dd9ed55de5 [1]. http://lists.infradead.org/pipermail/kexec/2019-April/022729.html Thanks, Bhupesh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel