Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp6048072rdb; Mon, 18 Sep 2023 02:23:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG6/LXoD2QU+x2OaYDNL+P7qVfej7b5C3+YjkpDp1j0jFGBe3k6I66th5YIUMycNPRkGCuT X-Received: by 2002:a9d:7588:0:b0:6b2:91c9:8e1e with SMTP id s8-20020a9d7588000000b006b291c98e1emr9542976otk.2.1695029024938; Mon, 18 Sep 2023 02:23:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695029024; cv=none; d=google.com; s=arc-20160816; b=S3vyEUiqi4g0Rx9/kVRPTTv3l+Osv7aYzbr6B9VckwSX9xheHpKRLu9AnQImrrFpYf zCt5ynrPAJLysjRBGOl/EXmhASXVfgnESa3bXGAltnOCmVB0NiikchawJdSLlHLrQEaF ibGQmKmEtWBU11WihznFQmtP4vuOrkjOGufDgxPCRq2cUrgNVDjcLt4eTRkgPWBrjRAQ OrZox3rpuF1j1tjVagTc9YlK0W4e5DurCov/VGWcCVIfdZLNx/sk+rt5t9a6xnMXMVjF 2zxVN64S+UWMbA1dUQYFuX+L6TvJexlae8quWhgl/WwWm5iSCCzy+kEfD2V7QAT2vDmW ZGog== 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 :dkim-signature; bh=h8LoirZ0+RzsValGwcKMX5/tGVuF0UyLaQfS4YOgCT0=; fh=dBuYQaVyZi9ew7P9T41oDvWoYGt52K6WHZLK8xv4yUY=; b=vQvL5CdRl9WHAPZGq+wOegxX5W3SG7tD1bWziCkn02Z1LeQhzQfpl2hCxplAm+jh0m gX5ncL9xMa7fDuHQfLl8QuYVakYvlm2fLtvqTMgGu4xuip2xEq/mOMeee81vodSFq/TM oAh+VVyOptBYq2BueR2AsdI+JbekDDS7qODbhKx8uF8QvYNb/qOjs/pLRCM4v5jJM6EK qYsyOIgH79o0SbDzzP6/0zDMcl0ny2JSM2Z6dD9UsemJmcY/LwN1vduXdoo/n8OjmGjr jrILYWDeJlzzpAzXBiCCAZ3D1B/uSzn97NIdUnEDFYz1C+RAf8slijTBsxvynW+PIIBw StAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Gkx0cZ5A; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id az1-20020a056a02004100b00565eee2d0fesi7745187pgb.324.2023.09.18.02.23.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 02:23:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Gkx0cZ5A; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 117CD837438B; Mon, 18 Sep 2023 00:11:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230227AbjIRHL3 (ORCPT + 99 others); Mon, 18 Sep 2023 03:11:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240091AbjIRHLF (ORCPT ); Mon, 18 Sep 2023 03:11:05 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CCE811A; Mon, 18 Sep 2023 00:10:59 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 52B77219A8; Mon, 18 Sep 2023 07:10:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1695021058; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=h8LoirZ0+RzsValGwcKMX5/tGVuF0UyLaQfS4YOgCT0=; b=Gkx0cZ5AWhKGCQ9d48JZcTEzkWSjOZ/gnmwWiaJGL85DrqDg+/Ve0eiOGNVLmNCi1VachG s94/ha+Y5rXci7dXBoCb9agOXP3hAx2k7wX4pbVGICfnl6uBz+js/CFHKREcDUgSF6Y/D6 u64l6ue6zkcpDEbvTqGpqYowqxFXTuE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1695021058; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=h8LoirZ0+RzsValGwcKMX5/tGVuF0UyLaQfS4YOgCT0=; b=4oFro4bRv693Da50NSOwDV6r2C9Dsm/K3bU6VNqWiHwz4tLkOk8zqWgnjd/1Lnfd6dTYhz AhQQfpC95H4HCtDA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 41FAD13480; Mon, 18 Sep 2023 07:10:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 5eIPEAL4B2U8TAAAMHmgww (envelope-from ); Mon, 18 Sep 2023 07:10:58 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id AD26AA0759; Mon, 18 Sep 2023 09:10:57 +0200 (CEST) Date: Mon, 18 Sep 2023 09:10:57 +0200 From: Jan Kara To: "Gustavo A. R. Silva" Cc: Kees Cook , Jan Kara , Nathan Chancellor , Nick Desaulniers , Tom Rix , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-hardening@vger.kernel.org Subject: Re: [PATCH] udf: Annotate struct udf_bitmap with __counted_by Message-ID: <20230918071057.5q64pz3b7tc3x3z5@quack3> References: <20230915201404.never.574-kees@kernel.org> <118576aa-a667-8c91-821a-351562dc4c61@embeddedor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <118576aa-a667-8c91-821a-351562dc4c61@embeddedor.com> X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_SOFTFAIL autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 18 Sep 2023 00:11:55 -0700 (PDT) On Fri 15-09-23 14:50:14, Gustavo A. R. Silva wrote: > > > On 9/15/23 14:14, 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 udf_bitmap. > > > > [1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci > > > > Cc: Jan Kara > > Signed-off-by: Kees Cook > > Reviewed-by: Gustavo A. R. Silva Thanks. I've queued the patch to my tree. Honza -- Jan Kara SUSE Labs, CR