Received: by 10.192.165.148 with SMTP id m20csp55032imm; Thu, 26 Apr 2018 15:53:34 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqJuiYjeyQkXFmkgTQGgwe40dnpbtQKc1gFDI81mwjIWYUEocnCnibRWzWlggoKvbOn7NeY X-Received: by 2002:a17:902:8305:: with SMTP id bd5-v6mr10375882plb.13.1524783213975; Thu, 26 Apr 2018 15:53:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524783213; cv=none; d=google.com; s=arc-20160816; b=uRycA+twYMv97Xl1XjCo5xp/QTnVG5hUBkPtFIkhJnUrrNW/Lf30hNb39W7fR8sD5O WKESOLNWoSAdnsPe+0dVTwajexhovPxThQPaVl4e5LeUpy3Un0yg3itLfd3PMv5k+tsg zn9pSsU0p6h+AOstzjGjQq36pND3Imlb6vjLtznCC0jHZJxmGiIvJLFJ1tV2V1PmjX/c hWlGnCXkKAZz5616lNwCzOFZAo6xMvWq5RrocG6tFMjWQl628XQUaxKsIj63gh7Tgn/T pwEKjqTLn4nF/sfbcQjpMWFDr/V67nWQW2een2PcoIyWVrHvDVmTzzdJkUxjF1ujqI4B O9YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=8l3jOkzaK8iSXJaYqhhxIvpJyQM5xFrhcDv1Fce5EZg=; b=ecI16W233NqTOtG8W2zVs3ctkoI1lpYhphBUJ/k08/rLJucDa9NM1gcztNcFIgCPRP cJYKXk07gAl8bYxmrxwLKLAaS5LyyAyd0FmMgrh6mNi+kZPIqR+dWA5Hw78QmRHI47ei dTBUmBZ7eUtWfU38WLBXucrF7Jhcqz8BD4AyA6bXu/0nRIYqdaxiTAjWE7kO4ouPjUII xK9Km7eRMjcQU9TPtbYwSxCqmHmZG9qPP3PgXwRWMV1+e8Pk8py1/zq7j7VSQCGdIbPl tKiOQj3s9oUQtGSvlRbJqHomyiN9Fek+AVr/9huzYUQpMw3gqBDl+cVONOsTfu0BmHz4 S8MQ== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3-v6si20109798pld.309.2018.04.26.15.53.18; Thu, 26 Apr 2018 15:53:33 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756641AbeDZWwI (ORCPT + 99 others); Thu, 26 Apr 2018 18:52:08 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:35224 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754728AbeDZWwH (ORCPT ); Thu, 26 Apr 2018 18:52:07 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9FC5F81A88D2; Thu, 26 Apr 2018 22:52:06 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 66AC1215CDC8; Thu, 26 Apr 2018 22:52:06 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id w3QMq6Yu003231; Thu, 26 Apr 2018 18:52:06 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id w3QMq5rs003227; Thu, 26 Apr 2018 18:52:05 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Thu, 26 Apr 2018 18:52:05 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: "Michael S. Tsirkin" cc: John Stoffel , James Bottomley , Michal@stoffel.org, eric.dumazet@gmail.com, netdev@vger.kernel.org, jasowang@redhat.com, Randy Dunlap , linux-kernel@vger.kernel.org, Matthew Wilcox , Hocko , linux-mm@kvack.org, dm-devel@redhat.com, Vlastimil Babka , Andrew@stoffel.org, David Rientjes , Morton , virtualization@lists.linux-foundation.org, David Miller , edumazet@google.com Subject: Re: [dm-devel] [PATCH v5] fault-injection: introduce kvmalloc fallback options In-Reply-To: <20180427005213-mutt-send-email-mst@kernel.org> Message-ID: References: <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> <20180427005213-mutt-send-email-mst@kernel.org> User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 26 Apr 2018 22:52:06 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 26 Apr 2018 22:52:06 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mpatocka@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 27 Apr 2018, Michael S. Tsirkin wrote: > On Thu, Apr 26, 2018 at 05:50:20PM -0400, Mikulas Patocka wrote: > > How is the user or developer supposed to learn about this option, if > > he gets no crash at all? > > Look in /sys/kernel/debug/fail* ? That actually lets you > filter by module, process etc. > > I think this patch conflates two things: > > 1. Make kvmalloc use the vmalloc path. > This seems a bit narrow. > What is special about kvmalloc? IMHO nothing - it's yet another user > of __GFP_NORETRY or __GFP_RETRY_MAYFAIL. As any such __GFP_RETRY_MAYFAIL makes the allocator retry the costly_order allocations > user, it either recovers correctly or not. > So IMHO it's just a case of > making __GFP_NORETRY, __GFP_RETRY_MAYFAIL, or both > fail once in a while. > Seems like a better extension to me than focusing on vmalloc. > I think you will find more bugs this way. If the array is <= PAGE_SIZE, vmalloc will not use __GFP_NORETRY. So it still hides some bugs - such as, if a structure grows above 4k, it would start randomly crashing due to memory fragmentation. > 2. Ability to control this from a separate config > option. > > It's still not that clear to me why is this such a > hard requirement. If a distro wants to force specific > boot time options, why isn't CONFIG_CMDLINE sufficient? There are 489 kernel options declared with the __setup keyword. Hardly any kernel developer notices that a new one was added and selects it when testing his code. > But assuming it's important to control this kind of > fault injection to be controlled from > a dedicated menuconfig option, why not the rest of > faults? The injected faults cause damage to the user, so there's no point to enable them by default. vmalloc fallback should not cause any damage (assuming that the code is correctly written). > IMHO if you split 1/2 up, and generalize, the path upstream > will be much smoother. This seems like a lost case. So, let's not care about code correctness and let's solve crashes only after they are reported. If the upstream wants to work this way, there's nothing that can be done about it. I'm wondering if I can still push it to RHEL or not. > Hope this helps. > > -- > MST Mikulas