lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 2 Oct 2023 11:20:09 +0200
From: Christian König <ckoenig.leichtzumerken@...il.com>
To: Kees Cook <keescook@...omium.org>, David Airlie <airlied@...il.com>
Cc: Tejas Upadhyay <tejas.upadhyay@...el.com>, Emma Anholt <emma@...olt.net>,
 Tom Rix <trix@...hat.com>, Joonas Lahtinen
 <joonas.lahtinen@...ux.intel.com>, llvm@...ts.linux.dev,
 dri-devel@...ts.freedesktop.org, Chris Wilson <chris@...is-wilson.co.uk>,
 Prike Liang <Prike.Liang@....com>, Huang Rui <ray.huang@....com>,
 Gerd Hoffmann <kraxel@...hat.com>, Andrzej Hajda <andrzej.hajda@...el.com>,
 Marijn Suijten <marijn.suijten@...ainline.org>,
 Matthew Brost <matthew.brost@...el.com>, Karol Herbst <kherbst@...hat.com>,
 Neil Armstrong <neil.armstrong@...aro.org>, amd-gfx@...ts.freedesktop.org,
 Kuogee Hsieh <quic_khsieh@...cinc.com>, Nathan Chancellor
 <nathan@...nel.org>,
 VMware Graphics Reviewers <linux-graphics-maintainer@...are.com>,
 Ben Skeggs <bskeggs@...hat.com>, Andi Shyti <andi.shyti@...ux.intel.com>,
 nouveau@...ts.freedesktop.org, David Airlie <airlied@...hat.com>,
 virtualization@...ts.linux-foundation.org, Chia-I Wu <olvaffe@...il.com>,
 linux-hardening@...r.kernel.org, Lijo Lazar <lijo.lazar@....com>,
 Yifan Zhang <yifan1.zhang@....com>, linux-arm-msm@...r.kernel.org,
 intel-gfx@...ts.freedesktop.org, Kevin Wang <kevin1.wang@....com>,
 Abhinav Kumar <quic_abhinavk@...cinc.com>,
 Jani Nikula <jani.nikula@...ux.intel.com>, Melissa Wen <mwen@...lia.com>,
 Alex Deucher <alexander.deucher@....com>,
 Gurchetan Singh <gurchetansingh@...omium.org>,
 Maxime Ripard <mripard@...nel.org>, Rodrigo Vivi <rodrigo.vivi@...el.com>,
 Evan Quan <evan.quan@....com>, Sean Paul <sean@...rly.run>,
 Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>,
 Xiaojian Du <Xiaojian.Du@....com>, Le Ma <le.ma@....com>,
 freedreno@...ts.freedesktop.org, Bjorn Andersson <andersson@...nel.org>,
 "Pan, Xinhui" <Xinhui.Pan@....com>,
 Nick Desaulniers <ndesaulniers@...gle.com>, linux-kernel@...r.kernel.org,
 Rob Clark <robdclark@...il.com>, Zack Rusin <zackr@...are.com>,
 Daniel Vetter <daniel@...ll.ch>,
 Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
 Nirmoy Das <nirmoy.das@...el.com>, Lang Yu <Lang.Yu@....com>,
 Christian König <christian.koenig@....com>,
 John Harrison <john.c.harrison@...el.com>,
 Hawking Zhang <Hawking.Zhang@....com>
Subject: Re: [PATCH 0/9] drm: Annotate structs with __counted_by

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,
>


Powered by blists - more mailing lists