From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90DACE784A4 for ; Mon, 2 Oct 2023 11:42:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236769AbjJBLmO (ORCPT ); Mon, 2 Oct 2023 07:42:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231352AbjJBLmM (ORCPT ); Mon, 2 Oct 2023 07:42:12 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48634C6 for ; Mon, 2 Oct 2023 04:42:05 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40348C433C7; Mon, 2 Oct 2023 11:42:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696246924; bh=d8FcFb3yWGd/9wtt0mcVGwPft2o/vm/EglUHKzdkfgQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sPG0RdMpsRSEdUD24LYEMhEURsA7sqlGX29fJ5XEfM0gmq3NlvgvkoV7tHor+LC0x uWR04f5dKQExuM5HEQ8X5EPbFKBAW20JvqzSgDBiJ/Ig8a1xMp3Y6jXJhmXXKIzutf iWGdjOIB2dSKGH3qUVJmpIaSboNgAp0rqLbeEFmA= Date: Mon, 2 Oct 2023 13:42:01 +0200 From: Greg Kroah-Hartman To: Kees Cook Cc: Alan Stern , Mathias Nyman , linux-usb@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , Tom Rix , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-hardening@vger.kernel.org Subject: Re: [PATCH] usb: Annotate struct urb_priv with __counted_by Message-ID: <2023100246-stem-overcoat-c4b8@gregkh> References: <20230915195812.never.371-kees@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230915195812.never.371-kees@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 15, 2023 at 12:58:16PM -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 urb_priv. > > [1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci > > Cc: Alan Stern > Cc: Greg Kroah-Hartman > Cc: Mathias Nyman > Cc: linux-usb@vger.kernel.org > Signed-off-by: Kees Cook > --- > drivers/usb/host/ohci.h | 2 +- > drivers/usb/host/xhci.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Thanks for taking these changes through your tree, I was too slow... greg k-h