Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp410773ybd; Wed, 26 Jun 2019 00:00:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZMroGWDN0ZDDnX4zlHej5a0FoHCfsADpOhdTNgxrwjk08TuHfgFKRbVKN2ACIvZ0m1nFL X-Received: by 2002:a17:902:6a88:: with SMTP id n8mr3610313plk.70.1561532409555; Wed, 26 Jun 2019 00:00:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561532409; cv=none; d=google.com; s=arc-20160816; b=ZppQclIFTOfxcskXfENvacKxBrpPWT1rGJD6jusZiZANEdqs3Hf377TR3w7tAMteTC 2biqJmpEnZbAHo1u4KPTpXMY/8oBW70NAiwND6EtQOe8ojEiuPALXnB/bxdlgH6oNXIR tWAirWUDmH+3Xd0ku6bveG55rp5dem4CbrTJnfwTryhPZfbpdm16DnUImOc6cSXgYmcR qagutNNDhDnEk9nTuYj79CWnvLnIg2Q5aU2AvGNrfI37PtZe62LHD4BcS5ilZqRtxFbc C9uVMi7o0zMl8flR5xbVDZYqhKpAZOHXD4HXfQIJQuVS0qUj9fEzYdAYgGCLuAFUXJXT uEIg== 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; bh=SFBeovEuKLrWU5602hTt3utRcD7rSZEU1pi8JjcMQtI=; b=JTz9zPHmR4CSQBT/9aQBW1SdeFoYP07cjC1UvbuAgBKc+a42t878eeoFWc933CYbgJ XIsEpimF1oX/uB3CG696sI5AQATYkPLRsE5o+s8U5DkAi4PX604icl1LaQToUlvZP31K CTXbty+5PNxOM3oW7vlOo9Y9OaEYXhSRb6zhkSu87RDDKsYn8sfSVwDjTsybxJr9WTVE HWXLH+RfoiPdMtyID4+cnhAU0tqdGgzrQE9XyggWB+dqDmHmvzOAXVthX0q5GXPNwS/1 8C6WhYvACciR0is3RUADxtDGtyo3HA0FPC4xy2gQhRdqeYjmN0NmvVkCT/7IPz59ElGd 5U8g== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 68si2519985ple.89.2019.06.25.23.59.53; Wed, 26 Jun 2019 00:00:09 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726931AbfFZG5y (ORCPT + 99 others); Wed, 26 Jun 2019 02:57:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:38418 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725876AbfFZG5x (ORCPT ); Wed, 26 Jun 2019 02:57:53 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 6A6E5AF96; Wed, 26 Jun 2019 06:57:52 +0000 (UTC) Date: Wed, 26 Jun 2019 08:57:51 +0200 From: Michal Hocko To: Alastair D'Silva 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 Subject: Re: [PATCH v2 1/3] mm: Trigger bug on if a section is not found in __section_nr Message-ID: <20190626065751.GK17798@dhcp22.suse.cz> References: <20190626061124.16013-1-alastair@au1.ibm.com> <20190626061124.16013-2-alastair@au1.ibm.com> <20190626062113.GF17798@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Wed 26-06-19 16:27:30, Alastair D'Silva wrote: > 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. OK, I see, but is an additional code worth it for the non-development case? I mean why should we be testing for something that shouldn't happen normally? Is it too easy to get things wrong or what is the underlying reason to change it now? -- Michal Hocko SUSE Labs