From mboxrd@z Thu Jan 1 00:00:00 1970 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 2FD8C1CF7AF; Wed, 11 Jun 2025 17:50:57 +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=1749664259; cv=none; b=oI1i5R+yjAchf1ZeUeamX0FuxMXKQuMDDRuZKSXXDElQWd82hmGBFKHAhjp47+XWO0epQGUMrTlZfHtZMI5ge+S0qphv/nvTFBGpHHiGHDULCIRh7KMGyOnTcOUMxjc7STCWN06O1/V1rSkacExtV4mWfuCvHd86KX0JYNVYKkg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749664259; c=relaxed/simple; bh=KDBiD63Sl3N9MizVVWXllFsrA9RrPUV5pY0jwlUgWqM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LdszyqUr+s7sSaRN7WwqzqAxxzVbqZXp+yIcK74ZrKP9LsYNo8GMAtinrb2X18a0E/RTCGtfK0fsDha6BF+lH4MLsQzfenmQCDdz33oKV9mYOQg3Wo0aBXQimrcJZSLnwRUdRK6INS28xG1IRKfVGSdxL+Pp4zSuRnWZFfYUomo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KWU3Xda+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KWU3Xda+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDAB0C4CEEA; Wed, 11 Jun 2025 17:50:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1749664257; bh=KDBiD63Sl3N9MizVVWXllFsrA9RrPUV5pY0jwlUgWqM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KWU3Xda+q3cgL75t1mHyr4jThD6TxtcnaTWgt3VhDTPuqSJpfCbAuaMKGM1UsXBsI I0A+Kf/mwGQ9aZ/uuudKA1/GMich4QljGT5cmIL98A4izONvPJcby1rWal44MmiBB3 3BHQzFb0YhrVQVYVsMnd0C37V1R6yKUbHd/RGDhvxIuaRpdnr0T6yW4s0Iva3kmeED HO4VDxAdxVT322N8miL/EpQUfRaVVcD6SBqKiMhaX+kD632aC7YdPYZZpeJpMAoMCh q/gUG8j0STtwTlGkDzqS6UMEDRmQ33wAt6vggPN1UztGKQYrQb1JDIugJ0bgKN+/rB LP7nsN6fGcH5w== Date: Wed, 11 Jun 2025 10:50:52 -0700 From: Nathan Chancellor To: Dan Carpenter Cc: Naresh Kamboju , clang-built-linux , "open list:KERNEL SELFTEST FRAMEWORK" , open list , lkft-triage@lists.linaro.org, Anders Roxell , Arnd Bergmann , Sasha Levin Subject: Re: selftests/filesystem: clang warning null passed to a callee that requires a non-null argument [-Wnonnull] Message-ID: <20250611175052.GA2307190@ax162> References: Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Jun 11, 2025 at 07:47:39PM +0300, Dan Carpenter wrote: > This seems like a Clang bug, right? The test for _Nullable is reversed > or something? My copy of unistd.h has /* Execute program relative to a directory file descriptor. */ extern int execveat (int __fd, const char *__path, char *const __argv[], char *const __envp[], int __flags) __THROW __nonnull ((2, 3)); so I think the warning is valid in this case. I will note that tools/testing/selftests/exec/recursion-depth.c uses execve() with a NULL argv and disables -Wnonnull so maybe that should happen for this test case too? Or should that NULL be changed into a ""? > On Thu, Jun 05, 2025 at 05:41:01PM +0530, Naresh Kamboju wrote: > > Regressions found on arm, arm64 and x86_64 building warnings with clang-20 > > and clang-nightly started from Linux next-20250603 > > > > Regressions found on arm, arm64 and x86_64 > > - selftests/filesystem > > > > Regression Analysis: > > - New regression? Yes > > - Reproducible? Yes > > > > First seen on the next-20250603 > > Good: next-20250530 > > Bad: next-20250603 > > > > Test regression: arm arm64 x86_64 clang warning null passed to a > > callee that requires a non-null argument [-Wnonnull] > > > > Reported-by: Linux Kernel Functional Testing > > > > ## Build warnings > > make[4]: Entering directory '/builds/linux/tools/testing/selftests/filesystems' > > CC devpts_pts > > CC file_stressor > > CC anon_inode_test > > anon_inode_test.c:45:37: warning: null passed to a callee that > > requires a non-null argument [-Wnonnull] > > 45 | ASSERT_LT(execveat(fd_context, "", NULL, NULL, > > AT_EMPTY_PATH), 0); > > | ^~~~ > > > > ## Source > > * Kernel version: 6.15.0-next-20250605 > > * Git tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next.git > > * Git sha: a0bea9e39035edc56a994630e6048c8a191a99d8 > > * Toolchain: Debian clang version 21.0.0 > > (++20250529012636+c474f8f2404d-1~exp1~20250529132821.1479) > > > > ## Build > > * Test log: https://qa-reports.linaro.org/api/testruns/28651387/log_file/ > > * Build link: https://storage.tuxsuite.com/public/linaro/lkft/builds/2xzM4wMl8SvuLKE3mw3csiuv3Jz/ > > * Kernel config: > > https://storage.tuxsuite.com/public/linaro/lkft/builds/2xzM4wMl8SvuLKE3mw3csiuv3Jz/config > > > > -- > > Linaro LKFT > > https://lkft.linaro.org