Received: by 10.192.165.148 with SMTP id m20csp1248299imm; Wed, 25 Apr 2018 15:19:08 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrsWyTm3TiYCubhO7Q95pZxkVwCU6C64YjtPK7ExUHMINIt+LunqcW5LMrmP7SBJ00ORCaW X-Received: by 10.99.55.68 with SMTP id g4mr7076886pgn.283.1524694748458; Wed, 25 Apr 2018 15:19:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524694748; cv=none; d=google.com; s=arc-20160816; b=z8GN8kPN7PdZrBkGDBH/lafa/DabiYAq6/pWEdqjQk0Wxzm9wtS41hVIKKNfTYuy9m Oc56yiDzn80/yGXDbUCkgew1ZZmY3T8J0suoMSr66OvVyAzJ/fuOb5Es2xy9CAtoYTUB jVvtth1PSCEBzZ3hjvFk3vIQ2erUU/uqKHA2uHmZIWHJ9njoa9QXioI+85arRTa/Qq1c tHhTAm3mkXfbhl33WYeJfNKjnm1XgHJG9kmgpFpokFrL9zXS/QOrdBPT8J3GuT2rj6X3 VQA3pyB6yUF8bJt20sVzCoErEHTz6aR0NUCjykwllQC0RaaYQDJQmPCkvWTZkEZ7BoRg drzQ== 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:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature:arc-authentication-results; bh=wcmcUjsX3AyPtmQe1Yezv+2mpknMAjHxAAsyhc7nc4k=; b=0C/FwAo+MClN5pvOhJ8A6vJ4UQb4ShGAm76TGJjZXqodlCO+7BtlKkoqVh8EioDq6r tmUgwbwdxgEmvbBw68Ctuoy0M7C9lkQL1flnk/9LDaFBYukNS7+qklqnbKH40KBagb0r 3wU/Tzy6bPg7cAVP8ksME8pMGmhlk6iVtjdOKJFTJ2m6eVmF4Rwn6wVWXE69Hxx35hJr dpQcKqG7BVlex08Zvt6ac9D8yVSSzt6vrLNBy6rOklPnegbFxJtfMffp4FS3S0H7HU/n 9KYi1zHATSFzzIHRgg/eDyOcoIOnUjEtH2QIYTlVS6wtR4e/wrgFOZb+Z04bmYxEB/ty nlIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=lrUT0WKt; 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=hansenpartnership.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e19si15951443pff.73.2018.04.25.15.18.53; Wed, 25 Apr 2018 15:19:08 -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=fail header.i=@hansenpartnership.com header.s=20151216 header.b=lrUT0WKt; 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=hansenpartnership.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753604AbeDYWRt (ORCPT + 99 others); Wed, 25 Apr 2018 18:17:49 -0400 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:44656 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752958AbeDYWRr (ORCPT ); Wed, 25 Apr 2018 18:17:47 -0400 Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id 07E498EE0CF; Wed, 25 Apr 2018 15:17:46 -0700 (PDT) Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eBTDua9eGc29; Wed, 25 Apr 2018 15:17:45 -0700 (PDT) Received: from [153.66.254.194] (unknown [50.35.65.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id EB3508EE0C7; Wed, 25 Apr 2018 15:17:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=20151216; t=1524694665; bh=/Z2ywdrGW9+pG6t7Iqx11pBL8eBNxhW8u1UxKpU16tM=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=lrUT0WKtXgXUYYn2NHK/UVNzR8LaXNINKDq0WEMUPYBYU6KtVfTM1tCeSNe/wEyoQ 6n9jr6q9vBAquHi43Ac6lKPEn1FfIfrsywZoUYrgs52ZYVl4T6lWOhbyz8PAZIozC0 eOckAiwOedhUubhrMZqWahxbawVjYYcHYmjADQCA= Message-ID: <1524694663.4100.21.camel@HansenPartnership.com> Subject: Re: [dm-devel] [PATCH v5] fault-injection: introduce kvmalloc fallback options From: James Bottomley To: Mikulas Patocka , David Rientjes Cc: 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 , Michal Hocko , linux-mm@kvack.org, edumazet@google.com, Andrew Morton , virtualization@lists.linux-foundation.org, David Miller , Vlastimil Babka Date: Wed, 25 Apr 2018 15:17:43 -0700 In-Reply-To: References: <20180421144757.GC14610@bombadil.infradead.org> <20180423151545.GU17484@dhcp22.suse.cz> <20180424125121.GA17484@dhcp22.suse.cz> <20180424162906.GM17484@dhcp22.suse.cz> <20180424170349.GQ17484@dhcp22.suse.cz> <20180424173836.GR17484@dhcp22.suse.cz> <1114eda5-9b1f-4db8-2090-556b4a37c532@infradead.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-04-25 at 17:22 -0400, Mikulas Patocka wrote: > > On Wed, 25 Apr 2018, David Rientjes wrote: > > > On Wed, 25 Apr 2018, Mikulas Patocka wrote: > > > > > From: Mikulas Patocka > > > Subject: [PATCH] fault-injection: introduce kvmalloc fallback > > > options > > > > > > This patch introduces a fault-injection option > > > "kvmalloc_fallback". This option makes kvmalloc randomly fall > > > back to vmalloc. > > > > > > Unfortunately, some kernel code has bugs - it uses kvmalloc and > > > then uses DMA-API on the returned memory or frees it with kfree. > > > Such bugs were found in the virtio-net driver, dm-integrity or > > > RHEL7 powerpc-specific code. This options helps to test for these > > > bugs. > > > > > > The patch introduces a config option > > > FAIL_KVMALLOC_FALLBACK_PROBABILITY. > > > It can be enabled in distribution debug kernels, so that kvmalloc > > > abuse can be tested by the users. The default can be overridden > > > with "kvmalloc_fallback" parameter or in > > > /sys/kernel/debug/kvmalloc_fallback/. > > > > > > > Do we really need the new config option?  This could just be > > manually  tunable via fault injection IIUC. > > We do, because we want to enable it in RHEL and Fedora debugging > kernels, so that it will be tested by the users. > > The users won't use some extra magic kernel options or debugfs files. If it can be enabled via a tunable, then the distro can turn it on without the user having to do anything. If you want to present the user with a different boot option, you can (just have the tunable set on the command line), but being tunable driven means that you don't have to choose that option, you could automatically enable it under a range of circumstances. I think most sane distributions would want that flexibility. Kconfig proliferation, conversely, is a bit of a nightmare from both the user and the tester's point of view, so we're trying to avoid it unless absolutely necessary. James