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 X-Spam-Level: X-Spam-Status: No, score=-11.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F40ADC432BE for ; Fri, 20 Aug 2021 15:49:55 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BA5B36113E for ; Fri, 20 Aug 2021 15:49:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BA5B36113E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EBE0E6EABE; Fri, 20 Aug 2021 15:49:54 +0000 (UTC) Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 89E266EABE for ; Fri, 20 Aug 2021 15:49:54 +0000 (UTC) Received: by mail-pj1-x102d.google.com with SMTP id n13-20020a17090a4e0d00b0017946980d8dso14029567pjh.5 for ; Fri, 20 Aug 2021 08:49:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=JP8WFZmb9rgUa+mH2LJuzuE/iABY2L7RW9PxVxSWy1g=; b=k4UQQteJL7Qh1f6962sQXTg69gVAgArCnEbcoafW8q8WU3a0dFyoCb6HUcE0lFqUsS 2TQNQdHpbA93nCoa1N/aiXdy8pDJcz4pQGJmxqJfbouuNtmtbloWKcbAnFDzgP+YEWHK NHH2EzfCjBYGkA2kf/rNG+rCeii3d90rhg4wY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=JP8WFZmb9rgUa+mH2LJuzuE/iABY2L7RW9PxVxSWy1g=; b=fAxJhynNgCnCEycy4g2gqfBtlHOiZweaeBu3f/zNTKKh+xwJITJV0f91CuMoHVgQ8Y g73wLYBCe6ceeyDZ4mtaCU4x3eSNJ86fhbNkD6G7Bw1OJSol4gYkCTu7TftO2R8oxQI2 sSURBFzegXjcjzJbBg+/+FSZ7yt2sbEdQbgZN/6TwFg63S9EROCTupkWsMWHdcIeQBWC f6sYzP53rU3WNTAj6G89xXu2YLQTlhBr2cLQ46FjlRDfnrL6BmD/pBgcI+BmvY6BIo5R sMVKtRmSduU6Xb3CyJ32EXpgthV+vQGAtgdu6imGP2ya+N+RijE4nkU+uUnNOYqeGTZ4 zjlQ== X-Gm-Message-State: AOAM533J1MPeli1ugljLEv4fp5fvh51ph+P5kEIhO8d8+dYq+WQ32RNY i0UwkBSJ1oo8ZwaeASGUsa9R4A== X-Google-Smtp-Source: ABdhPJwhegutOkRrxvU2g3GeI5YumyD6linmLQRuyi6C1VpKbOltTluibfSiLlEYf9DDH4WcSj+Egg== X-Received: by 2002:a17:902:7c98:b0:131:21fd:3717 with SMTP id y24-20020a1709027c9800b0013121fd3717mr2602853pll.53.1629474594147; Fri, 20 Aug 2021 08:49:54 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id q18sm7564913pfj.178.2021.08.20.08.49.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Aug 2021 08:49:53 -0700 (PDT) Date: Fri, 20 Aug 2021 08:49:52 -0700 From: Kees Cook To: Jiri Kosina Cc: LKML , Stefan Achatz , Benjamin Tissoires , linux-input , "Gustavo A. R. Silva" , Greg Kroah-Hartman , Andrew Morton , linux-wireless , Network Development , Maling list - DRI developers , linux-staging@lists.linux.dev, linux-block , linux-kbuild , clang-built-linux , Rasmus Villemoes , linux-hardening@vger.kernel.org Subject: Re: [PATCH v2 55/63] HID: roccat: Use struct_group() to zero kone_mouse_event Message-ID: <202108200849.9EBF036376@keescook> References: <20210818060533.3569517-1-keescook@chromium.org> <20210818060533.3569517-56-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, Aug 20, 2021 at 05:27:35PM +0200, Jiri Kosina wrote: > On Fri, 20 Aug 2021, Kees Cook wrote: > > > > > In preparation for FORTIFY_SOURCE performing compile-time and run-time > > > > field bounds checking for memset(), avoid intentionally writing across > > > > neighboring fields. > > > > > > > > Add struct_group() to mark region of struct kone_mouse_event that should > > > > be initialized to zero. > > > > > > > > Cc: Stefan Achatz > > > > Cc: Jiri Kosina > > > > Cc: Benjamin Tissoires > > > > Cc: linux-input@vger.kernel.org > > > > Signed-off-by: Kees Cook > > > > > > Applied, thank you Kees. > > > > > > > Eek! No, this will break the build: struct_group() is not yet in the tree. > > I can carry this with an Ack, etc. > > I was pretty sure I saw struct_group() already in linux-next, but that was > apparently a vacation-induced brainfart, sorry. Dropping. Cool, no worries. Sorry for the confusion! -- Kees Cook