Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp4014430ybh; Tue, 17 Mar 2020 10:35:27 -0700 (PDT) X-Google-Smtp-Source: ADFU+vspguL+tdegJuQyilA7hf50yAnuYgKvCp8S64XfWqTYX7U48nfQru+bm5xqW1OjUaPxqvZL X-Received: by 2002:a05:6808:609:: with SMTP id y9mr370021oih.118.1584466527070; Tue, 17 Mar 2020 10:35:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584466527; cv=none; d=google.com; s=arc-20160816; b=id2Dz/jCtgoeGPURGAU7i+1vMvAIkatzmnsvEw7uvZ5fTC9cbkE7b9pH96aDw0fIzi 3s0W3rBnR33FVXZzy7fs1lhTn6PSorMJgxSn3xHMz63934db0Gn8tK8oFZJAdHe9Dzfd Y2hiF6dk7KPWOz6lWPkrncsBKp9Me4x1dhjm3/HEuGVw+rvhQS1KOwOTFbmxe+5Kg1fb nrtzp4OFpqOvS4fDiHcYOSPdIJapemoNYGMPe/KGRJwVxybmpHldj0nJih7MpltDgT4v tiocF79tD45ojsuZs38x9b+Pt1xb36QDZd63qd3zw7phgBwVLM1k0OU30VJ4BzmS/6oe xFig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=32N5kM8wn4tDAmjs6gedFa/sANcD7GCBYoh5b7duodg=; b=SR0D/kHDUKtmAKgo17uDHLtHhihOHs7bWg6a0bzxZkrDlv2loPlhr/dR4l5QgLP26n sPEo8UAbM8iJv9B0wx2FDAUT/Hd4cgfxL3PxaW9CDA2RhnypcHokrsZoT30GeGx56GkN 4udonw7XKliQyAeZkTd4Z2C3KZqEIGd5YgtCzD2ntm9JvxasNICUzs37G1Vn3mErjqDi q/Sg43cSzYxR7NrFqv5z+s2AJgEM0Y9F0F83uQVaI/egkDn1+APtQJ37gRR5MLZ5QirS iXE/ffL6fHHxXr3j7b4m22fE8LDIiFNTzPcGdUENe9A2RhuuFtxTtrfHEAJ1ZXiP1J6C N/3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b="E7/PuPoj"; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 7si1857169oij.97.2020.03.17.10.35.03; Tue, 17 Mar 2020 10:35:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b="E7/PuPoj"; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726476AbgCQRfA (ORCPT + 99 others); Tue, 17 Mar 2020 13:35:00 -0400 Received: from mail-oi1-f193.google.com ([209.85.167.193]:45918 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbgCQRfA (ORCPT ); Tue, 17 Mar 2020 13:35:00 -0400 Received: by mail-oi1-f193.google.com with SMTP id 9so4600834oiq.12 for ; Tue, 17 Mar 2020 10:35:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=32N5kM8wn4tDAmjs6gedFa/sANcD7GCBYoh5b7duodg=; b=E7/PuPojEcN00+7o57owhlRnsJgcbwlFFc3V2M1Eqo3KTf2sDWkBQDH0Bk9/6murg/ EqrgV+pRniu/EmQ24cYhdtRGEwPw/o0TKpeYy0ozj5KWvBb+bv1mNYEa+MmlpmaSgmF+ VYUNve1/9bS/0SlC4hgHE//iIhVQ7u3a1gqJ2E5jDWFXQC90gSsu2FkmQ9iMNc+klK7b SQSFqZDMXOQxMLmZnrTPaL+dZh71UgMvDuh7oO8U080ShIju1cwhDxz7T1ZMOS7R1Uhp niBTyCUASpgJoW6gKXubPZ0GNOZ8hNOWnaVINp2093j0DXZFXjjhT2DKFHXxOGGNlaXT 7uQA== 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=32N5kM8wn4tDAmjs6gedFa/sANcD7GCBYoh5b7duodg=; b=KrweOTH4awBPsK5emMkGKGaaJtNoMWLBjfQcPM8Fr8dkrvToZXxqvu7WKNmE6anFk8 i6WaUDedZhotRwjtoBQaVQ8Rs3g76xuvTHuGO2/sQ6mfQBkxCxQshF3jNZ3oER0hofge 5MQK+XQK30DfqOkrIvp2f1in3+VmtHR39RgKSouMpfPGiHyKwJmZBJoRMN8VC60kAk73 rZfKE9fFAIg4VVNCx5i6LucAHUBksqv813KRNvd9CZHrzQ1ss30ZP/hEwiP7zTZ+ra/y ZIo5Gb2eLBfUg/4PbYCN7/iqoijzVvF8v/yS1coHiNgU816hsEX6EK0PLJxRg6eJ13KU jvSA== X-Gm-Message-State: ANhLgQ0pu3fMig3wH1IlXSvY3o6FGg6fVGTFGUskqER6XXsgXLSAwqiD eK9U+GhM8d+KFPMhzJCdQj7ZMmta6mCI7NSIlHaGzw== X-Received: by 2002:a54:418a:: with SMTP id 10mr365540oiy.105.1584466499710; Tue, 17 Mar 2020 10:34:59 -0700 (PDT) MIME-Version: 1.0 References: <20200317061522.12685-1-rayagonda.kokatanur@broadcom.com> <20200317061522.12685-2-rayagonda.kokatanur@broadcom.com> In-Reply-To: <20200317061522.12685-2-rayagonda.kokatanur@broadcom.com> From: Dan Williams Date: Tue, 17 Mar 2020 10:34:48 -0700 Message-ID: Subject: Re: [PATCH v1 1/2] async_tx: return error instead of BUG_ON To: Rayagonda Kokatanur Cc: Herbert Xu , "David S . Miller" , Allison Randal , Kate Stewart , Thomas Gleixner , Greg Kroah-Hartman , linux-crypto , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Mar 16, 2020 at 11:16 PM Rayagonda Kokatanur wrote: > > Return error upon failure instead of using BUG_ON(). > BUG_ON() will crash the kernel. > > Signed-off-by: Rayagonda Kokatanur I don't think this patch is worth it, it has 2 problems: - These conversions are buggy. Upper layers assume that the calls will fall back to synchronous operation internally if they return NULL. - These assertions indicate a major programming error that should not be silently ignored. They need to be WARN_ON_ONCE() at a minimum, but only if the above issue is solved. These assertions are validating the raid implementation in raid5.c which has been correctly handling this path for several years. The risk of the code reorganization to "fix" this is higher than the benefit given zero reports of these actually triggering in production.