Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1037371imm; Tue, 5 Jun 2018 08:12:10 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ8jkz9Zi83ET1fdkwJ1MJ/CKcAkzHIIMZ0jU4GHxDLtqHTk1kkj7E9Yd0jaOMph+ZgViGj X-Received: by 2002:a17:902:6b84:: with SMTP id p4-v6mr26547090plk.272.1528211530260; Tue, 05 Jun 2018 08:12:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528211530; cv=none; d=google.com; s=arc-20160816; b=mQjt4RZZM1kWLHiJL6RvWI6uKDxL7S7ilUS8IuMY8rFLcfVYwD7UEUphQZ+/8KGZkS hpyFV4QISaquF/S4x/OggHcGxusZw78j6JJCUT/7NDHaO76Nuqw/AVIA+BQc/B4myTnt Mcg0+bPXj/Sz+Gi4peAHe88fp3cDo+/3zP8i4m74mHMKp9kv0AjxhvLNAFRjy1LbTani YFwnqhL1STdN+T2LS7fYvsDlhYrjqi1ABE8BcjqcklzWp9Cqy/nDuc3uSDd8IweiDA5/ BXKfp/hRSMwu5qc6tz4m3/OIwQ7ndExI5AvpXCUz4+UfEW1QjfQV79kEB9VGl3UmbAOT r6rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :reply-to:message-id:subject:to:from:date:arc-authentication-results; bh=A6/j0S9TA/6ZQSU8cH+iOOo/zLbvAOud5RvvzMBaajs=; b=XSTH8SUGmvdC9xnktywEqzjbGQ4YiBKEH+tfq4TK1SIxhcEWzf3O59ajWSX4qLIRWn AFLKIpgtMjyDY3CBuBoeNWHYVEzhVTSebKSOlTtuQAIewBp2r/qUFuY/n1/+tLlMm+Fg bysoKGiwuICxwE+m41Gv3/oP0IFYgvUK5nuy7jTNHxpWQG3p0dF6kl5o5fXBtr0s76Q0 4BWt8J8p8aIBiXCvjNtO7FShNSENyjRIJntiEF/Q8pLoavolQI0rltZW1gG2j7Rln68H hTsk1TPkLDVuQIpbc2FOQzDT9rcWDK+Gulb0DAhDt5syIV0wslqfcDj4vpCTmD+OivyE PwBA== 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 j9-v6si9157158pll.64.2018.06.05.08.11.56; Tue, 05 Jun 2018 08:12:10 -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 S1751857AbeFEPLX (ORCPT + 99 others); Tue, 5 Jun 2018 11:11:23 -0400 Received: from mx2.suse.de ([195.135.220.15]:55129 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751832AbeFEPLW (ORCPT ); Tue, 5 Jun 2018 11:11:22 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B9015AD0E; Tue, 5 Jun 2018 15:11:20 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 56E0EDA9E5; Tue, 5 Jun 2018 17:08:34 +0200 (CEST) Date: Tue, 5 Jun 2018 17:08:34 +0200 From: David Sterba To: dsterba@suse.cz, Jens Axboe , Kent Overstreet , torvalds@linux-foundation.org, snitzer@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dm: Use kzalloc for all structs with embedded biosets/mempools Message-ID: <20180605150834.zed7tjvmm7livrbe@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Jens Axboe , Kent Overstreet , torvalds@linux-foundation.org, snitzer@redhat.com, linux-kernel@vger.kernel.org References: <20180605092633.29583-1-kent.overstreet@gmail.com> <20180605143507.2o3qm4r6euvyhe5g@twin.jikos.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180605143507.2o3qm4r6euvyhe5g@twin.jikos.cz> User-Agent: NeoMutt/20180512 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 05, 2018 at 04:35:07PM +0200, David Sterba wrote: > On Tue, Jun 05, 2018 at 08:22:22AM -0600, Jens Axboe wrote: > > > I fucked up majorly on the bioset/mempool conversion - I forgot to check that > > > everything biosets/mempools were being embedded in was actually being zeroed on > > > allocation. Device mapper currently explodes, you'll probably want to apply this > > > patch post haste. > > > > > > I have now done that auditing, for every single conversion - this patch fixes > > > everything I found. There do not seem to be any incorrect ones outside of device > > > mapper... > > > > > > We'll probably want a second patch that either a) changes > > > bioset_init()/mempool_init() to zero the passed in bioset/mempool first, or b) > > > my preference, WARN() or BUG() if they're passed memory that isn't zeroed. > > > > Odd, haven't seen a crash, but probably requires kasan or poisoning to > > trigger anything? Mike's tree also had the changes, since they were based > > on the block tree. > > eg. fstests/generic/081 crashes (trace below), no KASAN, PAGE_POISONING=y, > PAGE_POISONING_NO_SANITY=y. > > > I can queue this up and ship it later today. Mike, you want to review > > this one? > > Would be great to push that soon. The fstests build on several DM targets, the > crashes lead to many test failures. I'm going to test the kzalloc fix now. Tested-by: David Sterba on targets snapshot and thin.