Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4246420iog; Tue, 28 Jun 2022 12:01:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vRt5gtMMFaayyGEq9KsSr49C+1BoswX3dooJRBuh2SDADobpAU7z7oyHlxgPkieSjK0jL8 X-Received: by 2002:a05:6402:26d5:b0:435:aba2:9495 with SMTP id x21-20020a05640226d500b00435aba29495mr25212867edd.133.1656442918395; Tue, 28 Jun 2022 12:01:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656442918; cv=none; d=google.com; s=arc-20160816; b=Q3yfw6bH4sLlGNdpq82PJzFODy3ey02/1k7DOh93Y5dICV7CjjoO33J8G2wAbMrTTS iDQOXWAgzX4sZt/6LEZHYbEoO1XlGs4dobeeQErAqX8IC0benN86VVP8eW1i/9NVBBRr KZeP+afBR2MT1/nWZ9BG3YpCzb1pThT6uSkV797Qy6qwjOcXETE9Jg6AE3y5EX0cyjio OjH1DnEUD7StE2L6cLP6rjBIjovsJtWS6tjWFGKLk+mM8DfFb2r5MlMsbryzyA0+P0DU xkwiyA06jJMIJCgugCijS9uBUiIBg/9fiGF44UxOdwRUyLVim+8tujbTSoBHanmTuzmb 9pWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=srd0vxfduo9pXREXizXvQ1Gwi/kEACFP1rdXcY0Aglg=; b=v0WuytILq55URxn2d9NIU9FcF57Cr4zNHiBc3pDW1DBlKgwwU9oFG0/VeQCg0E8Zto LFKrJ3mfftnHizJjdv/znq/fu4APHa1UsRwgnjxuXprC0ZIIQcwnkAnSOL54Gq0GKV0b GjqIF3cGVitKkPvPxBc+7FlYBvzUeeOruSk0iroHM8OjxSUS2vCJdjAtfhmeCIw6RQrS YLrudw0DNhDeS/o6PnRJF7YXEM41bzeHMofvun2mtCHUZU3b71K+PWMkxdActvh3pgMc Dj81vhz3GIK1Zu00FCxlBB6j4Sy4dI1Bbazg7hFLvAAuNwwDdxiwadlNnRxSXjKcqQAk PVMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=QDfPPT0f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c12-20020a05640227cc00b004359155f862si19630806ede.590.2022.06.28.12.01.32; Tue, 28 Jun 2022 12:01:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=QDfPPT0f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232984AbiF1SoQ (ORCPT + 99 others); Tue, 28 Jun 2022 14:44:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232869AbiF1SoK (ORCPT ); Tue, 28 Jun 2022 14:44:10 -0400 Received: from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com [IPv6:2607:f8b0:4864:20::f2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1741E23BD9 for ; Tue, 28 Jun 2022 11:44:06 -0700 (PDT) Received: by mail-qv1-xf2b.google.com with SMTP id cu16so21384606qvb.7 for ; Tue, 28 Jun 2022 11:44:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=srd0vxfduo9pXREXizXvQ1Gwi/kEACFP1rdXcY0Aglg=; b=QDfPPT0fYl+zbzIvYII9znFGb4s02ZWc7rdJXgoVlQii3pb6MPHXUbo2NQcshGpobE dWlWXPBgu4AcM4BoWih7Z1Nr6ImLeGEz2FZoCblM4qyf8MsycIzs6ej4nXX7nwNpGP6Q WS2wAoLm7tunOmWFHsCTXENR5aJ2dwangh3Hiy+KajaZLCQ31/GJ39i5LG+HlW0f/4Yp DzCT3gMR3JvAVHruRt3NJZXTCo87e7XIf3RRiCTD40KLgGYQ8Oy9U016RK3fPhyNykEI VcI+7whSObzV9gDqoR9iwpi6V1hWpQPbHnX1dl7fE5ec/owdsM9r7W03JXKpNXxaLmSi lJng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=srd0vxfduo9pXREXizXvQ1Gwi/kEACFP1rdXcY0Aglg=; b=mr5KDJciNMc+qF9HJC6hymHjFeGGL1mRdCfycJmq2stnvU09rCTfWQgF0DiOEkQePN 4to97dvXOmIvUAgxOhWJ20MsgugfioVCnnZVnNO4BqgUWRIwA/XFn9qsWOXQj8gC9m9u jhDhl24Pl60Ad8v4+FpFJzPbY0yFMYp9ENLUhojDhs9W0JC4F3gLZsa6CtrnHDG9/560 yVxwE7WP1BID1meQUlOmjamdIm4dR1aHVnIPsfy6p4SjqY0opTnRxOzKd/+WZDV1MhqU 4ncC6rJ3IIskHdwVBeVpNKOPJ1g5dBAX/SkXJZ0qdpP0nWb8TZCGghv3gsN5k+D8MfuF +Seg== X-Gm-Message-State: AJIora9/eEoZLDo2s5Blvr90oUyMLsevrA8sEjKV92JutnfsT7swWCdp 26KGKboyort1cEQFSuIw5wWIhw== X-Received: by 2002:a05:622a:7:b0:31b:74bd:1597 with SMTP id x7-20020a05622a000700b0031b74bd1597mr6494688qtw.677.1656441846052; Tue, 28 Jun 2022 11:44:06 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-162-113-129.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.129]) by smtp.gmail.com with ESMTPSA id h9-20020ac85149000000b003050bd1f7c9sm9708477qtn.76.2022.06.28.11.44.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jun 2022 11:44:05 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1o6GBw-0035y2-Fs; Tue, 28 Jun 2022 15:44:04 -0300 Date: Tue, 28 Jun 2022 15:44:04 -0300 From: Jason Gunthorpe To: Kees Cook Cc: Daniel Borkmann , "Gustavo A. R. Silva" , linux-kernel@vger.kernel.org, x86@kernel.org, dm-devel@redhat.com, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-s390@vger.kernel.org, kvm@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-can@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux1394-devel@lists.sourceforge.net, io-uring@vger.kernel.org, lvs-devel@vger.kernel.org, linux-mtd@lists.infradead.org, kasan-dev@googlegroups.com, linux-mmc@vger.kernel.org, nvdimm@lists.linux.dev, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-perf-users@vger.kernel.org, linux-raid@vger.kernel.org, linux-sctp@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-usb@vger.kernel.org, virtualization@lists.linux-foundation.org, v9fs-developer@lists.sourceforge.net, linux-rdma@vger.kernel.org, alsa-devel@alsa-project.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH][next] treewide: uapi: Replace zero-length arrays with flexible-array members Message-ID: <20220628184404.GS23621@ziepe.ca> References: <20220627180432.GA136081@embeddedor> <6bc1e94c-ce1d-a074-7d0c-8dbe6ce22637@iogearbox.net> <20220628004052.GM23621@ziepe.ca> <202206281009.4332AA33@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202206281009.4332AA33@keescook> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 28, 2022 at 10:54:58AM -0700, Kees Cook wrote: > which must also be assuming it's a header. So probably better to just > drop the driver_data field? I don't see anything using it (that I can > find) besides as a sanity-check that the field exists and is at the end > of the struct. The field is guaranteeing alignment of the following structure. IIRC there are a few cases that we don't have a u64 already to force this. Jason