Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1344714rdb; Wed, 20 Sep 2023 06:49:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHil9oXbZP8HRshdMOZ4n9v7LZp7GqGvFX1TP/wB8gUaaLVohrk0lXzdta5yaV8XzIp7XhS X-Received: by 2002:a05:6870:9713:b0:1d0:dbdd:2792 with SMTP id n19-20020a056870971300b001d0dbdd2792mr2842400oaq.39.1695217774866; Wed, 20 Sep 2023 06:49:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695217774; cv=none; d=google.com; s=arc-20160816; b=IYQonq8WYta9WbTR1m3ljGxfGyMHkoMLBBME/VCozVQJ94TFwIv91aVqAtvmx0AHkD 92IzCP69rXMazATCUqKSUeGzMDgksHhWztCOlK1CgKMNK9dgeFaaE+rODekv/CJlNRfA 4WEFw3xYCnQtPDACWm2TjIBsSdnsBGiyZ+M8WS362zHB8ZNnOtixlvzzhojKTwcQ42xB bb57cJVfNKZzFH05Z01JefOEVWi/i38s9QGiqHS8CNMuG+l3E8rj0NS+sZGIMtmxtI7Y NcufVfMw3sSG4kDkORXe5c2QLt9FkquyvfgQqKRHqYTNjrPd8K8Rg4yL4AODLxG8bcDv aYSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=kC/x59CUpbPsg7OrasO2oRCC9QF4EPFcZrjZtznrqNY=; fh=tjps/0mnZfJojZz2YY11ZLXRt7RkKsT/lR8da2jHxqQ=; b=MLTdE0M+5bSNw5XK81EUMaVSU62EKesf+fOl49/EmTapebxBwqtRQJGtO0F+CizvP4 hQKsj1lHtp/YTS3Y2pEX/I6moJ49Dp3BTeVpQxkFsceS06l4ww+oZOqek3xx5QfwPv/o fK/fUw+TV6GaYrT7sWDU5hVJy6qujvM+CRSlBv+MidmVO2RdwPGhjK4mV0nZBpNTU3Ba q9/EjMsgQ6NSA4b32rTE4xCtfcNYZVR07K5oId0XvfzgXXIEGJ8ZBXD8lsRmikcjKp04 GgE6HTALK9fnPf22TfirXtO3H5OXOyLJqyWjlLPSniWu4zcdPSN8xPH+rCIlLKUTwBXt nisQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZfJa2gVU; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id s11-20020a65584b000000b00578a26aee75si3925667pgr.295.2023.09.20.06.49.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 06:49:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZfJa2gVU; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id DAD8182A2D8B; Wed, 20 Sep 2023 06:39:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234884AbjITNjy (ORCPT + 56 others); Wed, 20 Sep 2023 09:39:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234771AbjITNjx (ORCPT ); Wed, 20 Sep 2023 09:39:53 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05276A9 for ; Wed, 20 Sep 2023 06:39:48 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 888F8C433C7; Wed, 20 Sep 2023 13:39:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695217187; bh=OJLOcu7QGnU8Z4qYvqF4xiEoMz9vtjV6liy7IRfGmDs=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=ZfJa2gVUGgLaNGBZzzegn3OPffvT5+6g8QiY7lZq93lwfNhiVzT8LivAgS7CLhqR8 asHWcVMyZYuBreSbERH+VIpxz14JIU+jA1D/tZWL+kvqfj8uVP/amZXmx3N1uQ+W/8 TeoxDOjhEXyTydDB8qU8VfkJbh3qGE43f+0X3uxLoTylZ6DhE2IgtdTBHHgn6FTZhk ApZsOvz2tQWwsOe4x3JzcAxfbJcnoinRHKMNVWRvTfW1fwJ0ZGbnuuuLF+iypTq/Yz Qnrabl6cSc4q9qePC61iZ/u6Vgk4K4Kr2cc1aXN2t7g9lCO2XxEbeangXQdupx95Tc pPLdTVnuYHjFA== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] wifi: ath10k: fix clang-specific fortify warning From: Kalle Valo In-Reply-To: <20230829093652.234537-1-dmantipov@yandex.ru> References: <20230829093652.234537-1-dmantipov@yandex.ru> To: Dmitry Antipov Cc: Jeff Johnson , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, Dmitry Antipov User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <169521718481.1118199.1680199294713287417.kvalo@kernel.org> Date: Wed, 20 Sep 2023 13:39:46 +0000 (UTC) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 20 Sep 2023 06:39:51 -0700 (PDT) Dmitry Antipov wrote: > When compiling with clang 16.0.6 and CONFIG_FORTIFY_SOURCE=y, I've > noticed the following (somewhat confusing due to absence of an actual > source code location): > > In file included from drivers/net/wireless/ath/ath10k/debug.c:8: > In file included from ./include/linux/module.h:13: > In file included from ./include/linux/stat.h:19: > In file included from ./include/linux/time.h:60: > In file included from ./include/linux/time32.h:13: > In file included from ./include/linux/timex.h:67: > In file included from ./arch/x86/include/asm/timex.h:5: > In file included from ./arch/x86/include/asm/processor.h:23: > In file included from ./arch/x86/include/asm/msr.h:11: > In file included from ./arch/x86/include/asm/cpumask.h:5: > In file included from ./include/linux/cpumask.h:12: > In file included from ./include/linux/bitmap.h:11: > In file included from ./include/linux/string.h:254: > ./include/linux/fortify-string.h:592:4: warning: call to '__read_overflow2_field' > declared with 'warning' attribute: detected read beyond size of field (2nd > parameter); maybe use struct_group()? [-Wattribute-warning] > __read_overflow2_field(q_size_field, size); > > The compiler actually complains on 'ath10k_debug_get_et_strings()' where > fortification logic inteprets call to 'memcpy()' as an attempt to copy > the whole 'ath10k_gstrings_stats' array from it's first member and so > issues an overread warning. This warning may be silenced by passing > an address of the whole array and not the first member to 'memcpy()'. > > Signed-off-by: Dmitry Antipov > Acked-by: Jeff Johnson > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. cb4c132ebfea wifi: ath10k: fix clang-specific fortify warning -- https://patchwork.kernel.org/project/linux-wireless/patch/20230829093652.234537-1-dmantipov@yandex.ru/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches