From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 C3EEE3F2117 for ; Tue, 30 Jun 2026 10:44:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782816284; cv=none; b=VoM0y1Sq5ADJlZFLam+p0wlLKwnd2nwggr4RbgCtQ1JEqCZi3Y8losr7MImb7E4w6Yxq3y9oAI0zRURJ7YHm/YJuXPjs8DMgP+1tttfDsTsBHEXFHOoqiaRwPtW7o+Av0CWP7q7Q3fCzI7SArSBzmKH1W03cWTvHRDzugtjX3Vs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782816284; c=relaxed/simple; bh=D73gXxvSsKNpcRLSeHzoBvTQVHB8Mwtm04/80Z6xaUg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=N0svvNtnkbEKmDryXTyhKe1a0bozQOasP9Q4f3WB7+L81BHsJj3u+kCvgpZL31eZl5E/CQlWBMjzzPlymicIHjDDvkVn0AXH0P1V8vcCXwDmaL8GfNFUraSrsZEfw/Ue0kjyYuCTUhaNYJI9Sb5FrXwQiOGDhsmHGjbpZ7rXs24= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=KMaH/4QZ; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="KMaH/4QZ" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=NaBOlFzhDVA5Nz1NsyiC2Yv916VoSgRVabo1ZzAitvY=; b=KMaH/4QZ4PLRj6TXmQREKR6wbL 8Seu16RkAySanqW1fZ9L9K848jFSAJwkZvGgTptviqs0GTutepvhsa0F80ShJpQ47CzwUtVOFKeLR sEblrq8HxUOedmDWmRL4sE0nZLci49ImFbMwfRhPp8yhCvApQnMiV/OMLLKtUf46wCknr7zDE8o6g 10WY0ju7sIRMVrlZ0helSeNKheTmRyGDxt+zieDCasvw9ucpzDh+hSveW173+7GNcDjXbjoKdOdMb 4MYsHPAURHv4oIxwva9Rymwkn6nDWCl4KW6o1xcJ5yD8Lo/qQRI7y6jEmFNcNfJaRIprxdotiek/s c4HF9QVQ==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.99.1 #2 (Red Hat Linux)) id 1weVxE-00000004oXQ-0l4v; Tue, 30 Jun 2026 10:44:36 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 3CBE730020B; Tue, 30 Jun 2026 12:44:35 +0200 (CEST) Date: Tue, 30 Jun 2026 12:44:34 +0200 From: Peter Zijlstra To: Dmitry Antipov Cc: Josh Poimboeuf , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: objtool: undefined stack state in folio_zero_user() Message-ID: <20260630104434.GC751831@noisy.programming.kicks-ass.net> References: <35822cf3c35fc6621621f858e94a2b0ce19abf88.camel@yandex.ru> 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: <35822cf3c35fc6621621f858e94a2b0ce19abf88.camel@yandex.ru> On Mon, Jun 22, 2026 at 04:23:46PM +0300, Dmitry Antipov wrote: > As of ef0c9f75a195 ("lib: Add stale 'raid6' directory to .gitignore file") > with clang 22.1.8 and KMSAN enabled, objtool stucks in folio_zero_user(): > > $ ./tools/objtool/objtool --hacks=jump_label --hacks=noinstr \ > --hacks=skylake --ibt --prefix=16 --orc --retpoline --rethunk \ > --static-call --uaccess --no-unreachable --noinstr --unret --link \ > vmlinux.o > vmlinux.o: warning: objtool: folio_zero_user+0x947: undefined stack state > vmlinux.o: error: objtool: folio_zero_user+0x947: unknown CFA base reg -1 > > Dmitry > 0000000001533940 : > 1534272: 48 89 e1 mov %rsp,%rcx > 1534275: 48 85 ed test %rbp,%rbp > 1534278: 8b 54 24 1c mov 0x1c(%rsp),%edx > 153427c: 0f 85 c2 00 00 00 jne 1534344 > 1534282: 31 c0 xor %eax,%eax > 1534284: 48 89 cc mov %rcx,%rsp > 1534287: 4c 89 f7 mov %r14,%rdi ;; HERE ... > 1534327: 48 89 64 24 78 mov %rsp,0x78(%rsp) ... > 153433a: 48 8b 4c 24 78 mov 0x78(%rsp),%rcx > 153433f: e9 31 ff ff ff jmp 1534275 This is well insane codegen, and I cannot blame objtool for hating on it -- in fact, I hate on it too. Let me try and figure out how best to fix this insane compiler output.