Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1741150rwd; Thu, 1 Jun 2023 22:25:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ46USjZ1JbHp1hH+EoDSnB+x0XqZIp9uePal0/f1zwPYRVomjGVs0OFN39DvC7FWA107vqB X-Received: by 2002:a17:90b:3b52:b0:24e:3452:5115 with SMTP id ot18-20020a17090b3b5200b0024e34525115mr1327207pjb.37.1685683512549; Thu, 01 Jun 2023 22:25:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685683512; cv=none; d=google.com; s=arc-20160816; b=Ocw5MBw9EDKM5BydjCwcTlvOgThAJe0vLIEnlE66N/RsTSUCmhHgkga0Uvctcyr1Ds s2/RdccPbxhRalLpOHpMtn08cQWvoD1hdLt8fV12wFkBlnq8KFG24RVeNM03G+6fSwFt E5Rr4qfhKnyT9ZzLC4BtsOHpY+tullbOmvQIRJZ652+uKkDEhJVOxAlAYPVOMAIH+YTq 4oRyJd1hSrro/po4xyh3lXM2Sl8ilKhdH1MsNY2uHCWjZOuOLrYxOY7TQxPPzdjGAyYw ZKNbFVwqExBAePR3j5UzOUx9kU32aLDn3wd2VBa28UVDCxZHuXRYhmqmI+fLZb9cC8WO UX7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=GcPBc1a4SGDB2+kkXL3oNUJue1EZfmIzuneygot1I1A=; b=QqbtlBgZANz8UruktU2nURSQ9QyQ0XcxsVNmFHOmHitW6HsRv1FARxKLrdzZBaio5B VXboVWrkVGwOPL3KRABRGJLtxNwcDpASJ+FWcBmRjWm4kgwVJ24w/mlliAgHcC8S+lWS PU9vPg12HakDK/7ueqSI87aplP/o/ZBxORoX6Nf9H9CE64MNj+c3J4nIiR9bDXA37EAG IZ3yvjXjEuSYzUFU5QPl8CzAJwOACzFeCBe9ylm+fJdeFjjQXNwz6kxq3u9WWw27NV6v 72DFC/0SiPZ7Nxpg9dWJTIUbXRdFtC0UCKBjJ+Jr/StFcimJlgbeZmDwr9FmbKmKzU1X HMYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DtmryheV; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i1-20020a17090a64c100b002569554346esi449435pjm.168.2023.06.01.22.25.02; Thu, 01 Jun 2023 22:25:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DtmryheV; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233335AbjFBFTn (ORCPT + 65 others); Fri, 2 Jun 2023 01:19:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230166AbjFBFTe (ORCPT ); Fri, 2 Jun 2023 01:19:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DE1E197 for ; Thu, 1 Jun 2023 22:19:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D834A64C59 for ; Fri, 2 Jun 2023 05:19:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53063C4339B; Fri, 2 Jun 2023 05:19:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685683172; bh=b9XqLjohgexUDBvTHch0fXNdlKc3xtN8ysTdJhrzGh0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=DtmryheVXDoD/U4cyZSOkd1a5OuUzxXv3E3QwoR6MaMZRVh0BmO7/y+l0QmwnU4Qm oJ2Q0g8yR1UgctN0UIZQTcMsqilOfQHxOMOEYTyHEYnVR1kid6tQpFQCy5+pkv7p4K LzqgHdiOutEI2i0ghqoMZDFm3SfSkePGiC6J044BJ/n7k5N1AsSy5s8PNHJph7GWBs 9vkJe8uxiULkRFmf3h/QockSRacREUozx27BL2Dv4/LHVFkHcnrfjHC5zK8G6tU6dx b/CWiuCiZd/ixjvg0aaUGfFWaNUv9HGeyohZJ4DJjFANl4zqLYm1u1DYAoU5UqzaBV HpKz/Fkr2++oA== From: Kalle Valo To: Jiri Slaby Cc: Shiji Yang , linux-wireless@vger.kernel.org, Nick Kossifidis , Luis Chamberlain , Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= , Robert Marko , Christian Lamparter , Christian Marangi , Shiji Yang Subject: Re: [PATCH] wifi: ath: add struct_group for struct ath_cycle_counters References: Date: Fri, 02 Jun 2023 08:19:27 +0300 In-Reply-To: (Jiri Slaby's message of "Fri, 2 Jun 2023 06:58:31 +0200") Message-ID: <87cz2ejva8.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-wireless@vger.kernel.org Jiri Slaby writes: > On 02. 06. 23, 6:36, Shiji Yang wrote: >> From: Shiji Yang >> >> Add a struct_group to around all members in struct ath_cycle_counters. >> It can help the compiler detect the intended bounds of the memcpy() and >> memset(). >> >> This patch fixes the following build warning: >> >> In function 'fortify_memset_chk', >> inlined from 'ath9k_ps_wakeup' at drivers/net/wireless/ath/ath9k/main.c:140:3: >> ./include/linux/fortify-string.h:314:25: error: call to '__write_overflow_field' declared with attribute warning: >> detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning] >> 314 | __write_overflow_field(p_size_field, size); >> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> > > Hi, > > what compiler/version is this with? > >> Signed-off-by: Shiji Yang >> --- >> More discussion on: https://github.com/openwrt/openwrt/pull/12764 > > No "__write_overflow_field" there. Is this the right link? Also it's better to include links like this in the actual commit log so it's archived to git. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches