Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp7149470yba; Thu, 2 May 2019 05:14:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqyOs5mIFZF7yl63O7Ju9tJZscH90xJq8U9Xx+cInXhLZy83BkEBki7CY0bqnfpd2MR9NbCp X-Received: by 2002:a17:902:9889:: with SMTP id s9mr3445085plp.235.1556799288586; Thu, 02 May 2019 05:14:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556799288; cv=none; d=google.com; s=arc-20160816; b=qhZMbC8fKGcn4tReBFIU5YUUfurbgkpy8klK46iMvsL7bfLM0Z3PF+JJbXk92ZK1dz c+F0EFBI92llVbCubYBSSeKjvAxcQFc0JjwfLC9Mp1j/4qor9TUuusd8ZxrniS84ZXay MxI2yXry6UOKDesxKHCeyIdFVveK5wGVb+wMsO34HlZJIHX1MhYnpxSO1GExl88JRE+f 0RYGQWmO4i+Fmc9ZCuRD9wyb6NkT0Ah9ZTbrq6E7Ac0TrBuenT8S0tugutGWUZPMxDSs hd2/isH0b+ygvwszKAfJO4fE3bXgtgDoQncRQUZ03OWzEqU86+ZpICSfO5KfTL/sznU0 cZYA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=K+3HbF0k8U9kzLuov5Fm/KEAbxDnzuIT8BsXj82K3n8=; b=MibfBR4So+3lBcawY3561AtAiclIRgWHga4zsTbiqd0Tq57APGylsTfzfp3ZVlIsyD GdJppRHIjBjrc50qiR5asxuJk1mP84MOAOBEJ9pe9UElE8snoKSHHilRzPXKknuMZ9XW geRvRElmeRuVszMabw6z5Qvcx5i9gzSYOKlVA/c3Z6QM6qgkfXF37as31Z2EKD01NUk6 A7x6mY3qU78IxVWMHT235pIjdibo45JAzw/Sp0+WlTutjW9yRtgwVRXdWDDQdjQWbKNt X9wdP9lU9owSzG69gKComJACs/imxYWKyj0pSdYjz2ea21OmLDhLcC7lIRr6/EkM72LM fhrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=bIqFgS6W; 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 h14si27168pgf.539.2019.05.02.05.14.32; Thu, 02 May 2019 05:14:48 -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=@c-s.fr header.s=mail header.b=bIqFgS6W; 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 S1726512AbfEBMLU (ORCPT + 99 others); Thu, 2 May 2019 08:11:20 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:5378 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726501AbfEBMLT (ORCPT ); Thu, 2 May 2019 08:11:19 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 44vvHm3PrRz9txbD; Thu, 2 May 2019 14:11:16 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=bIqFgS6W; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id 85-dP5nXS5-Y; Thu, 2 May 2019 14:11:16 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 44vvHm1bbTz9txbC; Thu, 2 May 2019 14:11:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1556799076; bh=K+3HbF0k8U9kzLuov5Fm/KEAbxDnzuIT8BsXj82K3n8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=bIqFgS6WgXUsxNL6vv3SX/LN3c0X1vwPk2YfK20MalsA70YYDx4SE9JvUdgivEa1p GpuxI+tAFWbvNmf1Hhvmx3XcaHATRVF38iJw8Gd6oR2UwBZnSI5CDdThr6XVbMUDzi 6bp48ajjxDcJ0SuNhQs1yjLcp7BUlpti0tEWEv+k= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 8E77A8B8F7; Thu, 2 May 2019 14:11:17 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id WNNQZJ3gXNeX; Thu, 2 May 2019 14:11:17 +0200 (CEST) Received: from PO15451 (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 2E90D8B899; Thu, 2 May 2019 14:11:17 +0200 (CEST) Subject: Re: [PATCH v2 01/17] powerpc/mm: Don't BUG() in hugepd_page() To: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , aneesh.kumar@linux.ibm.com Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org References: <87o94lxdxe.fsf@concordia.ellerman.id.au> From: Christophe Leroy Message-ID: Date: Thu, 2 May 2019 14:11:16 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <87o94lxdxe.fsf@concordia.ellerman.id.au> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 02/05/2019 à 14:02, Michael Ellerman a écrit : > Christophe Leroy writes: >> Use VM_BUG_ON() instead of BUG_ON(), as those BUG_ON() >> are not there to catch runtime errors but to catch errors >> during development cycle only. > > I've dropped this one and the next, because I don't like VM_BUG_ON(). > > Why not? Because it's contradictory. It's a condition that's so > important that we should BUG, but only if the kernel has been built > specially for debugging. > > I don't really buy the development cycle distinction, it's not like we > have a rigorous test suite that we run and then we declare everything's > gold and ship a product. We often don't find bugs until they're hit in > the wild. > > For example the recent corruption Joel discovered with STRICT_KERNEL_RWX > could have been caught by a BUG_ON() to check we weren't patching kernel > text in radix__change_memory_range(), but he wouldn't have been using > CONFIG_DEBUG_VM. (See 8adddf349fda) > > I know Aneesh disagrees with me on this, so maybe you two can convince > me otherwise. > I have no strong oppinion about this. In v1, I replaced them with a WARN_ON(), and Aneesh suggested to go with VM_BUG_ON() instead. My main purpose was to reduce the amount of BUG/BUG_ON and I thought those were good candidates, but if you prefer keeping the BUG(), that's ok for me. Or maybe you prefered v1 alternatives (series at https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=98170) ? Christophe