Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp6089288pxu; Wed, 23 Dec 2020 13:12:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJw6OSf/g0LAd6oiG5q1P5fT/XJbIjmn9P6SGPtDJ5gUvjc8NJqknyFn1nYCkd14Z7p1gYzb X-Received: by 2002:a17:906:3c04:: with SMTP id h4mr25089954ejg.220.1608757940458; Wed, 23 Dec 2020 13:12:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608757940; cv=none; d=google.com; s=arc-20160816; b=0TqqK6lJVFCG4WIbYI6bHJSikiQAx6/V+fP76/sqqDUEJ1QM7VyNGMiRFGmfXWT+pB HkZ3J8X52ZGooJsVei9QR9zDlvtpBRasCGxUm1gRPOltXF3Ceeu+Mr/986vgL9jtNmC8 K7CBgcFLdSuwLxbvBgobBEtJqYn8+gEeyAzAvQrVb+w16aikxE74OJI2Iw1bjiwkAJwI lTEeKvvGOKh4Sdw/awdlx6b8wg13JAfPQr61wplxdieipd4my8syDgXY/lQPmvDwcb3S ygo6Q5jhqPlQQsQSF4H4frl9lzZxI1VGzTDx1rGr2Zg4uBaXUBuza7EN+5D/+D4KMp5a qUJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=0ZMUDMR4pTmJNoSoaiKNNtdLIWf0D/EJ1+mQ+sQxsp0=; b=FBXAMbnklSU4TgKRRSb4GihppQfiBoqPMjNhFLxQQ6sv4Hp7ygvOexH5K+6YpPMKvU 1WOTUll/kojqDCKiFbhf4e+K/UE47iDszzREro8DDbclf5NuR73k2Xut7qruRLHSU/Nt RiwLbr2VQPERhcsrh6m/G5bpWQaLViUOvdAmmNJucDH83xqqsvqGUM8o8kXWZz0+i51s vto0x1cwZ3JqLCcFH6Ii5nZssyvngT9oTsUKcgQE8H60RT0zV0ylJRigbYSywO0PgWLF YdvpK+27vfPv07CX50WoV/dvmfepWReR7+XWQBZZTOEUhcXuXUu4Lr/FEDppGyBPgEA3 X5Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=AIfRmzyF; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm7si12710388ejc.350.2020.12.23.13.12.00; Wed, 23 Dec 2020 13:12:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=AIfRmzyF; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729123AbgLWVK5 (ORCPT + 99 others); Wed, 23 Dec 2020 16:10:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729117AbgLWVK5 (ORCPT ); Wed, 23 Dec 2020 16:10:57 -0500 Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 702B8C0617A6 for ; Wed, 23 Dec 2020 13:10:07 -0800 (PST) Received: by mail-il1-x134.google.com with SMTP id u12so348909ilv.3 for ; Wed, 23 Dec 2020 13:10:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0ZMUDMR4pTmJNoSoaiKNNtdLIWf0D/EJ1+mQ+sQxsp0=; b=AIfRmzyF8QVV2XoZBrgPqiMkwP+d/waxNG88EufLseXO59pig6prjSxM5Rpwf6Ebh9 pTFTtkNe4goWFtYC0BwTtYNnWNHoRg6BxQFLWEbgCm1BueHIDjQCC3SFzx9UhHp2qIch V9nUbIXvc1KTR31ET1RM17G2CxMqXvVkH0ccw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0ZMUDMR4pTmJNoSoaiKNNtdLIWf0D/EJ1+mQ+sQxsp0=; b=jqD8DsE5DAwkkZHPC+YXUsPqA4qEnZa7EGp2tmjmzRuC1L76Zz+32YLTvE0s3dVdoJ ay1s8WRrCJhdf5eIq+DICKI50il8R9ntWpWKlgovlmJhymY0U8lPzzr0Wr9E0NbmJ0l0 6oUQAlkyIggaCKJ3tpskLE6gKzTFF01fl0u6vbmj1DxhSSP6IaIAHZbROCCSKzHhUiEp AwI9pmyCik2uGOxOEuz5O5bN9yuHkEPJTnG7Ehs9LxDUqwI7Y3o5/A+rH2B9EB507C7j uvNLom4EZT65QH8waSJXNby9PtAEqa8WR0iHVspwGtQMj67XM0/RzBZ+PGXnmkupRoEx WfqQ== X-Gm-Message-State: AOAM5318pKyjqRuqbG2FaTrFb74eGoDWsUzO4CF+6Ojob9ZDXkGwp4N/ 2fm2zLdcqBinIg8jO0NdQdFVxzn+YJNtvNZTD+MjOg== X-Received: by 2002:a05:6e02:5c2:: with SMTP id l2mr26473575ils.231.1608757806552; Wed, 23 Dec 2020 13:10:06 -0800 (PST) MIME-Version: 1.0 References: <16ffadab-42ba-f9c7-8203-87fda3dc9b44@maciej.szmigiero.name> <74c7129b-a437-ebc4-1466-7fb9f034e006@maciej.szmigiero.name> In-Reply-To: <74c7129b-a437-ebc4-1466-7fb9f034e006@maciej.szmigiero.name> From: Ignat Korchagin Date: Wed, 23 Dec 2020 21:09:55 +0000 Message-ID: Subject: Re: dm-crypt with no_read_workqueue and no_write_workqueue + btrfs scrub = BUG() To: "Maciej S. Szmigiero" Cc: Alasdair G Kergon , Mike Snitzer , device-mapper development , dm-crypt@saout.de, linux-kernel , Eric Biggers , Damien Le Moal , Mikulas Patocka , Herbert Xu , kernel-team , Nobuto Murata , Chris Mason , Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org, linux-crypto Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Dec 23, 2020 at 3:37 PM Maciej S. Szmigiero wrote: > > On 14.12.2020 19:11, Maciej S. Szmigiero wrote: > > Hi, > > > > I hit a reproducible BUG() when scrubbing a btrfs fs on top of > > a dm-crypt device with no_read_workqueue and no_write_workqueue > > flags enabled. > > Still happens on the current torvalds/master. > > Due to this bug it is not possible to use btrfs on top of > a dm-crypt device with no_read_workqueue and no_write_workqueue > flags enabled. > > @Ignat: > Can you have a look at this as the person who added these flags? I've been looking into this for the last couple of days because of other reports [1]. Just finished testing a possible solution. Will submit soon. > It looks like to me that the skcipher API might not be safe to > call from a softirq context, after all. It is less about skcipher API and more about how dm-crypt uses it as well as some assumptions that it is always running in context which can sleep. > Maciej Ignat [1]: https://github.com/cloudflare/linux/issues/1