Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5837940pxv; Wed, 28 Jul 2021 22:57:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwesU67SXxWO7s67tan54x4oF9pMZeWATa6EaEGY1VxJpugs0QuU/h5QVLic3V6TzF5pPDj X-Received: by 2002:a05:6402:5244:: with SMTP id t4mr4022147edd.346.1627538234843; Wed, 28 Jul 2021 22:57:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627538234; cv=none; d=google.com; s=arc-20160816; b=VGP6oVlr898iPBiM99f4KaxIvel3y5XXf3jlZwjIT2USKE6KXzlfrjMauhaEBlbQ1W IWUw8cj02DkD53EgTXS+YE64OSduQh8idEX72J1UE9yApgFe8u9EWGvHO9+a8p6h5w5C jf/m7Ba2GRbWhnhE+iIbA3ZJTAwhkSjRAUgSk7sPFnueSLhLcI0gT61cDhpaTr1LzJc6 hxZeg4/Y0AjH+pf8XeVrrmtLyCYUiQXlmRlJjYyEZqZg09uRwDgCiSbqW+gFsWCyEAc5 1X08++lnRgMH5DOGZv3LHQ2d2+R2LiEn6w/LgiLP/OtzCesZCq2XIDqVNarJlK0LQvuf f8FA== 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:to:from:date:dkim-signature; bh=R4FG7V/qHkxL9POAi8AdvkbEu9QJNlQi42/HE3oCiRw=; b=e736J39CNetS7N2BM/JadQOR6tTHGzG8MQXUM3gBc/iCI8AYw29GTINFnAmIBfF1KI Z87ztWxNt6bojVDFZtFPTbQptd11QbCPifk6oiDTnuQAQKfErxXNomdbui+yM0l88nGR ZTe3zCbVjBxN6HfIjr68JcpLbKvFdoMk32hQmY5MnT/jdF4FK+d1jwL+VyoOeJHwV+lN TH7mQwRnOPdipqx9CCYdRnnRNTDWng0m7tVts9bPnUzIhug2vXgDsGh2MsDiT9Uvx7eL LXJy+YAGACsUjIwyXgXDRga5anbH7L+EdGJsItD59gPupLjP7m/iNsM1MsziFTV1B0nn L+oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WQfdXRag; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w11si2273018ejc.737.2021.07.28.22.56.42; Wed, 28 Jul 2021 22:57:14 -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=@linuxfoundation.org header.s=korg header.b=WQfdXRag; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234012AbhG2F4g (ORCPT + 99 others); Thu, 29 Jul 2021 01:56:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:60002 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230223AbhG2F4f (ORCPT ); Thu, 29 Jul 2021 01:56:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 854FE61042; Thu, 29 Jul 2021 05:56:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627538193; bh=+SNXxGgtyfvtJSvpFlcjUjBSnYextIMvu3GnqLmisRg=; h=Date:From:To:Subject:References:In-Reply-To:From; b=WQfdXRaghOLXCT8ymhifuJr8DNZEffe/G+jLc+ym/fXkJttIe2razGZt7Ai/Dskty mp3udIEdjRafAUq7M7ZSvFzqobaUKbRu4cTixJR2sqnNvPfj21h714N12Mk/LFXudD 9+NsLn4X8zeIrXPdueqCEyuN7a+iOiimS257+kK8= Date: Thu, 29 Jul 2021 07:56:27 +0200 From: Greg Kroah-Hartman To: dsterba@suse.cz, Bart Van Assche , Dan Carpenter , Kees Cook , linux-hardening@vger.kernel.org, "Gustavo A. R. Silva" , Keith Packard , Andrew Morton , linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-staging@lists.linux.dev, linux-block@vger.kernel.org, linux-kbuild@vger.kernel.org, clang-built-linux@googlegroups.com, nborisov@suse.com Subject: Re: [PATCH 01/64] media: omap3isp: Extract struct group for memcpy() region Message-ID: References: <20210727205855.411487-1-keescook@chromium.org> <20210727205855.411487-2-keescook@chromium.org> <20210728085921.GV5047@twin.jikos.cz> <20210728091434.GQ1931@kadam> <20210728213730.GR5047@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210728213730.GR5047@suse.cz> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, Jul 28, 2021 at 11:37:30PM +0200, David Sterba wrote: > On Wed, Jul 28, 2021 at 02:37:20PM -0700, Bart Van Assche wrote: > > On 7/28/21 2:14 AM, Dan Carpenter wrote: > > > On Wed, Jul 28, 2021 at 10:59:22AM +0200, David Sterba wrote: > > >>> drivers/media/platform/omap3isp/ispstat.c | 5 +-- > > >>> include/uapi/linux/omap3isp.h | 44 +++++++++++++++++------ > > >>> 2 files changed, 36 insertions(+), 13 deletions(-) > > >>> > > >>> diff --git a/drivers/media/platform/omap3isp/ispstat.c b/drivers/media/platform/omap3isp/ispstat.c > > >>> index 5b9b57f4d9bf..ea8222fed38e 100644 > > >>> --- a/drivers/media/platform/omap3isp/ispstat.c > > >>> +++ b/drivers/media/platform/omap3isp/ispstat.c > > >>> @@ -512,7 +512,7 @@ int omap3isp_stat_request_statistics(struct ispstat *stat, > > >>> int omap3isp_stat_request_statistics_time32(struct ispstat *stat, > > >>> struct omap3isp_stat_data_time32 *data) > > >>> { > > >>> - struct omap3isp_stat_data data64; > > >>> + struct omap3isp_stat_data data64 = { }; > > >> > > >> Should this be { 0 } ? > > >> > > >> We've seen patches trying to switch from { 0 } to { } but the answer > > >> was that { 0 } is supposed to be used, > > >> http://www.ex-parrot.com/~chris/random/initialise.html > > >> > > >> (from https://lore.kernel.org/lkml/fbddb15a-6e46-3f21-23ba-b18f66e3448a@suse.com/) > > > > > > In the kernel we don't care about portability so much. Use the = { } > > > GCC extension. If the first member of the struct is a pointer then > > > Sparse will complain about = { 0 }. > > > > +1 for { }. > > Oh, I thought the tendency is is to use { 0 } because that can also > intialize the compound members, by a "scalar 0" as it appears in the > code. > Holes in the structure might not be initialized to anything if you do either one of these as well. Or did we finally prove that is not the case? I can not remember anymore... greg k-h