Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1267448ybl; Thu, 12 Dec 2019 12:19:42 -0800 (PST) X-Google-Smtp-Source: APXvYqzDDQ8NxsXjJtxjHyqVkweIwIyxC6Y7afY+fs3qDMN+Bjvsk+C/s40VGDBQvBArLhMcjTKE X-Received: by 2002:a05:6830:1248:: with SMTP id s8mr10158749otp.202.1576181981855; Thu, 12 Dec 2019 12:19:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576181981; cv=none; d=google.com; s=arc-20160816; b=aQ2pKZwOdZPya1BPsf/8JIIzbxGcfgOKqXE/l1uJgKRy8lokOr3pJN2ox7PrhrSTFX F1l4rl1kidBbvXT2U8WhByQYailVHhAEx/oFns55PuJWTsSzyS8QlnQ5xo/yVKAPuCoN +/d0ip05BjV8IK9sGvNzkj7YMtYxOfM2OqpHkVqAHm1qrzngWPxdpylJJkvn5lnYjzh3 XYvs16MvTlJSbDwgi2nh3K1td4arF0M85KVCvugyYf+qrWD2mP5gMEF/5MISna+Du7La NolxpDLoxtaPDPBMI95n08xNOiqv6sqtByDiyUqK6nM90QAA2YaJIjVXRF22YPdz+9Ng R8ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=itHJwNSnRzhYkPr455TQi6sn3XUABqQNepfDBG4er7U=; b=QvGzoi4fyWY7D4Y7wn3lr32P6ArBVabHABZyRePicLAfeznHslwY/q0P/dbVWVv00D jyQah7960kePO11+90G5Rd0paO8JuWjZlULGHToEifvWSP4bCcrJen1LoJo3SlMj/leT Dki12f/Ec6MAjOI0WdIReDyFrsuU64VQlrGYvLGS2JZidcljyLZFB1BzCncbfIYn/lbC VFG8efPGTyVXjVoBnOWDmhcLUJIupyfowSg1i8q50vXbbE9zqzut3wKhrV5V6GSG0Mge clG8rtSQq10GbPgTaxlaOobHQrzRBBvJOMdea543H/olwv6TALTspT3yndWie+h3/KK3 ND4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=qaww4cNu; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r22si3544705otn.192.2019.12.12.12.19.25; Thu, 12 Dec 2019 12:19:41 -0800 (PST) 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; dkim=pass header.i=@alien8.de header.s=dkim header.b=qaww4cNu; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730780AbfLLURy (ORCPT + 99 others); Thu, 12 Dec 2019 15:17:54 -0500 Received: from mail.skyhub.de ([5.9.137.197]:33892 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726814AbfLLURx (ORCPT ); Thu, 12 Dec 2019 15:17:53 -0500 Received: from zn.tnic (p200300EC2F0A5A00BC9FD9E905C0F14B.dip0.t-ipconnect.de [IPv6:2003:ec:2f0a:5a00:bc9f:d9e9:5c0:f14b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 97E3B1EC0B73; Thu, 12 Dec 2019 21:17:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1576181872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=itHJwNSnRzhYkPr455TQi6sn3XUABqQNepfDBG4er7U=; b=qaww4cNuNKxdDgpKW4MIuYJKiUAWQU6u70wZjCOHIrR9C26Qj4imHqNbzZiupLu2bZZCZL BfA5Rx9yG4HIXbCiYIxKKuTL+0UvNlj0Yhj4F/iWXzblLyJXew0+3CQ56TORbPxPgHqK6E LVvfWp6APmcYkHu8MfcAuNSLYyCSxbQ= Date: Thu, 12 Dec 2019 21:17:46 +0100 From: Borislav Petkov To: Masayoshi Mizuma Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Baoquan He , Masayoshi Mizuma , linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 0/4] Adjust the padding size for KASLR Message-ID: <20191212201746.GJ4991@zn.tnic> References: <20191115144917.28469-1-msys.mizuma@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191115144917.28469-1-msys.mizuma@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 15, 2019 at 09:49:13AM -0500, Masayoshi Mizuma wrote: > From: Masayoshi Mizuma > > The system sometimes crashes while memory hot-adding on KASLR > enabled system. The crash happens because the regions pointed by > kaslr_regions[].base are overwritten by the hot-added memory. > > It happens because of the padding size for kaslr_regions[].base isn't > enough for the system whose physical memory layout has huge space for > memory hotplug. kaslr_regions[].base points "actual installed > memory size + padding" or higher address. So, if the "actual + padding" > is lower address than the maximum memory address, which means the memory > address reachable by memory hot-add, kaslr_regions[].base is destroyed by > the overwritten. I can only try to guess what this is trying to tell me so please rewrite this using simple, declarative sentences. Use a structure like this: Problem is A. It happens because of B. Fix it by doing C. (Potentially do D). For more detailed info, see Documentation/process/submitting-patches.rst, Section "2) Describe your changes". Also, to the tone, from Documentation/process/submitting-patches.rst: "Describe your changes in imperative mood, e.g. "make xyzzy do frotz" instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy to do frotz", as if you are giving orders to the codebase to change its behaviour." Also, when you write your commit messages, always talk about "why" you're doing a change and not "what" you're doing - the "what" is visible from the diff. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette