Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp253305pxb; Mon, 13 Sep 2021 18:27:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVsC818TlkNvjLZlWSDf+mevjmpwr7lV6Yd3PIB+W48X4WMfcfU2t/21W3Gl5MzjvIFoA5 X-Received: by 2002:a05:6e02:f8f:: with SMTP id v15mr10106607ilo.137.1631582840653; Mon, 13 Sep 2021 18:27:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631582840; cv=none; d=google.com; s=arc-20160816; b=u8EWahVXEvTKpqawsmJI91ZtUMqeQqtzRtyfpMS9F0uDNHx9+E+j2PmYbRFbgzsEhZ wRyXaEXRuHMQVYtAHOBwxVVTcrf40aBWN9DZzIAVzoRBeEdUT5Q+NkR/gzn9jFUvVYWO agvH0W9wYSCCFA2cPSlKRpjshH8/eZ6yxphvijH212VP8SgFb9queQs/kOFs8M6AhaOb 4bWkWHmIZ0gw1dDzXHFH9g8G7W64l90YjgnsG2wG3lr5KoBOJrhpMDzwhoeX6rkkMZa7 Pxqkw5fgrP6PCXhYYs+BbJEE5zuQn5P47PeLFeSi5HXnnkrGPg7i9EDn3JMjJ9Y0Yv1/ KVzw== 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=WKl+vSgoVtwUpDwTiYFeDbvOkP5sbvNaiiVprss03Dw=; b=IYllc6+4Ak7rL0106KrCKeCCP378t+0KVfvq/KRvnSJzVARcP0uj2WD+15b/V0JrSL zTOMp4MnHi8Ny51ZcSmGJE2c6fJjaIjbQbGy1KWgZYZib7CkU9jLQYSB+nhDVNdNqZL0 kBTYdKUPPSjaWRM/h+vsoDYK2Q6RGVO4Y5bXT4Z3GPYPp+2E9J6uJ2uQh53tp0DSL5co 4KhO0W+Mjf3jC8eybTTJ1YJEIJExLR3U7gpKeFy6hnRbXRxRWbiVf34ax1xEHK1lPKNl M0BORGYe3PArZXHh+uu0WfHvuZpLEQQC5B/38ORllevXLBWCdniOtKlyEvpyg4dgRAcC 9+9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=A1SYNoXP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p8si2656763ilh.169.2021.09.13.18.27.09; Mon, 13 Sep 2021 18:27:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linux-foundation.org header.s=google header.b=A1SYNoXP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350234AbhIMXUe (ORCPT + 99 others); Mon, 13 Sep 2021 19:20:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349896AbhIMXTm (ORCPT ); Mon, 13 Sep 2021 19:19:42 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46E71C0613E4 for ; Mon, 13 Sep 2021 16:05:40 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id h1so20093501ljl.9 for ; Mon, 13 Sep 2021 16:05:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WKl+vSgoVtwUpDwTiYFeDbvOkP5sbvNaiiVprss03Dw=; b=A1SYNoXPXp9aR+QbDKLZgTKR12NmkzDsOFeCyOq0tPMxICI8eICyWtmYqdV3M1oPuP 9MBd9pl8eNdfQkXn+0HNWq9vz63p8ZK8e3uwgCGxvf635skYTr0/yvFcHK4U/9Wsbopw 8ecObmvzNF+VlYoo92Jv4arrMr190jRmGZWA0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WKl+vSgoVtwUpDwTiYFeDbvOkP5sbvNaiiVprss03Dw=; b=FkpUNvWJziQLe0eEGsZDhRHta+V0kRXkJ+nEqZW5Wl5XBpVcts440YQoBD+BCSae7B khqy/ohOvvRL0wF35enMjBRQ+uUZGV99PAfmpHPkjkyjLsPiXbfaEXx1FzKo6wsXgKAN ytxjxWUMqoeylmcuk6Sc+oIPFiHTUr3M/2b3/G3gbnPMGJNMiNXR/R1NsKvR1XcRcefp Mq3E20QK0lNMEOoKBIo/5t2AQVbx4IQC/IV4b5Pi5FNj8Cze2DxKYcCyrygEd2p5YGK0 zYhDcyHdZPCjt423juWkfkGB+dlH52SSKeDCMqlgEuUEWy95b2KL59eIxWOhHlJ4yWAe bTXw== X-Gm-Message-State: AOAM532nuscfPl4SmZwPmu9rRH6WdegrKI//QqzjH5yNYHQArR7txd9Z 31Hki9XbfLty/uApwwDKri/lBfTYlT98jOQVEnA= X-Received: by 2002:a2e:900c:: with SMTP id h12mr12914576ljg.263.1631574338418; Mon, 13 Sep 2021 16:05:38 -0700 (PDT) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com. [209.85.167.41]) by smtp.gmail.com with ESMTPSA id u16sm1196592ljj.0.2021.09.13.16.05.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Sep 2021 16:05:38 -0700 (PDT) Received: by mail-lf1-f41.google.com with SMTP id y28so195024lfb.0 for ; Mon, 13 Sep 2021 16:05:38 -0700 (PDT) X-Received: by 2002:a05:6512:3984:: with SMTP id j4mr963725lfu.280.1631574034860; Mon, 13 Sep 2021 16:00:34 -0700 (PDT) MIME-Version: 1.0 References: <20210913131113.390368911@linuxfoundation.org> <20210913131114.028340332@linuxfoundation.org> In-Reply-To: From: Linus Torvalds Date: Mon, 13 Sep 2021 16:00:18 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 5.14 018/334] nbd: add the check to prevent overflow in __nbd_ioctl() To: Nick Desaulniers Cc: Arnd Bergmann , Sedat Dilek , Greg Kroah-Hartman , Naresh Kamboju , Nathan Chancellor , Baokun Li , open list , linux-stable , Hulk Robot , Josef Bacik , Jens Axboe , Sasha Levin , clang-built-linux , lkft-triage@lists.linaro.org, llvm@lists.linux.dev, Kees Cook Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 13, 2021 at 2:15 PM Nick Desaulniers wrote: > > Sorry wrong diff: Well, this second diff was seriously whitespace-damaged and hard to read, but while it seems to be the same number of lines, it sure looks a lot more readable in this format. Except I think that default: dividend / divisor); should really have parentheses around both of those macro arguments. That's a preexisting problem, but it should be fixed while at it. I'm also not sure why that (again, preexisting) BUILD_BUG_ON_MSG() only checks the size of the dividend, not the divisor. Very strange. But probably not worth worrying about. Linus