Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp179424lqp; Fri, 12 Apr 2024 14:21:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUDQK9gkqKlTgmHpFviYyRGEHLqJnYgjRLYc8Wd03dvzkd3PWJwHZuQ4gwoxZ+Wsmuy84wuGk4EAvqEXjrd9WkAOuBmp7W2JUX4U/nwVg== X-Google-Smtp-Source: AGHT+IH6PZY8DjWgK8pss569esoIRk3ilXidSAn/R6flrHvD539BJOOMHHzFOKaB3TPVI75i6n48 X-Received: by 2002:a19:f507:0:b0:517:8b6a:a664 with SMTP id j7-20020a19f507000000b005178b6aa664mr2358573lfb.18.1712956910514; Fri, 12 Apr 2024 14:21:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712956910; cv=pass; d=google.com; s=arc-20160816; b=V7Ar/MAk/ztNWv+298XSA8wpm5l/79DcbvcX1qurLHSVkrb4R8wNNsNecyKM6jyOj5 nC/1QWoTtb72om8jtC3DO9hukDAUOZY5sXjHeBN5u909nEg+3+I1wEFMlSXOSup/UiC8 sFrDIo4Z0VLYH6/xNzna6fnwertO4oFD2x19dj2K56ndYo7jyh+Jz3efIcoJrfY0DfuR VS7Q0P7SfUitJMd/r71jOuIfqEqDZc9bKvXpNz8ZUI2wrI82oXfgCo8VmnwfmRmyhe9V Z9lpf1CoGxkV0y3ZaIbwBHTBGIjhbE4GpQ7o+/47Sag8Hlt2MzGalxtxuFKubp2wzK3a Rw8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pC9OBb9ldZFLdelwB9m3VUMIVKPhKLQ51xeL9GYk/ic=; fh=dAK+yhOFIV5Po95W9c/iQXBChlUr4XXIkSPXK6Y1VnA=; b=UgTd9bberKvU7a+eSb4fNSEhUyBo1rkSQOls34PFvLrr1TJHS5CdDDnHAiXxRm+uGg UPPkrhu8yZvQsbYtWb5YHEsqq880jaq+rVoioVDeFGuSM2STFY4fktOFU4RNnXSuYZ6J 3iACB2RoH6HNnSSD69aeIkj92nSzFxAonsvyNlwEByO8Bfijgw0w/2xqlQXZ/xZcAaLB uLWZsfPzXHDmzbvWysg4SLlFZetyN2+dGnidDpZ8uLKrfxAZ92P91V89K0rzqw/RN8Ro niT5Apdd3vxOuCpTuFZ4cqSMfm3EI4SqWjbSsgvtWdEO5rLWY/9bUP3zN7t0Annsxxc9 PC5Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cvClbgIK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-143376-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143376-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g12-20020a170906198c00b00a51c962e582si2023359ejd.936.2024.04.12.14.21.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 14:21:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143376-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=@kernel.org header.s=k20201202 header.b=cvClbgIK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-143376-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143376-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 30A081F22759 for ; Fri, 12 Apr 2024 21:21:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C76C1152171; Fri, 12 Apr 2024 21:21:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cvClbgIK" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E73F81494A1; Fri, 12 Apr 2024 21:21:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712956900; cv=none; b=oiTKoB6+uSF0WE17n5dPGZO9sP/ESqmg2H/kvVR21NolZT5rZAnFXCybA64kby80ZESl9rbNPSFR3v5jwdOlGuIiev1rzxuu6bZPJdrVv5/gwjnIFDKMpAMm3atxLk3e91dtspWUi/8lcFnZkTyYlb7ua6+HqU85KrgEWwjsK7k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712956900; c=relaxed/simple; bh=BZz4CCyUCnZ0/06uL3h2AQjRd0Le7U9Oer2B28nM9wA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ubG8gGuCdJbsou6Ii0IlUoIcDLn+qcwR5+FrqKjS7UgWYlx36M5hr/LhCf84jcK07+JvfiYyLeEEjpwYoZCGGQG5SgmvOo1DZOV2ZgBUjCUNEuZYzO92by5k1OS1RTQva84f4GWo9aLbocx947jNjzkTgoM0wZKRjR2IWWVrNPk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cvClbgIK; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 579C2C113CC; Fri, 12 Apr 2024 21:21:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712956899; bh=BZz4CCyUCnZ0/06uL3h2AQjRd0Le7U9Oer2B28nM9wA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cvClbgIKLYDiTT2Osk8I4Mc/vrMi7c/Sa+nAEpwcf5MctT8X6PzsV+nS93exiHVdY 2vPpt7xoeYs6DU7X+C1XW/vaNhbBo9kAK2LnqWQemFZRdbTIJXoLbe7QUguXr+eY7L B186099umoeSpWzBRdkBSoB3rcNZ/mUMwGQszkIcXTrjTwhbQmQpZ5lM3caVwQPZwi +SD9YPgwv49fLeprSVHDewmfPCd0x9fQ2CteSfnE5Lj2UudDNTCvCzNn7bgmTvDGOh 6/SRKyppP6Ow6mIH5s9lNXE+su+8TiEJfSr+KGX6CPK6yqeILt0DbuHker4iznVdeg D4RzAjUpSTGiw== Date: Fri, 12 Apr 2024 14:21:36 -0700 From: Nathan Chancellor To: Arnd Bergmann Cc: Kees Cook , Arnd Bergmann , Steffen Klassert , Herbert Xu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Nick Desaulniers , Bill Wendling , Justin Stitt , "Gustavo A. R. Silva" , Leon Romanovsky , Lin Ma , Simon Horman , Breno Leitao , Tobias Brunner , Raed Salem , Netdev , linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH] [RFC] xfrm: work around a clang-19 fortifiy-string false-positive Message-ID: <20240412212136.GD2252629@dev-arch.thelio-3990X> References: <20240216202657.2493685-1-arnd@kernel.org> <202402161301.BBFA14EE@keescook> <763214eb-20eb-4627-8d4b-2e7f29db829a@app.fastmail.com> <20240409161517.GA3219862@dev-arch.thelio-3990X> <20240410174540.GB3649628@dev-arch.thelio-3990X> <773febee-ace3-4ad6-8ff6-04563dbbb759@app.fastmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <773febee-ace3-4ad6-8ff6-04563dbbb759@app.fastmail.com> On Thu, Apr 11, 2024 at 01:35:05PM +0200, Arnd Bergmann wrote: > On Wed, Apr 10, 2024, at 19:45, Nathan Chancellor wrote: > > > Unfortunately, I have no idea why it is complaining nor why your patch > > resolves it but the combination of FORTIFY_SOURCE and KASAN certainly > > seems like a reasonable place to start looking. I will see if I can come > > up with a smaller reproducer to see if it becomes more obvious why this > > code triggers this warning. > > I know at least why my patch avoids the warning -- it removes the > call to memset() that contains the check. Yeah duh... :/ I should have realized that before I sent that message heh. > Unfortunately that still doesn't explain what caused it. Right, I'll see if I can cvise something out now that we have a more isolated set of conditions. I guess the only question will be if I can build a file preprocessed with CONFIG_KASAN=y will build with and without '-fsanitize=kernel-address'... Cheers, Nathan