Message ID | 20230922173110.work.084-kees@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp5932835vqi; Fri, 22 Sep 2023 16:47:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEnwpJF+ZteGPh+TycL+DcFPMV5TXXihz0804JyRK8E91hhPeTyNmVuXoKBI+iwE6cZoDYK X-Received: by 2002:a05:6a00:138d:b0:68b:eb3d:8030 with SMTP id t13-20020a056a00138d00b0068beb3d8030mr863425pfg.1.1695426470870; Fri, 22 Sep 2023 16:47:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695426470; cv=none; d=google.com; s=arc-20160816; b=NuJS9AOBcIa4TxA41p6HwBCfRzd5U+Ob4Nat0NIb1A0wVRFKk+E683R4DoL3cFFOuX nN+T6bsCgN5ymQCBEwy1rcvmUWe7fXRpSwjNSNXo3DQGMpso403RWDA4ni89WmU8nvUA a8SnZSya1bHIpBoFyZvE8WrWiG/FNN6C2cmlfHXi18YTC9el+/LDFnQk07sxnUjwBDzU Q5HNZC3mDemMyvOo76vsVTy5sXfaVOhObDKTNel7+eiyfDkOwzMmkgd9RCThFc3iIkIk iZt5iFVWtGRTG4AkC0/ii/oQpcq4k7D5nOymu4OJbHFEjrY2mbmrhe5c0ptdnj+Dh6cW 1tYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=maP8YXhB08F9LY5OG0jMprTbidCF0YS16nloYI5WUaA=; fh=10DftjpjJz8SI/CRvjefgPVRZU7+vGy87QAWHml6ct4=; b=UQgG0PH+5PtWUvtwgbIg0mKi8pNQb8Idy4QlO2Pngzxuz5eZkcXdKtmhToNfN6HJzL Hi7U6mkt6Dgo4DM5ZJwuidnS/kucNoVb2naV+jIxsmUoBNTH6toyQg/tmD9OurrVI5VB UOrVluLx2gKkNQeTK42QhQEmZOttS83y7sRDWj0KVzv4xAcDWGgJzAd8VY/DrxNhX0/8 N0MGnW/RhPMrIooQWbzFZHLZPAncBN2kGiWfhJ5xsbON7gPD4fiUu0lwnMtXYfkp1OKu O0+c1QSwY8d3J5zyla64C1PlQvulfok/WRUhcL2kW0p+SfFNbCr7DaB8dZbRL9LCABcd sOWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=jPMGIykJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id eh7-20020a056a00808700b0068e26b4cd71si4629454pfb.179.2023.09.22.16.47.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 16:47:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=jPMGIykJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 4F1AF82A8372; Fri, 22 Sep 2023 10:33:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233244AbjIVRcv (ORCPT <rfc822;pwkd43@gmail.com> + 28 others); Fri, 22 Sep 2023 13:32:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232910AbjIVRcd (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 22 Sep 2023 13:32:33 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA92A1B2 for <linux-kernel@vger.kernel.org>; Fri, 22 Sep 2023 10:32:17 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-274dd099cd5so1798188a91.3 for <linux-kernel@vger.kernel.org>; Fri, 22 Sep 2023 10:32:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1695403937; x=1696008737; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=maP8YXhB08F9LY5OG0jMprTbidCF0YS16nloYI5WUaA=; b=jPMGIykJNivSzumkyPyfRksE80LIgODcWlNzZ0+aEgWRJvP41S1k8emA8EOw8WVeR/ cGoAG6ZpZcL54uv4D5sEFw3p8xT5zzuJcXyq5P4Cap63VExYlV4ZGUv14bkbPyHk8YG3 Yg9hHCz4rbId2iwFvqSSLEeZnjbNd9ekxCfVU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695403937; x=1696008737; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=maP8YXhB08F9LY5OG0jMprTbidCF0YS16nloYI5WUaA=; b=UNXqixh73bYKdC88wpBUQdHMPXY4COrXM/hFDPxXpQeUzPv/nzN2Awvyy4uYj3Bd1v GdmaV01lYAhbTmBb9m4Ff90tH2lkMoMday+N2O8UCCxiNqafuaSB80eWe9MYCKqYwt9E PzlRfNkCPSmHPhvC3+1qBLJmkc2z48Pb1H60M5dAS9PFb7fIeM2q82BdnNGl1plXNP9F DfRYbuc+yKTybHbViFW92LHMoJCNfhHLtRson6PnlT5FJp4ULRFyUnJ08dYB97pyi6IY b4cLlq+ooqMeOYo8Zts1vAW7bmuIAVUHgQm5zF+4I4h6dTklCMdlyih7vcXC1Gi+Wts7 gMxQ== X-Gm-Message-State: AOJu0Yxf8nzhK+9sRK7bhlqfWUP3s9afXqVfjny+4HMwfkUFHYhnxw5T wpDmetQExJwqrJIbVgO77dydjA== X-Received: by 2002:a17:90b:2247:b0:271:c314:a591 with SMTP id hk7-20020a17090b224700b00271c314a591mr349153pjb.47.1695403937438; Fri, 22 Sep 2023 10:32:17 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id n20-20020a17090a929400b00274ea190852sm3464464pjo.6.2023.09.22.10.32.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 10:32:17 -0700 (PDT) From: Kees Cook <keescook@chromium.org> To: David Airlie <airlied@gmail.com> Cc: Kees Cook <keescook@chromium.org>, Emma Anholt <emma@anholt.net>, Evan Quan <evan.quan@amd.com>, Alex Deucher <alexander.deucher@amd.com>, =?utf-8?q?Christian_K=C3=B6nig?= <christian.koenig@amd.com>, "Pan, Xinhui" <Xinhui.Pan@amd.com>, Daniel Vetter <daniel@ffwll.ch>, Xiaojian Du <Xiaojian.Du@amd.com>, Huang Rui <ray.huang@amd.com>, Kevin Wang <kevin1.wang@amd.com>, Hawking Zhang <Hawking.Zhang@amd.com>, Jani Nikula <jani.nikula@linux.intel.com>, Joonas Lahtinen <joonas.lahtinen@linux.intel.com>, Rodrigo Vivi <rodrigo.vivi@intel.com>, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>, Chris Wilson <chris@chris-wilson.co.uk>, John Harrison <john.c.harrison@Intel.com>, Andi Shyti <andi.shyti@linux.intel.com>, Matthew Brost <matthew.brost@intel.com>, Rob Clark <robdclark@gmail.com>, Abhinav Kumar <quic_abhinavk@quicinc.com>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Sean Paul <sean@poorly.run>, Marijn Suijten <marijn.suijten@somainline.org>, Bjorn Andersson <andersson@kernel.org>, Ben Skeggs <bskeggs@redhat.com>, Karol Herbst <kherbst@redhat.com>, Lyude Paul <lyude@redhat.com>, Maxime Ripard <mripard@kernel.org>, David Airlie <airlied@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, Gurchetan Singh <gurchetansingh@chromium.org>, Chia-I Wu <olvaffe@gmail.com>, Zack Rusin <zackr@vmware.com>, VMware Graphics Reviewers <linux-graphics-maintainer@vmware.com>, Melissa Wen <mwen@igalia.com>, Nathan Chancellor <nathan@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, Tom Rix <trix@redhat.com>, Le Ma <le.ma@amd.com>, Lijo Lazar <lijo.lazar@amd.com>, Yifan Zhang <yifan1.zhang@amd.com>, Prike Liang <Prike.Liang@amd.com>, Lang Yu <Lang.Yu@amd.com>, Tejas Upadhyay <tejas.upadhyay@intel.com>, Nirmoy Das <nirmoy.das@intel.com>, Andrzej Hajda <andrzej.hajda@intel.com>, Neil Armstrong <neil.armstrong@linaro.org>, Kuogee Hsieh <quic_khsieh@quicinc.com>, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, nouveau@lists.freedesktop.org, virtualization@lists.linux-foundation.org, llvm@lists.linux.dev, linux-hardening@vger.kernel.org Subject: [PATCH 0/9] drm: Annotate structs with __counted_by Date: Fri, 22 Sep 2023 10:32:05 -0700 Message-Id: <20230922173110.work.084-kees@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Developer-Signature: v=1; a=openpgp-sha256; l=2029; i=keescook@chromium.org; h=from:subject:message-id; bh=YV47XR+Dr1NybdP/JWrsHmoQYKkqVQbnuP88RsqPU7s=; b=owEBbQKS/ZANAwAKAYly9N/cbcAmAcsmYgBlDc+dsj3+Vh5qemjuEPg29sGFlFmzA+yi/v3Rh XtvZqOfqaGJAjMEAAEKAB0WIQSlw/aPIp3WD3I+bhOJcvTf3G3AJgUCZQ3PnQAKCRCJcvTf3G3A JiHwEACLzTcgywMl1i+ngflg0YluRoEeJQAxOBHxuE5H6DZMdzVg2q1O7AYcZvuFgGEob07505+ PzEtpDzTZH/46SXLgI4Sgl0XmudzghRjlp0XTK1UC22xnOBNM9k0OIJif5wStFA/0uiZLRrHII7 A/+AqzgBiY88gBa4O+x8Vj0+JBJGnDCr0QudEO6XyIcvvmLLgiRCce78vOKBXTXq6Dktknkayr7 GSRsmx3ZTid9GiUDFYYu7/JLETFdk3ZPoT0iX6O1OocWU9VVd8IE71u38u38X+AdokHQtuEXbCe GXNdGJrLV9VqJ6qvypVr3S1EhagL/Z+f7Xz/GMY6nMu+6H9YM0Nbh7PQ8fyD/y9rlT2jcsSJY3r eqE3X+ATIdov/4puub/Z5OUm9R4z3dXWHGfnc/vb5l24ZPzLfhFdjlnbl4LYKnZyxK/lH0OGSkH 9Wks6MuSdRE+bNJFV0VibfzZlV0+wemFXXSlAxxVQGcZ7CWgQaV2w7wE1Y3AMJLRthOuVUU6Kts VfGI7p8XZRScEI6mnWSh8w9zLZOftTtdiCxcVj1gdXRTx2/K3Xfv0UkoHgdzOBqTTEPqGetCOjs WS30PIjoUXxpO+DRvCTjySDsnQXksC7AsjBRhvnXyIR8tgFSEAywP6FcLYaX3ltdG79BvgAkkzq Bs7QmlF kGRGYttQ== X-Developer-Key: i=keescook@chromium.org; a=openpgp; fpr=A5C3F68F229DD60F723E6E138972F4DFDC6DC026 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 22 Sep 2023 10:33:06 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777783506876192779 X-GMAIL-MSGID: 1777783506876192779 |
Series |
drm: Annotate structs with __counted_by
|
|
Message
Kees Cook
Sept. 22, 2023, 5:32 p.m. UTC
Hi, This is a batch of patches touching drm for preparing for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). As found with Coccinelle[1], add __counted_by to structs that would benefit from the annotation. Since the element count member must be set before accessing the annotated flexible array member, some patches also move the member's initialization earlier. (These are noted in the individual patches.) -Kees [1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci Kees Cook (9): drm/amd/pm: Annotate struct smu10_voltage_dependency_table with __counted_by drm/amdgpu/discovery: Annotate struct ip_hw_instance with __counted_by drm/i915/selftests: Annotate struct perf_series with __counted_by drm/msm/dpu: Annotate struct dpu_hw_intr with __counted_by drm/nouveau/pm: Annotate struct nvkm_perfdom with __counted_by drm/vc4: Annotate struct vc4_perfmon with __counted_by drm/virtio: Annotate struct virtio_gpu_object_array with __counted_by drm/vmwgfx: Annotate struct vmw_surface_dirty with __counted_by drm/v3d: Annotate struct v3d_perfmon with __counted_by drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 +- drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.h | 2 +- drivers/gpu/drm/i915/selftests/i915_request.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/pm/priv.h | 2 +- drivers/gpu/drm/v3d/v3d_drv.h | 2 +- drivers/gpu/drm/vc4/vc4_drv.h | 2 +- drivers/gpu/drm/virtio/virtgpu_drv.h | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-)
Comments
On Fri, 2023-09-22 at 10:32 -0700, Kees Cook wrote: > Prepare for the coming implementation by GCC and Clang of the __counted_by > attribute. Flexible array members annotated with __counted_by can have > their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS > (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family > functions). > > As found with Coccinelle[1], add __counted_by for struct vmw_surface_dirty. > > [1] > https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci > > Cc: Zack Rusin <zackr@vmware.com> > Cc: VMware Graphics Reviewers <linux-graphics-maintainer@vmware.com> > Cc: David Airlie <airlied@gmail.com> > Cc: Daniel Vetter <daniel@ffwll.ch> > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Kees Cook <keescook@chromium.org> > --- > drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c > b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c > index 5db403ee8261..2d1d857f99ae 100644 > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c > @@ -77,7 +77,7 @@ struct vmw_surface_offset { > struct vmw_surface_dirty { > struct vmw_surface_cache cache; > u32 num_subres; > - SVGA3dBox boxes[]; > + SVGA3dBox boxes[] __counted_by(num_subres); > }; > > static void vmw_user_surface_free(struct vmw_resource *res); Thanks! Reviewed-by: Zack Rusin <zackr@vmware.com>
On 9/22/23 11:32, Kees Cook wrote: > Prepare for the coming implementation by GCC and Clang of the __counted_by > attribute. Flexible array members annotated with __counted_by can have > their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS > (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family > functions). > > As found with Coccinelle[1], add __counted_by for struct vc4_perfmon. > > [1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci > > Cc: Emma Anholt <emma@anholt.net> > Cc: Maxime Ripard <mripard@kernel.org> > Cc: David Airlie <airlied@gmail.com> > Cc: Daniel Vetter <daniel@ffwll.ch> > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Thanks
On Fri, 22 Sep 2023 10:32:05 -0700, Kees Cook wrote: > This is a batch of patches touching drm for preparing for the coming > implementation by GCC and Clang of the __counted_by attribute. Flexible > array members annotated with __counted_by can have their accesses > bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array > indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). > > As found with Coccinelle[1], add __counted_by to structs that would > benefit from the annotation. > > [...] Since this got Acks, I figure I should carry it in my tree. Let me know if this should go via drm instead. Applied to for-next/hardening, thanks! [1/9] drm/amd/pm: Annotate struct smu10_voltage_dependency_table with __counted_by https://git.kernel.org/kees/c/a6046ac659d6 [2/9] drm/amdgpu/discovery: Annotate struct ip_hw_instance with __counted_by https://git.kernel.org/kees/c/4df33089b46f [3/9] drm/i915/selftests: Annotate struct perf_series with __counted_by https://git.kernel.org/kees/c/ffd3f823bdf6 [4/9] drm/msm/dpu: Annotate struct dpu_hw_intr with __counted_by https://git.kernel.org/kees/c/2de35a989b76 [5/9] drm/nouveau/pm: Annotate struct nvkm_perfdom with __counted_by https://git.kernel.org/kees/c/188aeb08bfaa [6/9] drm/vc4: Annotate struct vc4_perfmon with __counted_by https://git.kernel.org/kees/c/59a54dc896c3 [7/9] drm/virtio: Annotate struct virtio_gpu_object_array with __counted_by https://git.kernel.org/kees/c/5cd476de33af [8/9] drm/vmwgfx: Annotate struct vmw_surface_dirty with __counted_by https://git.kernel.org/kees/c/b426f2e5356a [9/9] drm/v3d: Annotate struct v3d_perfmon with __counted_by https://git.kernel.org/kees/c/dc662fa1b0e4 Take care,
Am 29.09.23 um 21:33 schrieb Kees Cook: > On Fri, 22 Sep 2023 10:32:05 -0700, Kees Cook wrote: >> This is a batch of patches touching drm for preparing for the coming >> implementation by GCC and Clang of the __counted_by attribute. Flexible >> array members annotated with __counted_by can have their accesses >> bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array >> indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). >> >> As found with Coccinelle[1], add __counted_by to structs that would >> benefit from the annotation. >> >> [...] > Since this got Acks, I figure I should carry it in my tree. Let me know > if this should go via drm instead. > > Applied to for-next/hardening, thanks! > > [1/9] drm/amd/pm: Annotate struct smu10_voltage_dependency_table with __counted_by > https://git.kernel.org/kees/c/a6046ac659d6 STOP! In a follow up discussion Alex and I figured out that this won't work. The value in the structure is byte swapped based on some firmware endianness which not necessary matches the CPU endianness. Please revert that one from going upstream if it's already on it's way. And because of those reasons I strongly think that patches like this should go through the DRM tree :) Regards, Christian. > [2/9] drm/amdgpu/discovery: Annotate struct ip_hw_instance with __counted_by > https://git.kernel.org/kees/c/4df33089b46f > [3/9] drm/i915/selftests: Annotate struct perf_series with __counted_by > https://git.kernel.org/kees/c/ffd3f823bdf6 > [4/9] drm/msm/dpu: Annotate struct dpu_hw_intr with __counted_by > https://git.kernel.org/kees/c/2de35a989b76 > [5/9] drm/nouveau/pm: Annotate struct nvkm_perfdom with __counted_by > https://git.kernel.org/kees/c/188aeb08bfaa > [6/9] drm/vc4: Annotate struct vc4_perfmon with __counted_by > https://git.kernel.org/kees/c/59a54dc896c3 > [7/9] drm/virtio: Annotate struct virtio_gpu_object_array with __counted_by > https://git.kernel.org/kees/c/5cd476de33af > [8/9] drm/vmwgfx: Annotate struct vmw_surface_dirty with __counted_by > https://git.kernel.org/kees/c/b426f2e5356a > [9/9] drm/v3d: Annotate struct v3d_perfmon with __counted_by > https://git.kernel.org/kees/c/dc662fa1b0e4 > > Take care, >
On Mon, Oct 2, 2023 at 5:20 AM Christian König <ckoenig.leichtzumerken@gmail.com> wrote: > > Am 29.09.23 um 21:33 schrieb Kees Cook: > > On Fri, 22 Sep 2023 10:32:05 -0700, Kees Cook wrote: > >> This is a batch of patches touching drm for preparing for the coming > >> implementation by GCC and Clang of the __counted_by attribute. Flexible > >> array members annotated with __counted_by can have their accesses > >> bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array > >> indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). > >> > >> As found with Coccinelle[1], add __counted_by to structs that would > >> benefit from the annotation. > >> > >> [...] > > Since this got Acks, I figure I should carry it in my tree. Let me know > > if this should go via drm instead. > > > > Applied to for-next/hardening, thanks! > > > > [1/9] drm/amd/pm: Annotate struct smu10_voltage_dependency_table with __counted_by > > https://git.kernel.org/kees/c/a6046ac659d6 > > STOP! In a follow up discussion Alex and I figured out that this won't work. > > The value in the structure is byte swapped based on some firmware > endianness which not necessary matches the CPU endianness. SMU10 is APU only so the endianess of the SMU firmware and the CPU will always match. Alex > > Please revert that one from going upstream if it's already on it's way. > > And because of those reasons I strongly think that patches like this > should go through the DRM tree :) > > Regards, > Christian. > > > [2/9] drm/amdgpu/discovery: Annotate struct ip_hw_instance with __counted_by > > https://git.kernel.org/kees/c/4df33089b46f > > [3/9] drm/i915/selftests: Annotate struct perf_series with __counted_by > > https://git.kernel.org/kees/c/ffd3f823bdf6 > > [4/9] drm/msm/dpu: Annotate struct dpu_hw_intr with __counted_by > > https://git.kernel.org/kees/c/2de35a989b76 > > [5/9] drm/nouveau/pm: Annotate struct nvkm_perfdom with __counted_by > > https://git.kernel.org/kees/c/188aeb08bfaa > > [6/9] drm/vc4: Annotate struct vc4_perfmon with __counted_by > > https://git.kernel.org/kees/c/59a54dc896c3 > > [7/9] drm/virtio: Annotate struct virtio_gpu_object_array with __counted_by > > https://git.kernel.org/kees/c/5cd476de33af > > [8/9] drm/vmwgfx: Annotate struct vmw_surface_dirty with __counted_by > > https://git.kernel.org/kees/c/b426f2e5356a > > [9/9] drm/v3d: Annotate struct v3d_perfmon with __counted_by > > https://git.kernel.org/kees/c/dc662fa1b0e4 > > > > Take care, > > >
On Mon, Oct 02, 2023 at 11:06:19AM -0400, Alex Deucher wrote: > On Mon, Oct 2, 2023 at 5:20 AM Christian König > <ckoenig.leichtzumerken@gmail.com> wrote: > > > > Am 29.09.23 um 21:33 schrieb Kees Cook: > > > On Fri, 22 Sep 2023 10:32:05 -0700, Kees Cook wrote: > > >> This is a batch of patches touching drm for preparing for the coming > > >> implementation by GCC and Clang of the __counted_by attribute. Flexible > > >> array members annotated with __counted_by can have their accesses > > >> bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array > > >> indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). > > >> > > >> As found with Coccinelle[1], add __counted_by to structs that would > > >> benefit from the annotation. > > >> > > >> [...] > > > Since this got Acks, I figure I should carry it in my tree. Let me know > > > if this should go via drm instead. > > > > > > Applied to for-next/hardening, thanks! > > > > > > [1/9] drm/amd/pm: Annotate struct smu10_voltage_dependency_table with __counted_by > > > https://git.kernel.org/kees/c/a6046ac659d6 > > > > STOP! In a follow up discussion Alex and I figured out that this won't work. I'm so confused; from the discussion I saw that Alex said both instances were false positives? > > > > The value in the structure is byte swapped based on some firmware > > endianness which not necessary matches the CPU endianness. > > SMU10 is APU only so the endianess of the SMU firmware and the CPU > will always match. Which I think is what is being said here? > > Please revert that one from going upstream if it's already on it's way. > > > > And because of those reasons I strongly think that patches like this > > should go through the DRM tree :) Sure, that's fine -- please let me know. It was others Acked/etc. Who should carry these patches? Thanks! -Kees > > > > Regards, > > Christian. > > > > > [2/9] drm/amdgpu/discovery: Annotate struct ip_hw_instance with __counted_by > > > https://git.kernel.org/kees/c/4df33089b46f > > > [3/9] drm/i915/selftests: Annotate struct perf_series with __counted_by > > > https://git.kernel.org/kees/c/ffd3f823bdf6 > > > [4/9] drm/msm/dpu: Annotate struct dpu_hw_intr with __counted_by > > > https://git.kernel.org/kees/c/2de35a989b76 > > > [5/9] drm/nouveau/pm: Annotate struct nvkm_perfdom with __counted_by > > > https://git.kernel.org/kees/c/188aeb08bfaa > > > [6/9] drm/vc4: Annotate struct vc4_perfmon with __counted_by > > > https://git.kernel.org/kees/c/59a54dc896c3 > > > [7/9] drm/virtio: Annotate struct virtio_gpu_object_array with __counted_by > > > https://git.kernel.org/kees/c/5cd476de33af > > > [8/9] drm/vmwgfx: Annotate struct vmw_surface_dirty with __counted_by > > > https://git.kernel.org/kees/c/b426f2e5356a > > > [9/9] drm/v3d: Annotate struct v3d_perfmon with __counted_by > > > https://git.kernel.org/kees/c/dc662fa1b0e4 > > > > > > Take care, > > > > >
Am 02.10.23 um 18:53 schrieb Kees Cook: > On Mon, Oct 02, 2023 at 11:06:19AM -0400, Alex Deucher wrote: >> On Mon, Oct 2, 2023 at 5:20 AM Christian König >> <ckoenig.leichtzumerken@gmail.com> wrote: >>> Am 29.09.23 um 21:33 schrieb Kees Cook: >>>> On Fri, 22 Sep 2023 10:32:05 -0700, Kees Cook wrote: >>>>> This is a batch of patches touching drm for preparing for the coming >>>>> implementation by GCC and Clang of the __counted_by attribute. Flexible >>>>> array members annotated with __counted_by can have their accesses >>>>> bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array >>>>> indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). >>>>> >>>>> As found with Coccinelle[1], add __counted_by to structs that would >>>>> benefit from the annotation. >>>>> >>>>> [...] >>>> Since this got Acks, I figure I should carry it in my tree. Let me know >>>> if this should go via drm instead. >>>> >>>> Applied to for-next/hardening, thanks! >>>> >>>> [1/9] drm/amd/pm: Annotate struct smu10_voltage_dependency_table with __counted_by >>>> https://git.kernel.org/kees/c/a6046ac659d6 >>> STOP! In a follow up discussion Alex and I figured out that this won't work. > I'm so confused; from the discussion I saw that Alex said both instances > were false positives? > >>> The value in the structure is byte swapped based on some firmware >>> endianness which not necessary matches the CPU endianness. >> SMU10 is APU only so the endianess of the SMU firmware and the CPU >> will always match. > Which I think is what is being said here? > >>> Please revert that one from going upstream if it's already on it's way. >>> >>> And because of those reasons I strongly think that patches like this >>> should go through the DRM tree :) > Sure, that's fine -- please let me know. It was others Acked/etc. Who > should carry these patches? Probably best if the relevant maintainer pick them up individually. Some of those structures are filled in by firmware/hardware and only the maintainers can judge if that value actually matches what the compiler needs. We have cases where individual bits are used as flags or when the size is byte swapped etc... Even Alex and I didn't immediately say how and where that field is actually used and had to dig that up. That's where the confusion came from. Regards, Christian. > > Thanks! > > -Kees > > >>> Regards, >>> Christian. >>> >>>> [2/9] drm/amdgpu/discovery: Annotate struct ip_hw_instance with __counted_by >>>> https://git.kernel.org/kees/c/4df33089b46f >>>> [3/9] drm/i915/selftests: Annotate struct perf_series with __counted_by >>>> https://git.kernel.org/kees/c/ffd3f823bdf6 >>>> [4/9] drm/msm/dpu: Annotate struct dpu_hw_intr with __counted_by >>>> https://git.kernel.org/kees/c/2de35a989b76 >>>> [5/9] drm/nouveau/pm: Annotate struct nvkm_perfdom with __counted_by >>>> https://git.kernel.org/kees/c/188aeb08bfaa >>>> [6/9] drm/vc4: Annotate struct vc4_perfmon with __counted_by >>>> https://git.kernel.org/kees/c/59a54dc896c3 >>>> [7/9] drm/virtio: Annotate struct virtio_gpu_object_array with __counted_by >>>> https://git.kernel.org/kees/c/5cd476de33af >>>> [8/9] drm/vmwgfx: Annotate struct vmw_surface_dirty with __counted_by >>>> https://git.kernel.org/kees/c/b426f2e5356a >>>> [9/9] drm/v3d: Annotate struct v3d_perfmon with __counted_by >>>> https://git.kernel.org/kees/c/dc662fa1b0e4 >>>> >>>> Take care, >>>>
On Mon, Oct 02, 2023 at 08:01:57PM +0200, Christian König wrote: > Am 02.10.23 um 18:53 schrieb Kees Cook: > > On Mon, Oct 02, 2023 at 11:06:19AM -0400, Alex Deucher wrote: > > > On Mon, Oct 2, 2023 at 5:20 AM Christian König > > > <ckoenig.leichtzumerken@gmail.com> wrote: > > > > Am 29.09.23 um 21:33 schrieb Kees Cook: > > > > > On Fri, 22 Sep 2023 10:32:05 -0700, Kees Cook wrote: > > > > > > This is a batch of patches touching drm for preparing for the coming > > > > > > implementation by GCC and Clang of the __counted_by attribute. Flexible > > > > > > array members annotated with __counted_by can have their accesses > > > > > > bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array > > > > > > indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). > > > > > > > > > > > > As found with Coccinelle[1], add __counted_by to structs that would > > > > > > benefit from the annotation. > > > > > > > > > > > > [...] > > > > > Since this got Acks, I figure I should carry it in my tree. Let me know > > > > > if this should go via drm instead. > > > > > > > > > > Applied to for-next/hardening, thanks! > > > > > > > > > > [1/9] drm/amd/pm: Annotate struct smu10_voltage_dependency_table with __counted_by > > > > > https://git.kernel.org/kees/c/a6046ac659d6 > > > > STOP! In a follow up discussion Alex and I figured out that this won't work. > > I'm so confused; from the discussion I saw that Alex said both instances > > were false positives? > > > > > > The value in the structure is byte swapped based on some firmware > > > > endianness which not necessary matches the CPU endianness. > > > SMU10 is APU only so the endianess of the SMU firmware and the CPU > > > will always match. > > Which I think is what is being said here? > > > > > > Please revert that one from going upstream if it's already on it's way. > > > > > > > > And because of those reasons I strongly think that patches like this > > > > should go through the DRM tree :) > > Sure, that's fine -- please let me know. It was others Acked/etc. Who > > should carry these patches? > > Probably best if the relevant maintainer pick them up individually. > > Some of those structures are filled in by firmware/hardware and only the > maintainers can judge if that value actually matches what the compiler > needs. > > We have cases where individual bits are used as flags or when the size is > byte swapped etc... > > Even Alex and I didn't immediately say how and where that field is actually > used and had to dig that up. That's where the confusion came from. Okay, I've dropped them all from my tree. Several had Acks/Reviews, so hopefully those can get picked up for the DRM tree? Thanks! -Kees
Am 02.10.23 um 20:08 schrieb Kees Cook: > On Mon, Oct 02, 2023 at 08:01:57PM +0200, Christian König wrote: >> Am 02.10.23 um 18:53 schrieb Kees Cook: >>> On Mon, Oct 02, 2023 at 11:06:19AM -0400, Alex Deucher wrote: >>>> On Mon, Oct 2, 2023 at 5:20 AM Christian König >>>> <ckoenig.leichtzumerken@gmail.com> wrote: >>>>> Am 29.09.23 um 21:33 schrieb Kees Cook: >>>>>> On Fri, 22 Sep 2023 10:32:05 -0700, Kees Cook wrote: >>>>>>> This is a batch of patches touching drm for preparing for the coming >>>>>>> implementation by GCC and Clang of the __counted_by attribute. Flexible >>>>>>> array members annotated with __counted_by can have their accesses >>>>>>> bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array >>>>>>> indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). >>>>>>> >>>>>>> As found with Coccinelle[1], add __counted_by to structs that would >>>>>>> benefit from the annotation. >>>>>>> >>>>>>> [...] >>>>>> Since this got Acks, I figure I should carry it in my tree. Let me know >>>>>> if this should go via drm instead. >>>>>> >>>>>> Applied to for-next/hardening, thanks! >>>>>> >>>>>> [1/9] drm/amd/pm: Annotate struct smu10_voltage_dependency_table with __counted_by >>>>>> https://git.kernel.org/kees/c/a6046ac659d6 >>>>> STOP! In a follow up discussion Alex and I figured out that this won't work. >>> I'm so confused; from the discussion I saw that Alex said both instances >>> were false positives? >>> >>>>> The value in the structure is byte swapped based on some firmware >>>>> endianness which not necessary matches the CPU endianness. >>>> SMU10 is APU only so the endianess of the SMU firmware and the CPU >>>> will always match. >>> Which I think is what is being said here? >>> >>>>> Please revert that one from going upstream if it's already on it's way. >>>>> >>>>> And because of those reasons I strongly think that patches like this >>>>> should go through the DRM tree :) >>> Sure, that's fine -- please let me know. It was others Acked/etc. Who >>> should carry these patches? >> Probably best if the relevant maintainer pick them up individually. >> >> Some of those structures are filled in by firmware/hardware and only the >> maintainers can judge if that value actually matches what the compiler >> needs. >> >> We have cases where individual bits are used as flags or when the size is >> byte swapped etc... >> >> Even Alex and I didn't immediately say how and where that field is actually >> used and had to dig that up. That's where the confusion came from. > Okay, I've dropped them all from my tree. Several had Acks/Reviews, so > hopefully those can get picked up for the DRM tree? I will pick those up to go through drm-misc-next. Going to ping maintainers once more when I'm not sure if stuff is correct or not. Christian. > > Thanks! > > -Kees >
On Mon, Oct 02, 2023 at 08:11:41PM +0200, Christian König wrote: > Am 02.10.23 um 20:08 schrieb Kees Cook: > > On Mon, Oct 02, 2023 at 08:01:57PM +0200, Christian König wrote: > > > Am 02.10.23 um 18:53 schrieb Kees Cook: > > > > On Mon, Oct 02, 2023 at 11:06:19AM -0400, Alex Deucher wrote: > > > > > On Mon, Oct 2, 2023 at 5:20 AM Christian König > > > > > <ckoenig.leichtzumerken@gmail.com> wrote: > > > > > > Am 29.09.23 um 21:33 schrieb Kees Cook: > > > > > > > On Fri, 22 Sep 2023 10:32:05 -0700, Kees Cook wrote: > > > > > > > > This is a batch of patches touching drm for preparing for the coming > > > > > > > > implementation by GCC and Clang of the __counted_by attribute. Flexible > > > > > > > > array members annotated with __counted_by can have their accesses > > > > > > > > bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array > > > > > > > > indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). > > > > > > > > > > > > > > > > As found with Coccinelle[1], add __counted_by to structs that would > > > > > > > > benefit from the annotation. > > > > > > > > > > > > > > > > [...] > > > > > > > Since this got Acks, I figure I should carry it in my tree. Let me know > > > > > > > if this should go via drm instead. > > > > > > > > > > > > > > Applied to for-next/hardening, thanks! > > > > > > > > > > > > > > [1/9] drm/amd/pm: Annotate struct smu10_voltage_dependency_table with __counted_by > > > > > > > https://git.kernel.org/kees/c/a6046ac659d6 > > > > > > STOP! In a follow up discussion Alex and I figured out that this won't work. > > > > I'm so confused; from the discussion I saw that Alex said both instances > > > > were false positives? > > > > > > > > > > The value in the structure is byte swapped based on some firmware > > > > > > endianness which not necessary matches the CPU endianness. > > > > > SMU10 is APU only so the endianess of the SMU firmware and the CPU > > > > > will always match. > > > > Which I think is what is being said here? > > > > > > > > > > Please revert that one from going upstream if it's already on it's way. > > > > > > > > > > > > And because of those reasons I strongly think that patches like this > > > > > > should go through the DRM tree :) > > > > Sure, that's fine -- please let me know. It was others Acked/etc. Who > > > > should carry these patches? > > > Probably best if the relevant maintainer pick them up individually. > > > > > > Some of those structures are filled in by firmware/hardware and only the > > > maintainers can judge if that value actually matches what the compiler > > > needs. > > > > > > We have cases where individual bits are used as flags or when the size is > > > byte swapped etc... > > > > > > Even Alex and I didn't immediately say how and where that field is actually > > > used and had to dig that up. That's where the confusion came from. > > Okay, I've dropped them all from my tree. Several had Acks/Reviews, so > > hopefully those can get picked up for the DRM tree? > > I will pick those up to go through drm-misc-next. > > Going to ping maintainers once more when I'm not sure if stuff is correct or > not. Sounds great; thanks! -Kees
Am 02.10.23 um 20:22 schrieb Kees Cook: > On Mon, Oct 02, 2023 at 08:11:41PM +0200, Christian König wrote: >> Am 02.10.23 um 20:08 schrieb Kees Cook: >>> On Mon, Oct 02, 2023 at 08:01:57PM +0200, Christian König wrote: >>>> Am 02.10.23 um 18:53 schrieb Kees Cook: >>>>> On Mon, Oct 02, 2023 at 11:06:19AM -0400, Alex Deucher wrote: >>>>>> On Mon, Oct 2, 2023 at 5:20 AM Christian König >>>>>> <ckoenig.leichtzumerken@gmail.com> wrote: >>>>>>> Am 29.09.23 um 21:33 schrieb Kees Cook: >>>>>>>> On Fri, 22 Sep 2023 10:32:05 -0700, Kees Cook wrote: >>>>>>>>> This is a batch of patches touching drm for preparing for the coming >>>>>>>>> implementation by GCC and Clang of the __counted_by attribute. Flexible >>>>>>>>> array members annotated with __counted_by can have their accesses >>>>>>>>> bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array >>>>>>>>> indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). >>>>>>>>> >>>>>>>>> As found with Coccinelle[1], add __counted_by to structs that would >>>>>>>>> benefit from the annotation. >>>>>>>>> >>>>>>>>> [...] >>>>>>>> Since this got Acks, I figure I should carry it in my tree. Let me know >>>>>>>> if this should go via drm instead. >>>>>>>> >>>>>>>> Applied to for-next/hardening, thanks! >>>>>>>> >>>>>>>> [1/9] drm/amd/pm: Annotate struct smu10_voltage_dependency_table with __counted_by >>>>>>>> https://git.kernel.org/kees/c/a6046ac659d6 >>>>>>> STOP! In a follow up discussion Alex and I figured out that this won't work. >>>>> I'm so confused; from the discussion I saw that Alex said both instances >>>>> were false positives? >>>>> >>>>>>> The value in the structure is byte swapped based on some firmware >>>>>>> endianness which not necessary matches the CPU endianness. >>>>>> SMU10 is APU only so the endianess of the SMU firmware and the CPU >>>>>> will always match. >>>>> Which I think is what is being said here? >>>>> >>>>>>> Please revert that one from going upstream if it's already on it's way. >>>>>>> >>>>>>> And because of those reasons I strongly think that patches like this >>>>>>> should go through the DRM tree :) >>>>> Sure, that's fine -- please let me know. It was others Acked/etc. Who >>>>> should carry these patches? >>>> Probably best if the relevant maintainer pick them up individually. >>>> >>>> Some of those structures are filled in by firmware/hardware and only the >>>> maintainers can judge if that value actually matches what the compiler >>>> needs. >>>> >>>> We have cases where individual bits are used as flags or when the size is >>>> byte swapped etc... >>>> >>>> Even Alex and I didn't immediately say how and where that field is actually >>>> used and had to dig that up. That's where the confusion came from. >>> Okay, I've dropped them all from my tree. Several had Acks/Reviews, so >>> hopefully those can get picked up for the DRM tree? >> I will pick those up to go through drm-misc-next. >> >> Going to ping maintainers once more when I'm not sure if stuff is correct or >> not. > Sounds great; thanks! I wasn't 100% sure for the VC4 patch, but pushed the whole set to drm-misc-next anyway. This also means that the patches are now auto merged into the drm-tip integration branch and should any build or unit test go boom we should notice immediately and can revert it pretty easily. Thanks, Christian. > > -Kees >
On Thu, Oct 05, 2023 at 11:42:38AM +0200, Christian König wrote: > Am 02.10.23 um 20:22 schrieb Kees Cook: > > On Mon, Oct 02, 2023 at 08:11:41PM +0200, Christian König wrote: > > > Am 02.10.23 um 20:08 schrieb Kees Cook: > > > > On Mon, Oct 02, 2023 at 08:01:57PM +0200, Christian König wrote: > > > > > Am 02.10.23 um 18:53 schrieb Kees Cook: > > > > > > On Mon, Oct 02, 2023 at 11:06:19AM -0400, Alex Deucher wrote: > > > > > > > On Mon, Oct 2, 2023 at 5:20 AM Christian König > > > > > > > <ckoenig.leichtzumerken@gmail.com> wrote: > > > > > > > > Am 29.09.23 um 21:33 schrieb Kees Cook: > > > > > > > > > On Fri, 22 Sep 2023 10:32:05 -0700, Kees Cook wrote: > > > > > > > > > > This is a batch of patches touching drm for preparing for the coming > > > > > > > > > > implementation by GCC and Clang of the __counted_by attribute. Flexible > > > > > > > > > > array members annotated with __counted_by can have their accesses > > > > > > > > > > bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array > > > > > > > > > > indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). > > > > > > > > > > > > > > > > > > > > As found with Coccinelle[1], add __counted_by to structs that would > > > > > > > > > > benefit from the annotation. > > > > > > > > > > > > > > > > > > > > [...] > > > > > > > > > Since this got Acks, I figure I should carry it in my tree. Let me know > > > > > > > > > if this should go via drm instead. > > > > > > > > > > > > > > > > > > Applied to for-next/hardening, thanks! > > > > > > > > > > > > > > > > > > [1/9] drm/amd/pm: Annotate struct smu10_voltage_dependency_table with __counted_by > > > > > > > > > https://git.kernel.org/kees/c/a6046ac659d6 > > > > > > > > STOP! In a follow up discussion Alex and I figured out that this won't work. > > > > > > I'm so confused; from the discussion I saw that Alex said both instances > > > > > > were false positives? > > > > > > > > > > > > > > The value in the structure is byte swapped based on some firmware > > > > > > > > endianness which not necessary matches the CPU endianness. > > > > > > > SMU10 is APU only so the endianess of the SMU firmware and the CPU > > > > > > > will always match. > > > > > > Which I think is what is being said here? > > > > > > > > > > > > > > Please revert that one from going upstream if it's already on it's way. > > > > > > > > > > > > > > > > And because of those reasons I strongly think that patches like this > > > > > > > > should go through the DRM tree :) > > > > > > Sure, that's fine -- please let me know. It was others Acked/etc. Who > > > > > > should carry these patches? > > > > > Probably best if the relevant maintainer pick them up individually. > > > > > > > > > > Some of those structures are filled in by firmware/hardware and only the > > > > > maintainers can judge if that value actually matches what the compiler > > > > > needs. > > > > > > > > > > We have cases where individual bits are used as flags or when the size is > > > > > byte swapped etc... > > > > > > > > > > Even Alex and I didn't immediately say how and where that field is actually > > > > > used and had to dig that up. That's where the confusion came from. > > > > Okay, I've dropped them all from my tree. Several had Acks/Reviews, so > > > > hopefully those can get picked up for the DRM tree? > > > I will pick those up to go through drm-misc-next. > > > > > > Going to ping maintainers once more when I'm not sure if stuff is correct or > > > not. > > Sounds great; thanks! > > I wasn't 100% sure for the VC4 patch, but pushed the whole set to > drm-misc-next anyway. > > This also means that the patches are now auto merged into the drm-tip > integration branch and should any build or unit test go boom we should > notice immediately and can revert it pretty easily. Thanks very much; I'll keep an eye out for any reports.