Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp241783pxb; Mon, 13 Sep 2021 18:07:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgSg1Vh7ESDc/HHF6k8Bad1s3sq94INljYSgK2+imI5GDNmJc3oH4S78vcNmQDFmCLNuEP X-Received: by 2002:aa7:dcd0:: with SMTP id w16mr16353757edu.288.1631581643167; Mon, 13 Sep 2021 18:07:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631581643; cv=none; d=google.com; s=arc-20160816; b=X9uJdMO6P5WnWaPTWCo+FtDxgkMdxeU0VmWt1+a8iAJFEj75Kalpg9znEfOJy/wmJT wadzUSZ+zapGx3ZUa8PwLsG64as3KX6xXeOM8S2GX1NAAm/5lGkpBgeoGbNBESj+guDM MUakwtn6voHAXS5vqOQts/LBcOHZKelY36W4biknwz6BPTo4QJ8RyBCXy2jO0VO3Lqpz m6bsWo4g3A+aYs6waGONeAnTfwRenWjjMUHsV5uaxpDA15dTJcMPo6w0nRXzdHz/44EF GfNIpxkBVRAri8YnJIJOd0nLiA8hGlN323RY/Yw9035pBTdzh0zG9vi2L85KvADhOsYQ 4jvg== 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=HWY/EewUPKp73TzxAziJqvXmaqyygdW/b+QHkWc/nhk=; b=MBzhlXf2J5keqXo0iZnkTdSIrJu5+LoKE+FrFOsg+5qUiRJ+g5QEqL/iFKNxj0WQgt yzuI+AbyrnqHpyv3r5Yrc+lzpa9PcIxJRHSs4BdOw/PjVy/pn8RNYfRRz50XiKkgYaiz jMFigA2cVGW2QF1QrliSAXvbgqnHdX6O9RVWqvyq0fqtPWuYSGzk8VmWRG29N13IS6aW r4EKtGPkskZXpPa6maKC3iBxITK7rEAGyJqi7vWg8DH5Kz7upq4tsqYE9bEsnC/anXAj 1PClrQporSb9fpWMirHOYLmvKw3VpgIkYUryYeRtJ3A8p3APkkgbkthd0y2buO7Uj+m8 VJeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=WUDcnWLS; 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 p12si12354102ejy.328.2021.09.13.18.07.00; Mon, 13 Sep 2021 18:07:23 -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=WUDcnWLS; 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 S242290AbhIMUn6 (ORCPT + 99 others); Mon, 13 Sep 2021 16:43:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241198AbhIMUn5 (ORCPT ); Mon, 13 Sep 2021 16:43:57 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 633F5C061574 for ; Mon, 13 Sep 2021 13:42:41 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id g14so19563589ljk.5 for ; Mon, 13 Sep 2021 13:42:41 -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=HWY/EewUPKp73TzxAziJqvXmaqyygdW/b+QHkWc/nhk=; b=WUDcnWLSVuipyv/o870gx/3KRDXU/5/pW/w70Iw6g0/mUDCYF5940OAfsqWLvsksEK 7ykNK7S4TpqCIds/8ffTUxTEHnfLwNVZ/b9beeHJ4pkGgI6UiMzi1Y64I6nBvLCe+zCv y2ebJSNNR55jpHO3tEmyEc5E5ilbPqcga0xEY= 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=HWY/EewUPKp73TzxAziJqvXmaqyygdW/b+QHkWc/nhk=; b=lVfopAxdQJROMd7beK+Nwaj+KYvlpi0lR0D0gR6r/QPie2D08GbBQg9KpbzIJcDs6S SI0dLZYrTybk7/R+bSnt2LVVZweMKdnwXKsVC7n9AVfE+/WkWdKxhnJmEii98BL1A2Mw ERj7nVATicItC500TBtqaAZ3UASnSzipF9zfeyhJ4fTL4Z6tRnXvK7WFG3vTY5vptvhG 9y1AzfvC8ukm9NAwC4yq3Y0U9k6QBah3NEW/mAk6FQTWrZcoB9mLG7HOwYLiGRPcViU2 BVX8u1gm/HiWejrN3/sv4LJkK8xqFfV4BNEIxaDTW6+tCFFFadd/qpe2H1UnF1OvaP0w XGhw== X-Gm-Message-State: AOAM530qa31bLNN4Um2DioVZJfrpVcw9kwRs+uaFbe3JHEZabKEPX7F8 kNIIS528efQEX6WWkhMfg0mX8/7UZtRAFMCATkQ= X-Received: by 2002:a2e:858e:: with SMTP id b14mr12018526lji.508.1631565759390; Mon, 13 Sep 2021 13:42:39 -0700 (PDT) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com. [209.85.167.48]) by smtp.gmail.com with ESMTPSA id i10sm70117lfu.71.2021.09.13.13.42.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Sep 2021 13:42:36 -0700 (PDT) Received: by mail-lf1-f48.google.com with SMTP id s10so23740646lfr.11 for ; Mon, 13 Sep 2021 13:42:36 -0700 (PDT) X-Received: by 2002:a19:ae15:: with SMTP id f21mr834776lfc.402.1631565756235; Mon, 13 Sep 2021 13:42:36 -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:42:20 -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 1:16 PM Nick Desaulniers wrote: > > Do we have access to _Generic in GCC 4.9? We've ended up using it unconditionally since last year, so yes. In fact, the compiler version tests got removed when we raised the gcc version requirement to 4.9 in commit 6ec4476ac825 ("Raise gcc version requirement to 4.9"): "In particular, raising the minimum to 4.9 means that we can now just assume _Generic() exists, which is likely the much better replacement for a lot of very convoluted built-time magic with conditionals on sizeof and/or __builtin_choose_expr() with same_type() etc" but we haven't used it much since. The "seqprop" code for picking the right lock for seqlock is perhaps the main example, and staring at that code will make you go blind, so look away. Linus