Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp240098pxb; Mon, 13 Sep 2021 18:04:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxg5kqvaQ1hnrVqQrJxlJR73TmnrED0RBjSBleX0PgQo3pTej68FfuhA/uLlbcrsp9RYoQd X-Received: by 2002:a17:906:1510:: with SMTP id b16mr16289946ejd.332.1631581477380; Mon, 13 Sep 2021 18:04:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631581477; cv=none; d=google.com; s=arc-20160816; b=H5vESBRScXvM8c4gouXJS5iqTPmF6ih3yUfa2wA8ZX08/o/cB/7uAtAoGa+Vr9j0AW sIfGfEkzDF3bs0qYH8PVKVNh1ZJvPL1+5Pd+8/7n41ok3i9uKucqN2Rtu5HEpp/pRlZn OJ6XuCmpMrSZvBtQEu2NvswtJfaM8okJ6UM+VmJnnS1PdoWJi0/1re9aXUeLcIKT5ALV vNSxIisWE4iTMVF2Xzin1wChDf/w2gWcXsMh3RRuo0ztq/cnZpj990+5aoR5qFVUon6h ycGnjyiVO7ZB/QGmHU1UNOWSwEWM/I7suU9/dneI3tQiTx0lN09ySeNvAUZu/000n0dH +9Vw== 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=146IDoLHsnlYB84TPDL7kqzW39fi+lkR3958WvJksNU=; b=AZhPEg14sKqS31C/62ih74E+wtI90qonL7x+MN+EsV94SzwtudHgB7MknuI9eNQg1C eDS4JcVZ8zw8E3Lu0hNIm+UqBRIXLmFbSooRlAc3oXwIDpMCupwqPakwXplxWZLG3vDg i0CyGMQ70jVZSoBuDoPAZJd/0m7EWHqmYWPLYS/AypwczfNRtmvKrR3EHfLP59lS4NY0 OvbXMgxOhYbpuD1QQ9wnT7gMrwTPi28Fwkxdf1SOJIl910qD07o/l1F1obWiRZrBJKUm vtWl1ErhDXwwKuNW0gJq+A0KCBfxBLNKhr9FiOnmRBmlNBDPWRNJyUsSrIv081pUv0gM Ku7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=gyRS8gjh; 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 s4si12541826ejm.735.2021.09.13.18.04.13; Mon, 13 Sep 2021 18:04:37 -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=gyRS8gjh; 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 S242687AbhIMUL7 (ORCPT + 99 others); Mon, 13 Sep 2021 16:11:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236133AbhIMUL7 (ORCPT ); Mon, 13 Sep 2021 16:11:59 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE512C061574 for ; Mon, 13 Sep 2021 13:10:42 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id l11so23616464lfe.1 for ; Mon, 13 Sep 2021 13:10:42 -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=146IDoLHsnlYB84TPDL7kqzW39fi+lkR3958WvJksNU=; b=gyRS8gjhHVDEJW3sWIFVBpPRc2KEVEPHvvR30CLnqsK+D0Cdnc2iMmALs9/mMesYTx DWIkQLMkgDI0IL1b4WvgD65bkxCoJcXYobVOE4MVrZsCt0d4JU3u0ngT8fARn6axUyBf W1N+PxcICKOZsZfThMM7E97Qm8F9LSOpst2ww= 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=146IDoLHsnlYB84TPDL7kqzW39fi+lkR3958WvJksNU=; b=2DWZbYuyuCVSc4eLzARXHor+B93wKBSF/0ySh21OFPijcBcITuGRofEfFB1VPycQtg LUe7KpGHS/8u02TNtc+mChmueBUg+0OVnMWqhBBR1rO1se2dzK7m4pefbgDNBh3eNtnY hBfN2ZIJ2Y0qUcfvD94iMq1flFPGVMigEorgFqOJfNRTAprxCk5kwz54rc7rsoPurv6B cM2uuzwFpnYKcGt1WLDqgyMAfc5FNQL4R8lrFEkkz1Vs7bmU3O3N1pvG9ismYxqdQm3K h3NkLN42rdVozPXgFfKjg8qBC1DegPzL6dBqDyoICE+sDYap2oGnu2YhfhbkCG8gQd7A H4yA== X-Gm-Message-State: AOAM531HzzaDbGENvmngmD3ed0AdbuLN14YbMYX8wqVZdtki4uUf19m6 Q99FWXEFZBHlOTc94mHgGmc1xJJvb42oqmq6rS0= X-Received: by 2002:a05:6512:3b94:: with SMTP id g20mr10439356lfv.409.1631563840524; Mon, 13 Sep 2021 13:10:40 -0700 (PDT) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com. [209.85.208.177]) by smtp.gmail.com with ESMTPSA id p5sm918272lft.302.2021.09.13.13.10.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Sep 2021 13:10:39 -0700 (PDT) Received: by mail-lj1-f177.google.com with SMTP id s3so19414833ljp.11 for ; Mon, 13 Sep 2021 13:10:38 -0700 (PDT) X-Received: by 2002:a2e:1542:: with SMTP id 2mr12239121ljv.249.1631563837811; Mon, 13 Sep 2021 13:10:37 -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 13:10:21 -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: 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 1:02 PM Nick Desaulniers wrote: > > Ha! I pulled+rebased and this code disappeared...I thought I had > rebased on the wrong branch or committed work to master accidentally. > Patch to stable-only inbound. Side note: for stable, can you look into using _Generic() instead of __builtin_choose_expression() with typeof, or some __builtin_types_compatible_p() magic? Yes, yes, we use __builtin_choose_expression() elsewhere, but we've started using _Generic(), and it's really the more natural model - in addition to being the standard C one. Of course, there may be some reason why _Generic() doesn't work, but it _is_ the natural fit for any "for type X, do Y" kind of thing. No? Linus