LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "John Stoffel" <john@stoffel.org>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: John Stoffel <john@stoffel.org>,
Andrew@stoffel.org, dm-devel@redhat.com, eric.dumazet@gmail.com,
mst@redhat.com, netdev@vger.kernel.org, jasowang@redhat.com,
Randy Dunlap <rdunlap@infradead.org>,
linux-kernel@vger.kernel.org,
Matthew Wilcox <willy@infradead.org>, Hocko <mhocko@kernel.org>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
Michal@stoffel.org, edumazet@google.com, linux-mm@kvack.org,
David Rientjes <rientjes@google.com>,
Morton <akpm@linux-foundation.org>,
virtualization@lists.linux-foundation.org,
David Miller <davem@davemloft.net>,
Vlastimil Babka <vbabka@suse.cz>
Subject: Re: [dm-devel] [PATCH v5] fault-injection: introduce kvmalloc fallback options
Date: Wed, 2 May 2018 09:38:34 -0400 [thread overview]
Message-ID: <23273.48986.516559.317965@quad.stoffel.home> (raw)
In-Reply-To: <alpine.LRH.2.02.1804301622480.4454@file01.intranet.prod.int.rdu2.redhat.com>
>>>>> "Mikulas" == Mikulas Patocka <mpatocka@redhat.com> writes:
Mikulas> On Mon, 30 Apr 2018, John Stoffel wrote:
>> >>>>> "Mikulas" == Mikulas Patocka <mpatocka@redhat.com> 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.
next prev parent reply other threads:[~2018-05-02 13:38 UTC|newest]
Thread overview: 110+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-18 14:34 [PATCH] net: don't use kvzalloc for DMA memory Mikulas Patocka
2018-04-18 16:05 ` Eric Dumazet
2018-04-18 16:44 ` Mikulas Patocka
2018-04-18 16:51 ` Eric Dumazet
2018-04-18 17:47 ` David Miller
2018-04-18 17:55 ` Mikulas Patocka
2018-04-18 18:00 ` Michael S. Tsirkin
2018-04-18 17:49 ` Mikulas Patocka
2018-04-18 17:46 ` David Miller
2018-04-18 17:53 ` Mikulas Patocka
2018-04-19 16:12 ` [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM Mikulas Patocka
2018-04-19 16:25 ` Eric Dumazet
2018-04-19 16:28 ` Mikulas Patocka
2018-04-19 16:43 ` Michael S. Tsirkin
2018-04-19 21:27 ` [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_SG Mikulas Patocka
2018-04-19 18:28 ` [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM Vlastimil Babka
2018-04-19 19:47 ` Andrew Morton
2018-04-19 21:19 ` Mikulas Patocka
2018-04-19 23:22 ` Andrew Morton
2018-04-20 12:16 ` Mikulas Patocka
2018-04-20 11:47 ` Matthew Wilcox
2018-04-20 12:20 ` Mikulas Patocka
2018-04-23 15:25 ` Michael S. Tsirkin
2018-04-20 13:08 ` Michal Hocko
2018-04-20 13:41 ` Matthew Wilcox
2018-04-20 13:49 ` Michal Hocko
2018-04-20 20:56 ` Mikulas Patocka
2018-04-20 20:54 ` Mikulas Patocka
2018-04-20 21:02 ` Matthew Wilcox
2018-04-20 21:21 ` Mikulas Patocka
2018-04-21 14:47 ` Matthew Wilcox
2018-04-22 13:03 ` Michal Hocko
2018-04-23 14:24 ` Mikulas Patocka
2018-04-23 15:10 ` Michal Hocko
2018-04-23 23:20 ` Mikulas Patocka
2018-04-23 14:06 ` Mikulas Patocka
2018-04-23 15:15 ` Michal Hocko
2018-04-24 0:06 ` [PATCH v3] kvmalloc: always use vmalloc if CONFIG_DEBUG_SG Mikulas Patocka
2018-04-24 2:47 ` David Rientjes
2018-04-24 11:04 ` Mikulas Patocka
2018-04-24 3:46 ` Matthew Wilcox
2018-04-24 12:29 ` Mikulas Patocka
2018-04-24 17:16 ` Matthew Wilcox
2018-04-24 18:41 ` Mikulas Patocka
2018-05-15 1:13 ` Joonsoo Kim
2018-04-24 12:51 ` Michal Hocko
2018-04-24 15:50 ` Mikulas Patocka
2018-04-24 16:29 ` Michal Hocko
2018-04-24 17:00 ` Mikulas Patocka
2018-04-24 17:03 ` Michal Hocko
2018-04-24 17:28 ` Mikulas Patocka
2018-04-24 17:38 ` Michal Hocko
2018-04-25 20:02 ` [PATCH] fault-injection: reorder config entries Mikulas Patocka
2018-04-26 3:21 ` Randy Dunlap
2018-04-25 20:02 ` [PATCH v4] fault-injection: introduce kvmalloc fallback options Mikulas Patocka
2018-04-25 20:20 ` Randy Dunlap
2018-04-25 20:57 ` [PATCH v5] " Mikulas Patocka
2018-04-25 21:11 ` Randy Dunlap
2018-04-25 21:18 ` David Rientjes
2018-04-25 21:22 ` Mikulas Patocka
2018-04-25 22:17 ` [dm-devel] " James Bottomley
2018-04-25 22:42 ` Mikulas Patocka
2018-04-25 22:49 ` David Rientjes
2018-04-25 22:56 ` Mikulas Patocka
2018-04-26 12:58 ` Michal Hocko
2018-04-26 14:28 ` Mikulas Patocka
2018-04-26 14:45 ` James Bottomley
2018-04-26 15:05 ` Mikulas Patocka
2018-04-26 15:24 ` James Bottomley
2018-04-26 15:44 ` Mikulas Patocka
2018-04-26 15:59 ` Michael S. Tsirkin
2018-04-26 16:07 ` Mikulas Patocka
2018-04-26 18:49 ` Michael S. Tsirkin
2018-04-26 18:54 ` Mikulas Patocka
2018-04-26 19:14 ` Michael S. Tsirkin
2018-04-26 19:36 ` Mikulas Patocka
2018-04-26 19:45 ` Michael S. Tsirkin
2018-04-26 20:05 ` Mikulas Patocka
2018-04-26 18:58 ` Mikulas Patocka
2018-04-26 19:05 ` Michael S. Tsirkin
2018-04-26 15:55 ` Mikulas Patocka
2018-04-25 23:00 ` Mikulas Patocka
2018-04-25 23:08 ` James Bottomley
2018-04-26 14:55 ` Mikulas Patocka
2018-04-26 15:22 ` Mikulas Patocka
2018-04-26 18:58 ` John Stoffel
2018-04-26 21:50 ` Mikulas Patocka
2018-04-26 22:21 ` Michael S. Tsirkin
2018-04-26 22:52 ` Mikulas Patocka
2018-04-27 8:25 ` Michal Hocko
2018-04-27 10:20 ` Mikulas Patocka
2018-04-27 23:20 ` Mikulas Patocka
2018-04-30 18:27 ` John Stoffel
2018-04-30 21:07 ` Mikulas Patocka
2018-05-02 13:38 ` John Stoffel [this message]
2018-05-03 17:40 ` Mikulas Patocka
2018-04-24 0:25 ` [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM Mikulas Patocka
2018-04-24 13:31 ` Michal Hocko
2018-04-24 15:30 ` Mikulas Patocka
2018-04-24 16:12 ` Michal Hocko
2018-04-24 16:29 ` Michal Hocko
2018-04-24 16:33 ` Mikulas Patocka
2018-05-02 0:36 ` Andrew Morton
2018-05-02 13:33 ` Mike Snitzer
2018-05-02 13:40 ` [dm-devel] " John Stoffel
2018-05-03 17:32 ` [PATCH] " Mikulas Patocka
2018-04-18 17:45 ` [PATCH] net: don't use kvzalloc for DMA memory David Miller
2018-04-18 17:55 ` Michael S. Tsirkin
2018-04-18 20:38 ` Eric Dumazet
2018-04-19 4:00 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=23273.48986.516559.317965@quad.stoffel.home \
--to=john@stoffel.org \
--cc=Andrew@stoffel.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=Michal@stoffel.org \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=dm-devel@redhat.com \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mpatocka@redhat.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
--cc=virtualization@lists.linux-foundation.org \
--cc=willy@infradead.org \
--subject='Re: [dm-devel] [PATCH v5] fault-injection: introduce kvmalloc fallback options' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).