Received: by 10.192.165.148 with SMTP id m20csp648031imm; Wed, 2 May 2018 06:39:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqcqHftRy5pJJ97nzAB9hIT09qhzkM2YGx42QgbNqIv7RtspvxI/0oncrmLglMtL23fJdbt X-Received: by 2002:a63:7101:: with SMTP id m1-v6mr16366749pgc.45.1525268357123; Wed, 02 May 2018 06:39:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525268357; cv=none; d=google.com; s=arc-20160816; b=hOCewlj21zyWc8ckX/Uje3D8pCEd8ztiSQhnoja0avA7xvfjpDwMHPGblC6nFQxRO4 4UXqxXFD9I1IDNEjwzjoP6xgSKmAf4xX+nUcG9muCabuW2Ey+n6nNr5RlDtaYnEdK+8N u8QGaA+LT7oPPi/jTsfwKWFLveHpkpPAAsapYOD+OfKVo2gkJ8CEproZqpwtSdnd9zdv 5zoZLD8tvdGe01CzcT86+nmeTT5bIdKY7slcMm0Scje0Mr/Wy+XbfGq2SCFXwFY5Gbac xlDjHtplgm+s1/u9OGt/l+xi+xI439M5PRU+N5L1N/VJbQTdshCavflT1L+wMKi2uP7m P6Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:subject:cc:to:from :date:message-id:content-transfer-encoding:mime-version :arc-authentication-results; bh=0ybigJE52B99Z5oqfW8m0HSoxwLwHW/tWNIV1iThELA=; b=h2EkOLdh0fLvupIYPnlAInnSbuJowO+Azl16yh7i+9PTR66KfI5Td0AtK6stqw8pn9 QEC3X5kzUgM2EhyEWFsUJ8/JepRScqilfO/yBlidRLmDe7Hgh+8K367DwyRy0bq9fxOD 0gMqPpIwpKUzxHdscYGAJJSmOjP+6YX2+L2zX3/aiU2DoYYfa8enijidfMQYM86JearU rTXeVp3PWT6Uzec2ZOw2LNPjeBoCiuurFa8cArVKDqdOY8CPBePvfvaSioJxpwNE9bMC N5IfjemKAKUtL8mE+QheS8NcwSk0GlYcYm6VStigXNCS28lZ0FJx8Y2aRmptgPOZpqp6 m23A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f7si10185666pfa.78.2018.05.02.06.39.02; Wed, 02 May 2018 06:39:17 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751453AbeEBNiv (ORCPT + 99 others); Wed, 2 May 2018 09:38:51 -0400 Received: from mail.stoffel.org ([104.236.43.127]:40562 "EHLO mail.stoffel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751011AbeEBNit (ORCPT ); Wed, 2 May 2018 09:38:49 -0400 Received: from quad.stoffel.org (66-189-75-104.dhcp.oxfr.ma.charter.com [66.189.75.104]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.stoffel.org (Postfix) with ESMTPSA id A2DD25FB58; Wed, 2 May 2018 09:38:47 -0400 (EDT) Received: by quad.stoffel.org (Postfix, from userid 1000) id 8FEFEA2D34; Wed, 2 May 2018 09:38:34 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <23273.48986.516559.317965@quad.stoffel.home> Date: Wed, 2 May 2018 09:38:34 -0400 From: "John Stoffel" To: Mikulas Patocka Cc: John Stoffel , Andrew@stoffel.org, dm-devel@redhat.com, eric.dumazet@gmail.com, mst@redhat.com, netdev@vger.kernel.org, jasowang@redhat.com, Randy Dunlap , linux-kernel@vger.kernel.org, Matthew Wilcox , Hocko , James Bottomley , Michal@stoffel.org, edumazet@google.com, linux-mm@kvack.org, David Rientjes , Morton , virtualization@lists.linux-foundation.org, David Miller , Vlastimil Babka Subject: Re: [dm-devel] [PATCH v5] fault-injection: introduce kvmalloc fallback options In-Reply-To: References: <20180421144757.GC14610@bombadil.infradead.org> <20180424170349.GQ17484@dhcp22.suse.cz> <20180424173836.GR17484@dhcp22.suse.cz> <1114eda5-9b1f-4db8-2090-556b4a37c532@infradead.org> <1524694663.4100.21.camel@HansenPartnership.com> <1524697697.4100.23.camel@HansenPartnership.com> <23266.8532.619051.784274@quad.stoffel.home> <23271.24580.695738.853532@quad.stoffel.home> X-Mailer: VM 8.2.0b under 24.5.1 (x86_64-pc-linux-gnu) X-Clacks-Overhead: GNU Terry Pratchett Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>>> "Mikulas" == Mikulas Patocka writes: Mikulas> On Mon, 30 Apr 2018, John Stoffel wrote: >> >>>>> "Mikulas" == Mikulas Patocka writes: >> Mikulas> On Thu, 26 Apr 2018, John Stoffel wrote: >> Mikulas> I see your point - and I think the misunderstanding is this. >> >> Thanks. >> Mikulas> This patch is not really helping people to debug existing crashes. It is Mikulas> not like "you get a crash" - "you google for some keywords" - "you get a Mikulas> page that suggests to turn this option on" - "you turn it on and solve the Mikulas> crash". >> Mikulas> What this patch really does is that - it makes the kernel deliberately Mikulas> crash in a situation when the code violates the specification, but it Mikulas> would not crash otherwise or it would crash very rarely. It helps to Mikulas> detect specification violations. >> Mikulas> If the kernel developer (or tester) doesn't use this option, his buggy Mikulas> code won't crash - and if it won't crash, he won't fix the bug or report Mikulas> it. How is the user or developer supposed to learn about this option, if Mikulas> he gets no crash at all? >> >> So why do we make this a KConfig option at all? Mikulas> Because other people see the KConfig option (so, they may enable it) and Mikulas> they don't see the kernel parameter (so, they won't enable it). Mikulas> Close your eyes and say how many kernel parameters do you remember :-) >> Just turn it on and let it rip. Mikulas> I can't test if all the networking drivers use kvmalloc properly, because Mikulas> I don't have the hardware. You can't test it neither. No one has all the Mikulas> hardware that is supported by Linux. Mikulas> Driver issues can only be tested by a mass of users. And if the users Mikulas> don't know about the debugging option, they won't enable it. >> >> I agree with James here. Looking at the SLAB vs SLUB Kconfig entries >> >> tells me *nothing* about why I should pick one or the other, as an >> >> example. Mikulas> BTW. You can enable slub debugging either with CONFIG_SLUB_DEBUG_ON or Mikulas> with the kernel parameter "slub_debug" - and most users who compile their Mikulas> own kernel use CONFIG_SLUB_DEBUG_ON - just because it is visible. You miss my point, which is that there's no explanation of what the difference is between SLAB and SLUB and which I should choose. The same goes here. If the KConfig option doesn't give useful info, it's useless. >> Now I also think that Linus has the right idea to not just sprinkle >> BUG_ONs into the code, just dump and oops and keep going if you can. >> If it's a filesystem or a device, turn it read only so that people >> notice right away. Mikulas> This vmalloc fallback is similar to Mikulas> CONFIG_DEBUG_KOBJECT_RELEASE. CONFIG_DEBUG_KOBJECT_RELEASE Mikulas> changes the behavior of kobject_put in order to cause Mikulas> deliberate crashes (that wouldn't happen otherwise) in Mikulas> drivers that misuse kobject_put. In the same sense, we want Mikulas> to cause deliberate crashes (that wouldn't happen otherwise) Mikulas> in drivers that misuse kvmalloc. Mikulas> The crashes will only happen in debugging kernels, not in Mikulas> production kernels. Says you. What about people or distros that enable it unconditionally? They're going to get all kinds of reports and then turn it off again. Crashing the system isn't the answer here.