Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1581546pxb; Fri, 20 Aug 2021 08:51:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1WkqvWnPIaO1im4ndUwzRjpW+pLU7WueDyCCXRIbwyBqy2WDbJZbCX7x8A3MzZRGncSRf X-Received: by 2002:a02:c502:: with SMTP id s2mr18428087jam.135.1629474683304; Fri, 20 Aug 2021 08:51:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629474683; cv=none; d=google.com; s=arc-20160816; b=CLVWuf/P3466NVyzWNwhjf7UZvLPiDDBhJwgMGCMsWmGXuf1jqLT5FeUtQfGY/XFh/ zWkTbhTWBovlY+/MbQ5aVFzziIrzfKJa63xAFoGcpNrDN5upKVvqpVTxDlYDnI3RPUas TFFyCsffEtnSx89+H0Th/ZMpR1tsdgKNajCWzFU3/vQHHZMq9nDrhW+XuPpZGgZ/p53S FQiUnB4HIag+zxGOzR+m7w0YRi9qZAklohaGeSQ0rZW5nOkgwgc9hfsjEN+al/P3iCUT JRfyRoTTJ/iroOuNhQzn9XcfJrvPRQ8lGf3zb1JTjIRHuP7acjgitX5BwTslwbiDtdW5 FWdw== 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; bh=JP8WFZmb9rgUa+mH2LJuzuE/iABY2L7RW9PxVxSWy1g=; b=WjdrzHccUR3oRgEyELSz6wRE2JbpZwrT6X4uZsSqAzNastYOmyixdDRoHOXuvNpl/+ KoL3GlbySoiBI3MG3J06XU3qTKQjMabnaLY7egQFMBDW6BzXIJf9nCQGZVVbcFSDKoJZ g77VwgSUjFGhg/4zuVl9vzFXaa150byd+KmFyX8IGbWQZ1lCpgtSdrRLKC1Jc3N+uw7R satB4IB1zYzTBKDF+UD0KtMW3/d5e6iF9sw9WmA7eksDBlSQY+NeiB0nTQAK/n5+RswN XE0DWOS2E+7sFn8JQLEyZJAI1b3MEsvPVJq6UbM/+FNI9tgyQH2uDjPUzW5l8TKpYGHW Q+ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=k4UQQteJ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k21si7140831jaq.73.2021.08.20.08.51.10; Fri, 20 Aug 2021 08:51:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=k4UQQteJ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241296AbhHTPud (ORCPT + 99 others); Fri, 20 Aug 2021 11:50:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241078AbhHTPuc (ORCPT ); Fri, 20 Aug 2021 11:50:32 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9013DC061760 for ; Fri, 20 Aug 2021 08:49:54 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id j10-20020a17090a94ca00b00181f17b7ef7so1223469pjw.2 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=PCKDUbiU9XCKjNCpKq2FVoxhEUW95rz1x4gaaEhb9pcSDcefo76JXRTVDp60yEweVC WdwJl4D1KbEI3K67zQFJ0NL6aV5WAKXHkZdOw521J1OXy8zQKJsmjfsYBan2Q9NiHbEx PU8YwY6+o31FfSLoWaiMMOXpSzAIzm9G7YtfmYwp06aDgnRywU6ZQ0RZpBAUtkDfzKwI 4fuaTeKLLhyHwJZpVKW73/6LLiLhONwkweTPa7dMUSLAotYG918p8BMQP79aKohkIeyL ipV0J1xlmwuu3m2qop5Q3Ook9niP6bPKrVgLownT/1R2+4TBDTeCvQCPg9Np4jldW69T r8NQ== X-Gm-Message-State: AOAM5304CisDK9b7KHtOKCavYltpc8hPSg5oQEVeU5S1JGS9kjTEYe5j N5n4KjpgMZ5Y0w7IYtIuy+Bb5A== 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: Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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