Received: by 2002:a05:7208:13ca:b0:7f:395a:35b6 with SMTP id r10csp23700rbe; Wed, 28 Feb 2024 09:23:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXdp1VLHa9Mfyd1Nu9IBWG+PWTExnAiL+kEDgZMTjfP+cy6jj8oR9qaeJOpf3XvKNOW24WPuAEqeEDyEsvwAQUalQ5E8aUMuGdmNtdJmA== X-Google-Smtp-Source: AGHT+IEvm9xIxEWSI/TkJEPRC6e8fVPRPYQaOcObUHY149dDJHn1uWBNRG3MSKrog4kHZ+bJIXo/ X-Received: by 2002:a17:906:7c44:b0:a44:f85:a10a with SMTP id g4-20020a1709067c4400b00a440f85a10amr282139ejp.14.1709141026684; Wed, 28 Feb 2024 09:23:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709141026; cv=pass; d=google.com; s=arc-20160816; b=mHlL9q+x6eXvj0RCNKN/WvjS2gn9kyV9IHyzO2VLdYijcFbi8F+ZyeSJ9X8cVs5rc4 rDJxriK3EgQ4SzoBljPOZifGDJNfjxMFDohtOjN9N30XgzSyN3bxrw+wYu7W4kKBtiSC IeKIJaxGpCDa+9+MC1GS44wavpMN+2H60la6nskhrdKoaHdXlSNsApwNdGtIhJXUAyIT QL0T707BYGR9jf9W1YxO14l6NIq+rJH7fFjlMkJRW5IASi9G+uIw/e6F1pnCbNz3wpyv 1VVnMf+sz00mMDsVxkYUzq2124Lu2qyRbqIy+E268mEFs0hGtSusV1TqPG2QE8UDIH4R lSLQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature:dkim-signature; bh=Uczs6P+Vjhlsb/gj6HcF1VFbl7LhQCHMFJrfB/feXkU=; fh=55oDBH97TKNukdZs2wmSRcNelZ3J7qGjHEKoZG2abyY=; b=tzkP8fAl2ZIaJpT8kO7yVv8lDxqWlGwvbGsybWI/PO25trS6GFnoSje63Fw+nfAMv/ fML1sp/9csUiMPCEDvrQFw2r9HcT+i+POH8DTgvfKoPhWYZPDJLjlC2LFhoK+IefDljp +Q3GOzLK1KVYmFhG4fmGmLTZ8vDCZFYhGzcdANAQ4B/JVnOElxEvm/oB6+2H3RkoRaUZ aR11VoEHSLhNSVdrG2YNFUBfnz43pJBiTyEP3Tgw70oxprl7C2l6dfZbXsDrIj01fJTq LHqq7E6Vyh19j70+/X8sQbxo0132B4Z8kjnNNSJn7XtMcg62RoBZ4kZgm46m8o8GvPyw 78wg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=en9o0nri; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=JgYaz9Ds; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-85431-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85431-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id qq10-20020a17090720ca00b00a3f0fc2feddsi1926204ejb.794.2024.02.28.09.23.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 09:23:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85431-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=en9o0nri; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=JgYaz9Ds; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-85431-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85431-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 73C071F27574 for ; Wed, 28 Feb 2024 17:23:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C1F5159573; Wed, 28 Feb 2024 17:23:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="en9o0nri"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="JgYaz9Ds" Received: from fout4-smtp.messagingengine.com (fout4-smtp.messagingengine.com [103.168.172.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55A823FBB2; Wed, 28 Feb 2024 17:23:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.147 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709141017; cv=none; b=KGiElUVrBKuX+BPn9cvAeD/quA737i2e+rsgKNbzPoEaelHpIAgehIPkxQUGjUS1ekKStTNHiqkl9S0WfHWrXVTCZth9aFmg4oMUaalxmQmm/RZFW2EQqr0lnlY4T539UBWxdhdBG9OyTQpUEIzAsezLludeQEXZ2gCsNaOhh7I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709141017; c=relaxed/simple; bh=gyHaX4rUH7VfXk5+GSMnekvjp1WHHHsYtG16XBQttRM=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=HI05kRleNIZuMp0CYaqr3Whx1J0B9+TjEpmXfgKWQKLP2reML10UM8sUxueent/Ozbv/R+U0F4e78wf8zBvU2THPQvNV9dll/EwMwMiyYZAX1zbw9C7c9rLV4OyLYpd7WQbyPzcpbnxl8Cs+VvPNdfZSmA3ErtCAVNqr7fB/2uU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=en9o0nri; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=JgYaz9Ds; arc=none smtp.client-ip=103.168.172.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id 69C3813800B5; Wed, 28 Feb 2024 12:23:34 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Wed, 28 Feb 2024 12:23:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1709141014; x=1709227414; bh=Uczs6P+Vjh lsb/gj6HcF1VFbl7LhQCHMFJrfB/feXkU=; b=en9o0nri8jxQPWja5PFaAxCjBA CVBxhnwxdOqfhXeiKEr+G1DCaaMIRNquKEtCdBroqhtKlzd06Mtko3jduGHe7cOQ S7fWvwXKsXn4Y6vt3CUC13wD9dNVgQ3KMwqHbGEMubfD0iuJcwsamSD++5v0lJ+p k0oZMd94hq5jwqKTKLrja9LEeikZ+sAh9TDqJYKVETniCS/7+hc5iD+4x4p3vcbG xg4NdTCmvxHZ7Q6La679xTekm9TNojZPFpXRbEQH/lmBt7lPmGY+ZmS0qgu4YXPB 9982UuShK/IY5SXNoMXRL2qPd9pwvUjdi8JA4jccX7RH0Xg3zhSnvTbT4sUA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1709141014; x=1709227414; bh=Uczs6P+Vjhlsb/gj6HcF1VFbl7Lh QCHMFJrfB/feXkU=; b=JgYaz9DsiLHdxiHNDvW8LwzgBn/BCNjf2fob6BKz5jQc DS5kEAeXURNsQZrPIKN9UIcI9+D5d/Ql5rzfYE8oI03V8+6Xcmi8sT7qf1IfcBf3 wT/yMM3dUJ3cL7L7YLYNa6FebV0892paATs0dslLr2ZOtmEN+pZEFK3PpVTozZlG ETjDNtSSx5UlIDV/m1U34HExkRAWCshbKoolnF6hJ41jEChZa3Zy3pYPkEpzkySL pBGd7RW2/z3j98TaKrTsUrDPCxnDvlRmokwfGRjmYE6oTNmCQFj3sJ2wsMv3Ge7x t+jbx/Ui/4HcJAe2u8/s3VtdtDojqklL0Yp3mI9hZQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrgeejgdelhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdetrhhn ugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtth gvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedtkeet ffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrh hnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id ABF8BB6008D; Wed, 28 Feb 2024 12:23:33 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-182-gaab6630818-fm-20240222.002-gaab66308 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <62f20e36-536d-47ee-b486-28ed87201b60@app.fastmail.com> In-Reply-To: <87il28h7zs.wl-tiwai@suse.de> References: <20240228140152.1824901-1-arnd@kernel.org> <87msrkhcz6.wl-tiwai@suse.de> <1265517d-b98a-4ec6-9215-10cd988ff78f@app.fastmail.com> <87il28h7zs.wl-tiwai@suse.de> Date: Wed, 28 Feb 2024 18:23:13 +0100 From: "Arnd Bergmann" To: "Takashi Iwai" Cc: "Arnd Bergmann" , "Kees Cook" , "Jaroslav Kysela" , "Takashi Iwai" , "Nathan Chancellor" , "Nick Desaulniers" , "Bill Wendling" , "Justin Stitt" , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH] ALSA: asihpi: work around clang-17+ false positive fortify-string warning Content-Type: text/plain On Wed, Feb 28, 2024, at 17:24, Takashi Iwai wrote: > On Wed, 28 Feb 2024 16:03:56 +0100, >> On Wed, Feb 28, 2024, at 15:37, Takashi Iwai wrote: >> > On Wed, 28 Feb 2024 15:01:45 +0100, >> >> The fortified-string warning only triggers for string.h operations >> (memset, memcpy, memcmp, strn*...), not for a direct assignment. > > Ah, I see. Then from the logical POV, it's better to have a check > before that assignment; otherwise it'd overflow silently there. > > Does putting the check beforehand (like the one below) fix similarly? Indeed, it does address the issue. I'll send a v2 with that version, since it clearly makes more sense. Arnd