Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp385721ybd; Tue, 25 Jun 2019 23:29:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxPfnnugyJUD6iT6mH5cK83BWS5PsQ/bKkz/MGP/Jtxg00v1jb7vTLzWyfyGRGJIj53X5YL X-Received: by 2002:a17:90a:8a84:: with SMTP id x4mr2603946pjn.105.1561530585656; Tue, 25 Jun 2019 23:29:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561530585; cv=none; d=google.com; s=arc-20160816; b=imz4kKVHQYW2BvUsmd1SmVWfA6ACQx7LlbdpOyT5gPGs8eqZFtYjoIbgb1qzavsHUh Thhp5p1o5ytzCi/R2Q5yJjBGkVla0Ewv5/4dmPri+Db2ybI2atP6fD9Unb8b/q37x5fM S13dpC6Cff+OLeAiW94YCfEYk3a98psjJZNwyDnGaFLGzOhgGPTEhZN2YI3UNl2jmpRh lYGqnsQwToZD5nv0Rl/j/iLMwv6DwsjEdBdT+nHSaoBQF4u+uR9nEQRiCc34AlfVvn+P P5XfUMU4dfS21xvpn9hSTEthS3hzgFs7pqhIyIVn3qD8Msn7Z3BFRtJw4evh9+SDIdUj ISYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=bKtMuDo5CBGijAA2QTa7J4u84nOp4WnkLSmd5PHCa6c=; b=ix4RKKQm6ejIykq+UaeRXa/T0oyGJHpF3tA32TfIIhJo28IvyKrkRxejtk1rQ+FyCW MtLMUBtoqLucgA+9FZtdwM92FgGy21AE93A32szztqsfZiUCFrggOxoTS2T+f9NMIi5w BipcFQL8hydwIy1Bs2nubIn5yAX8taTfT3X/KFMq/MDKReK6tv/uVRirsYxytLHYb46k zkQ3II434JhGngHfcYOfrmNM0wafTYYpL/DOJvqdUsUn1gi+qHEoTVpZ8o/AoBEznMoL yZ8aAPKaxmFn3E0bKFWjHPlbfzzjjPMCpEwRfpHuCNpztQ8K6bvyU6A61VB65CcH+fEU rsLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@d-silva.org header.s=201810a header.b=Q21Tz7lR; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1si14425375pgq.175.2019.06.25.23.29.29; Tue, 25 Jun 2019 23:29:45 -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; dkim=pass header.i=@d-silva.org header.s=201810a header.b=Q21Tz7lR; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726805AbfFZG1w (ORCPT + 99 others); Wed, 26 Jun 2019 02:27:52 -0400 Received: from ushosting.nmnhosting.com ([66.55.73.32]:60516 "EHLO ushosting.nmnhosting.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725954AbfFZG1w (ORCPT ); Wed, 26 Jun 2019 02:27:52 -0400 Received: from mail2.nmnhosting.com (unknown [202.169.106.97]) by ushosting.nmnhosting.com (Postfix) with ESMTPS id 564052DC0076; Wed, 26 Jun 2019 02:27:51 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=d-silva.org; s=201810a; t=1561530471; bh=OS25pYQAzwyq/F3INQW54JWjpNG6XHKsOQWiwDyVPqw=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Q21Tz7lR78e1eemh5m852Ojib2t93ty4XFBF7dCSVVis3DHkZzvrUOFHElfcxKdLv q/t/wHkAcJTNEW0HCTFTfr2/1bFZkpoEXTNoVWPzqKVYTCxmYHZMZrtrNAlVlAbKF/ 70JKnrt1+j9MfeFV605Z5onDRpjOz5nNq+BFQr5rekm48xyZnlOnaIkbEXEpwCBl+k Epz3Vjzb8AjDIU/bLCG8ruewcAhawikBevodxWFoCUuERO64y09eYCcjOndShCmIgT SjqcBms2oRSr9wG6P2VS7YBLXdMpADrF4xeismseo+DV1As/fdHSyXJ07QRxVB7bF1 h09ETdy6rxazcdLd090RnGVi1a9GVlTeG8Ui2qRxCv4/HkoGO6COIFM8ZM7BIrCUmc nfzMMShBzd4ZyBHhQJLFTSkb+zPFzWoDkF8OeE5rQW5u0ISLKXuMtBSWVoCSLSIHMl fmfRiW2EtlIbZOY4ccuXdCY1XQPUYCqfvJoFvko5OXXrCRzwTIX1JUWy4vrDb5p6V/ aN+ixIv4VdyliDdu4t/TRSRV2T8SkMh3WuZv57BpOsjKJ36e5cCJZZHJJ95uJWZGxl LENT0oVU7VEkN+q3p7xwugpmcPhWPxmOCpFOwgNvjmpHVbsZTz+qnatEKr0PQ6fb7D G86MLOLS5xE4BFdAZ040YlAQ= Received: from adsilva.ozlabs.ibm.com (static-82-10.transact.net.au [122.99.82.10] (may be forged)) (authenticated bits=0) by mail2.nmnhosting.com (8.15.2/8.15.2) with ESMTPSA id x5Q6RUtW031358 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Wed, 26 Jun 2019 16:27:45 +1000 (AEST) (envelope-from alastair@d-silva.org) Message-ID: Subject: Re: [PATCH v2 1/3] mm: Trigger bug on if a section is not found in __section_nr From: "Alastair D'Silva" To: Michal Hocko Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Andrew Morton , Pavel Tatashin , Oscar Salvador , Mike Rapoport , Baoquan He , Wei Yang , Logan Gunthorpe , linux-kernel@vger.kernel.org, linux-mm@kvack.org Date: Wed, 26 Jun 2019 16:27:30 +1000 In-Reply-To: <20190626062113.GF17798@dhcp22.suse.cz> References: <20190626061124.16013-1-alastair@au1.ibm.com> <20190626061124.16013-2-alastair@au1.ibm.com> <20190626062113.GF17798@dhcp22.suse.cz> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.2 (3.32.2-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mail2.nmnhosting.com [10.0.1.20]); Wed, 26 Jun 2019 16:27:47 +1000 (AEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-06-26 at 08:21 +0200, Michal Hocko wrote: > On Wed 26-06-19 16:11:21, Alastair D'Silva wrote: > > From: Alastair D'Silva > > > > If a memory section comes in where the physical address is greater > > than > > that which is managed by the kernel, this function would not > > trigger the > > bug and instead return a bogus section number. > > > > This patch tracks whether the section was actually found, and > > triggers the > > bug if not. > > Why do we want/need that? In other words the changelog should contina > WHY and WHAT. This one contains only the later one. > Thanks, I'll update the comment. During driver development, I tried adding peristent memory at a memory address that exceeded the maximum permissable address for the platform. This caused __section_nr to silently return bogus section numbers, rather than complaining. -- Alastair D'Silva mob: 0423 762 819 skype: alastair_dsilva Twitter: @EvilDeece blog: http://alastair.d-silva.org