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 0A4F24A11; Sat, 26 Jul 2025 21:47:59 +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=1753566480; cv=none; b=axwMFKDiA8JzQuB3ODmPAVaNSzfU2YiZBrNt1Pm+LodcXw8rCAATeeYxs5NSVYiyBBaFHFpx/TC5gFOPsivk6wvJ41I+7Mb/LLvYqOiZjMVARVxlOnCm2AfYNkqkIxX5jL4cJqGk5QX5B3Dkgd5GvuC/zZqeOeWg0I4kkP/T7DY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753566480; c=relaxed/simple; bh=/eYVX8SoAB6x3E1/nt7tNV75VsKCSwlna2pvOjAdRkY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BDFcYlHgG0bHE0u+Bbu8i8KkCwBz81yZtZNmgTYafCMqO79+QCwmasg6TRgTkrbfq9bGNGQgUIWPmHdDMJgvyjXHBDSK5coPJMuW1zkKHhKpm5p8lnTWR8tWiTz7bPWK+0fUzAINB/eB43D2PbDPHtUIBpbo1EC0duLveibShIA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fLV+aIK/; 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="fLV+aIK/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FF06C4CEF4; Sat, 26 Jul 2025 21:47:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753566479; bh=/eYVX8SoAB6x3E1/nt7tNV75VsKCSwlna2pvOjAdRkY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fLV+aIK/Vze5Yi37yRjGGquqtluZaj6oEyf8QVw+wrbGGLvpPqO/3VWgN6Q1uJ3EQ QH0nRrCHz1m2MVaid0DwO/ZAreS3vZit+HvBLazabv8sPBvyPMeFsxbcwMrKLtctLL j3NuYhUDBuP296I9Gm2LbU3o4w0jf03jgW1XCsrOoQO/rnS2XvncxSS5g/BxbXsPUY cZFoUBccYezObyf23E1vFbZZhbN05/QUjpb9Nu6YNxWPCEvwX+Xct1jvhL6BlIkWyO EQM6085jWFo3sxIkJ4QMkSe5eI9/li5cIvDNYY225Ouro0eBfYuV1C42m7ggGqabpt /L2PyqAmEpzaQ== Date: Sat, 26 Jul 2025 14:47:59 -0700 From: Kees Cook To: Nathan Chancellor Cc: Arnd Bergmann , Will Deacon , Ard Biesheuvel , Catalin Marinas , Jonathan Cameron , Gavin Shan , "Russell King (Oracle)" , James Morse , Oza Pawandeep , Anshuman Khandual , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Paolo Bonzini , Mike Rapoport , Vitaly Kuznetsov , Henrique de Moraes Holschuh , Hans de Goede , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , "Rafael J. Wysocki" , Len Brown , Masami Hiramatsu , Michal Wilczynski , Juergen Gross , Andy Shevchenko , "Kirill A. Shutemov" , Roger Pau Monne , David Woodhouse , Usama Arif , "Guilherme G. Piccoli" , Thomas Huth , Brian Gerst , Marco Elver , Andrey Konovalov , Andrey Ryabinin , Hou Wenlong , Andrew Morton , Masahiro Yamada , "Peter Zijlstra (Intel)" , Luis Chamberlain , Sami Tolvanen , Christophe Leroy , Nicolas Schier , "Gustavo A. R. Silva" , Andy Lutomirski , Baoquan He , Alexander Graf , Changyuan Lyu , Paul Moore , James Morris , "Serge E. Hallyn" , Nick Desaulniers , Bill Wendling , Justin Stitt , Jan Beulich , Boqun Feng , Viresh Kumar , "Paul E. McKenney" , Bibo Mao , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, x86@kernel.org, kvm@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, linux-acpi@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-efi@vger.kernel.org, linux-mm@kvack.org, kasan-dev@googlegroups.com, linux-kbuild@vger.kernel.org, linux-hardening@vger.kernel.org, kexec@lists.infradead.org, linux-security-module@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH v4 0/4] stackleak: Support Clang stack depth tracking Message-ID: <202507261446.8BDE8B8@keescook> References: <20250724054419.it.405-kees@kernel.org> <20250726004313.GA3650901@ax162> 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: <20250726004313.GA3650901@ax162> On Fri, Jul 25, 2025 at 05:43:13PM -0700, Nathan Chancellor wrote: > ld.lld: error: undefined symbol: __sanitizer_cov_stack_depth > >>> referenced by atags_to_fdt.c Proposed fix: https://lore.kernel.org/lkml/20250726212945.work.975-kees@kernel.org/ > kernel/kstack_erase.c:168:2: warning: function with attribute 'no_caller_saved_registers' should only call a function with attribute 'no_caller_saved_registers' or be compiled with '-mgeneral-regs-only' [-Wexcessive-regsave] Proposed fix: https://lore.kernel.org/lkml/20250726212615.work.800-kees@kernel.org/ > In file included from kernel/fork.c:96: > include/linux/kstack_erase.h:29:37: error: passing 'const struct task_struct *' to parameter of type 'struct task_struct *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] > 29 | return (unsigned long)end_of_stack(tsk) + sizeof(unsigned long); > | ^~~ > include/linux/sched/task_stack.h:56:63: note: passing argument to parameter 'p' here > 56 | static inline unsigned long *end_of_stack(struct task_struct *p) > | ^ Proposed fix: https://lore.kernel.org/lkml/20250726210641.work.114-kees@kernel.org/ Thanks for the reports! :) -Kees -- Kees Cook