Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1001219imm; Tue, 5 Jun 2018 07:43:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJsgeH5Y8+sAymzj2yQR2jjVacnUsk3HZyRJ27W7cFbXDsWkr8rz8Rhw/CIdtHf/CqlQ89R X-Received: by 2002:a62:5788:: with SMTP id i8-v6mr17622793pfj.175.1528209816032; Tue, 05 Jun 2018 07:43:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528209816; cv=none; d=google.com; s=arc-20160816; b=qRb7zjBpdHCk+w81dArJpgQrD5KQ9u410p/hTXmok2hGQ7/LjukFcV2AWm0GLHZq2m 3msdxuRym9VlhgelpLYvRj3/b+gkBNlbT7e3r95ZgnsfCfT/Ep6AG+AoxEXH73xjuIoN MPBJCUFP49JBj34XaglShQJ87/AJqd+YE08JZN2uG78e6lsAYRP4xBkKGVKQeOnsePxe tMsWAEarGWLK+jeGKdpMP7eAHun6KHVD0iOKnmnrNb8QlaHLppAljyutHbpNn+56MZsP 80Li8qjs4LCxpaSEcNbO3GVD8DLgyeXU/uqmSy7ZsH1Hb+vhnKCw9EhIX6lZd2MJt4CP xi0Q== 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:to:subject:dkim-signature :arc-authentication-results; bh=stg2/DAdG0k3WBEGG8ymut7qznmn+93PXB439yexXYs=; b=GtpTrNh7+4Itogbx2aBJ/vbIBqhC2gLibpGy47Xnifg2GcQ+DBXvq3Ww8DgFUHVYCW w65vZHIRyJ4O9OL+MRYKdMKuE5YmUXFSL+1HqidKISFHjfT/8f7JpcMauSSv7vYIkOHM fxDE7M2Lq7a9IngfnXkFhpead8coyBAUgFg4rhRZnmlM71fYVGw/1dhLAEzv9dbFZvES vgZjlqK4esxKpdJuU+yOtT+5IrP7xT9ypivZTHrCT0Lw0Pl+/hEm5oW9E8/EWQgF/bwK Rkk77nsN7IYsRlv1I/o56CVVxjvxm1HuHPPi+1YBlXZAvx2E03zIXzbu/HEhsI9FuBZx pYNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=NdkspE/r; 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 n64-v6si24342169pfh.210.2018.06.05.07.43.21; Tue, 05 Jun 2018 07:43:35 -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=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=NdkspE/r; 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 S1752556AbeFEOmI (ORCPT + 99 others); Tue, 5 Jun 2018 10:42:08 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:44337 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752178AbeFEOmH (ORCPT ); Tue, 5 Jun 2018 10:42:07 -0400 Received: by mail-io0-f196.google.com with SMTP id g7-v6so3625006ioh.11 for ; Tue, 05 Jun 2018 07:42:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=stg2/DAdG0k3WBEGG8ymut7qznmn+93PXB439yexXYs=; b=NdkspE/rpLS++3YA1sa+X1FojD94v6JO7wsmyk491aauCrtSvNP/I+pkGA1ouhkuq/ KmFuDc9psUH5fSz+DODwMgovSsWYeJCMmB1I5LTtmYcO0gzpZooGy6FhkehFr5Am5hiP TbBBlvZBQiFol0oMspEmsf/BTA5OnzmOqLMNxPkqjt4wi8jC0BapFqC7i4aidBRxtClx YPMwTJABVp8/mUq80VxHfkO7WUsEA7s8TWdtvMKMSSepan+zFleYR/4Y2lGg+R4fp1iD 3GJKiXEIeXTsXDbdTR3yHFCq0og7ttLSb6OzTWm9EzSjYomCdrNldjdrIrBoE3Avtmw/ kZhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=stg2/DAdG0k3WBEGG8ymut7qznmn+93PXB439yexXYs=; b=El8Fspq5/Fq9Ha5prtd1PVUcXwv2zQYMzxq0z0to2GlupKfql/KJSYwc6LuMjUY2Rj tUWP+PLprisatv7cQbGrnEFNmOs9NvbZPmEq74nshRsOlfvm6Kn2+aSiX+03U/PVYu/i G0SVTsPNMQHIgUF5TFNOT/n8baoAZlsCAEGPu31PzlwwFbq5TpxB2zjtv+B8KXHFhs0n E64PpDHt6JQOXonOeOJ0wPbF8ISg1lO0m8awgRq3IsyHa/IPiQ4l8kISHdkrZV970Ed1 jA7swmwPT7bqOKcTO/3NS5AUkSf3DPr/gZ/d8Ay0dEKhTlCkg1xyqt4Dzr//NG0gxvXM JdMw== X-Gm-Message-State: APt69E3DYxVOZ5jyPzAjNH3ZBv2SDly/JtBEi0lAydejufsDibuP5MAL oe4hK94qaZlARmggJc8E2VCPMWCeEDY= X-Received: by 2002:a6b:407:: with SMTP id 7-v6mr15848790ioe.140.1528209726119; Tue, 05 Jun 2018 07:42:06 -0700 (PDT) Received: from [192.168.1.167] ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id a17-v6sm4133249iod.20.2018.06.05.07.42.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jun 2018 07:42:03 -0700 (PDT) Subject: Re: [PATCH] dm: Use kzalloc for all structs with embedded biosets/mempools To: dsterba@suse.cz, 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> From: Jens Axboe Message-ID: <8a4b20a3-899d-3317-407e-a6a2029d31b0@kernel.dk> Date: Tue, 5 Jun 2018 08:42:03 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20180605143507.2o3qm4r6euvyhe5g@twin.jikos.cz> 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 6/5/18 8:35 AM, 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. For sure, it should go asap. -- Jens Axboe