Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4963766imm; Tue, 31 Jul 2018 03:16:39 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdJxNEpOn0FUTbQIyCbgdMGLc8hN08HxbRINtYF0tQly2zGyNvd+e3uIgvAE3YbXNsAm1q0 X-Received: by 2002:a62:e30c:: with SMTP id g12-v6mr21691523pfh.25.1533032199073; Tue, 31 Jul 2018 03:16:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533032199; cv=none; d=google.com; s=arc-20160816; b=i7YMVFHEiVnYzS+zxsOtgT/trbFbkoYz+TNCWzO2/uJfDomRWMie7Rlnn4Gm5m11uR CV6cRbxy5ozS6kLgyWZoledKmrZdcCh+WCB5txv4J4EC7J0DYtQyD+aGVFbWhR1vIHDH CVme+98eoMuCSk+mRxx87RSvxjnCaeTu1lEUDQtzBCV1m1tG7ekRybNefSvDF8kc+M9D hsHPC1y9+ludUu0/S7VcGoj+1WRuzy+4qu3KcZaOW2FyCde8k00LqKAyLemupRx6Dtd3 FGGW7DgaEmUIHBVL2P4/0NkSCX0t0ZooZ9YlUTGAx2IN5IOYgwxpnb2z/udxpKrnwD7K Ap7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:arc-authentication-results; bh=Q2olNchs8Sv3XuWlKjDOMvgEXBeJ3cetECYQLXSqUZM=; b=SinbqMdgWgOmdJSQk73cQL4UwRtPOFyBgdBVwsbHaKjwxCAv5bWP+/gxYUtsjcNFIv 44Wl/5jsSpd25h50zmgiJBJNMGc/C7tVO7rSXNj6hI9ShDEPrXrSc1r+hgRfXQrAP1f6 Yrqzz5q16FDZcSNxXiVUtvEN0Pnej6MlqSHNy8PRtJaKoGMElDUhxj4xbM5dw16r/WvW l39HzfD3GFQAsxChxTQadMqnc57O8G2bTkK2kY4gxONJijFJZ50SK8vRF6WFisOjnqgj Wsfexmkj3Nbh4tS8RPYjt62c6l0BuEQrCM0PoIkWPKKH1y9ESp377C/hoiEHgwDjIOFy 7HJQ== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bh7-v6si11711973plb.367.2018.07.31.03.16.24; Tue, 31 Jul 2018 03:16:39 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731512AbeGaLzN (ORCPT + 99 others); Tue, 31 Jul 2018 07:55:13 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:33600 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729998AbeGaLzM (ORCPT ); Tue, 31 Jul 2018 07:55:12 -0400 Received: by mail-lj1-f193.google.com with SMTP id s12-v6so13214101ljj.0 for ; Tue, 31 Jul 2018 03:15:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Q2olNchs8Sv3XuWlKjDOMvgEXBeJ3cetECYQLXSqUZM=; b=jvzv/CpuUHUpTMzyg1+XWqPOM8ZqZ+baTwx2BSRU+9iTTAjMIaYS6DE6bLJNwShnea y5epwZ6aot3dp/GisdVsIF8Ic/ywXHHKmZcc0n6MHW2ybqgltQS4e7uT3uH4ZVHzygMN JX+4adwFTbTkFwSkGrJvoRfPcqQs47UunVlViIII2u5XYIm/ZMpjCy7kdUDvdAERrukw 2SBD0lqq4qCPzagey6YG/5c9Os53gRZrWCLL191UYs5BcSyeJARemVsz0WS295V5hJyT 4ar9DLvYOQwpqMC46f9o65xBc0vzer6nvGn6RC9tyuy5WmcUmn3dx4www6seFxi38gDg i5VA== X-Gm-Message-State: AOUpUlHoJmi+iuIiUOC83CRufVkwRrZ8Tr2eNfHdKKbTnP8Vumn2+HfI CdywNTbIeQQTr1zif1zi4ajCGFeBsUyB1yKPntiDdQ== X-Received: by 2002:a2e:8457:: with SMTP id u23-v6mr14875537ljh.95.1533032134567; Tue, 31 Jul 2018 03:15:34 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:81a:0:0:0:0:0 with HTTP; Tue, 31 Jul 2018 03:15:33 -0700 (PDT) In-Reply-To: <20180731092629.GD4680@arm.com> References: <1532931883-16132-1-git-send-email-bhsharma@redhat.com> <303e32f7-ff47-ea9b-d5a0-45a22e44d0a9@arm.com> <20180731092629.GD4680@arm.com> From: Bhupesh Sharma Date: Tue, 31 Jul 2018 15:45:33 +0530 Message-ID: Subject: Re: [PATCH v2] arm64, kaslr: export offset in VMCOREINFO ELF notes To: Will Deacon Cc: James Morse , linux-arm-kernel , Linux Kernel Mailing List , kexec mailing list , Bhupesh SHARMA , AKASHI Takahiro , Catalin Marinas , Ard Biesheuvel , Mark Rutland Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Will, James, On Tue, Jul 31, 2018 at 2:56 PM, Will Deacon wrote: > On Tue, Jul 31, 2018 at 10:19:35AM +0100, James Morse wrote: >> Hi Bhupesh, >> >> On 30/07/18 07:24, Bhupesh Sharma wrote: >> > Include KASLR offset in arm64 VMCOREINFO ELF notes to assist in >> > debugging. vmcore parsing in user-space already expects this value in >> > the notes and we are providing it for portability of those existing >> > tools with x86. >> > >> > Ideally we would like core code to do this (so that way this >> > information won't be missed when an architecture adds KASLR support), >> > but mips has CONFIG_RANDOMIZE_BASE, and doesn't provide kaslr_offset(), >> > so I am not sure if this is needed for mips (and other such similar arch >> > cases in future). So, lets keep this architecture specific for now. >> >> (heh, I assumed you would rewrite my train-of-thought, but I guess this works!) >> >> >> > As an example of a user-space use-case, consider the >> > makedumpfile user-space utility which will need fixup to use this >> > KASLR offset to work with cases where we need to find a way to >> > translate symbol address from vmlinux to kernel run time address >> > in case of KASLR boot on arm64. >> >> Acked-by: James Morse Thanks James. >> If we want to send this to stable, it looks like it should have been part of the >> KASLR series, f80fb3a3d5084 ("arm64: add support for kernel ASLR") was merged >> for v4.6. >> CC: # 4.6.x > > Hmm, does this warrant a stable backport? This hasn't ever worked, right? Yes, it is a new feature being enabled/tested in user-space utilities now for arm64 (although it's being used for x86_64 since some time). I would like the user-space utilities to do away with the arch specific code (as much as possible) for KASLR features, but we are still kind of stabilizing the same on various archs, so the user-space cleanup is one of items on my to-do list. However, since kernel and user-space features are frequently backported to older versions (e.g. RHEL and OpenSuse), so it would help to send this patch to stable as well, so that stable kernels >= 4.6.x can work well with such backported user-space utilities and utilize KASLR features on arm64 well. As such, I see no side-effect of adding this information to the vmcoreinfo in the stable kernels as well. Thanks, Bhupesh