Received: by 10.192.165.148 with SMTP id m20csp1192222imm; Wed, 25 Apr 2018 14:12:49 -0700 (PDT) X-Google-Smtp-Source: AIpwx492/CDUYebWsQP2jlZzaessCBd/GHF4NnPgBtuxXXrEUY7NA+HXyOpaamQAQynShvWj0gzb X-Received: by 10.99.149.10 with SMTP id p10mr24715297pgd.217.1524690769010; Wed, 25 Apr 2018 14:12:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524690768; cv=none; d=google.com; s=arc-20160816; b=OM6EUshLhORI7U0iCQGHEPeQ/SnBYzMXY9KebCrSj8L3pi9jjTp/XPqqkbM30Sqniy VaFQLWaVNIgLuaOXNMH9Jh4VzPu+gAzxkOkic9pfcZXgI08W5/8X+CIZvGdPNbojXL1M DPGgcWrxRFaSDPXDMz7lqzwh6vZjmwTgmH5Y0AF7KtU/CZl2ufVDYTqD5GazFqoKxT3T jYTV6rRPbfyctZyCVGOP1MsDiC0HsOw//gLlhA+eTzlNzdC2kPwM6We+YVzFjt6JZOOq 8GvW/qzQF9uGHbKm6VcYYAiRh2Eb89JwPNnwio/55YR3Jj94SnbhD+8p31az0CU126aw Q8BQ== 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 :arc-authentication-results; bh=4vjDhPOLgCaKwiW2lm5CIGcFYk1WFY/laXsAhvK05n4=; b=kQ3vuVw/Pcj+dXJndadBfm80Ej5sxAnj2JW/JGaZghHNOu13isEaaULqKucOj9rvY5 aTzjqvvvO1Zbm8JYH2VNTT+TOu7X8q5Otyvyzsf6dQRJyQOFwjHJsfYOJwSGtiNtZBSC wdPc3YY15vZ/XJwHSl9b69+miR2foZD0jyNb+h4vK/vavoA6aF1BygYmcELDTldbuXYN mes+HQ6jNiY1ljU4MBzgOKsv5o4491MDf+zNEl03qNl/l7U4YmMCHFckpQlizV5T1TZp u5N+ROKU9xBe5+lE461+w/OWmU6FGqMvVLMv6u/HswMMYLCCF4aw24bHrjvb+af2QK6Z SSyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=iJry3bFC; 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 g7-v6si17748212plt.358.2018.04.25.14.12.35; Wed, 25 Apr 2018 14:12: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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=iJry3bFC; 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 S1752869AbeDYVLQ (ORCPT + 99 others); Wed, 25 Apr 2018 17:11:16 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:44510 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751887AbeDYVLM (ORCPT ); Wed, 25 Apr 2018 17:11:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4vjDhPOLgCaKwiW2lm5CIGcFYk1WFY/laXsAhvK05n4=; b=iJry3bFCJBXVrlFH99IAXauSM MYajqvCp/0NFUMNf20UNccjWeElhC/eG1JGx4ykdt2F1BZGBUu4k/nJaQ6ZLkyhY86AFjgCRr5Ppl OaHvHT1B/IyvRIH6YxhNkEUh/Qi6iPIO9epuuJThsno7+mppwNnz5xVbzSVJivPJ3hQo2njl9JQQ4 AE/ACXbM/p5JCW/iJCAZh3Poigim8HdKWaP/tX7lLQjnZdrgp8ojYQrHEYS67g/hvlezRVygOvxR2 nS5FUasHyybvxb8lDRjELy8i01wWFXL/am9ad4ekoTy+3j/tP4G+ltN3GxfSyOZjRhPFgUmHYb6Ss 9w+uvcorw==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fBRgx-0004yE-6c; Wed, 25 Apr 2018 21:11:07 +0000 Subject: Re: [PATCH v5] fault-injection: introduce kvmalloc fallback options To: Mikulas Patocka Cc: Michal Hocko , Matthew Wilcox , David Miller , Andrew Morton , linux-mm@kvack.org, eric.dumazet@gmail.com, edumazet@google.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, mst@redhat.com, jasowang@redhat.com, virtualization@lists.linux-foundation.org, dm-devel@redhat.com, Vlastimil Babka 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> From: Randy Dunlap Message-ID: Date: Wed, 25 Apr 2018 14:11:06 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/25/2018 01:57 PM, Mikulas Patocka wrote: > > > On Wed, 25 Apr 2018, Randy Dunlap wrote: > >> On 04/25/2018 01:02 PM, Mikulas Patocka wrote: >>> >>> >>> From: Mikulas Patocka >>> Subject: [PATCH v4] fault-injection: introduce kvmalloc fallback options >>> >>> This patch introduces a fault-injection option "kvmalloc_fallback". This >>> option makes kvmalloc randomly fall back to vmalloc. >>> >>> Unfortunatelly, some kernel code has bugs - it uses kvmalloc and then >> >> Unfortunately, > > OK - here I fixed the typos: > > > 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/. > > Signed-off-by: Mikulas Patocka > > --- > Documentation/fault-injection/fault-injection.txt | 7 +++++ > include/linux/fault-inject.h | 9 +++--- > kernel/futex.c | 2 - > lib/Kconfig.debug | 15 +++++++++++ > mm/failslab.c | 2 - > mm/page_alloc.c | 2 - > mm/util.c | 30 ++++++++++++++++++++++ > 7 files changed, 60 insertions(+), 7 deletions(-) Acked-by: Randy Dunlap # Documentation and Kconfig only thanks. -- ~Randy