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 E1A7D17BA5 for ; Mon, 10 Mar 2025 20:42:06 +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=1741639327; cv=none; b=kTpgkegWF9aJ41bN4CQbfl3I+J5RIoW6TmQpmwtpZMC9ZxjE0gnExPTw9xDX4/8i0IUsx9/cj7vy/36RLmx+JF7Du3H9IJSN9kZP/GI5VPiAYuyIhukl1E0tdm1lu7KAoezQuiFq/2pQJ6/qrtImHQuwlGsnRcAJOIg4URckmUQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741639327; c=relaxed/simple; bh=z7Qh6hatydvwGrHSzsuo8r/QUB8upnDv8OgSuNImcRs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SnMJ31VskHCmk+FXKU3a2Y1dvPqG1jdSj9owV/05VnKyIzFvwVCkSdUh+eGFgPyFec5frwEx3hp42KDfDkAOspJl7yYjl8IOD9kS1Mahpy5Ayf3E9f+kCay4elDXYQc10ntChPkgfCQixvBDNUFXBGIoyLnSLnyNbmHU0Ayki/o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZFp2fjwl; 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="ZFp2fjwl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E629C4CEE5; Mon, 10 Mar 2025 20:42:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741639326; bh=z7Qh6hatydvwGrHSzsuo8r/QUB8upnDv8OgSuNImcRs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZFp2fjwluFjPWlldVEH4DW1ukwuVQE79XEgX2qtecRDy/l7Xf2cgZ8q5H0y9NolPW V3XJ/G5Wi3rDsZ0SfvFGbLCyykaWpEW8qMgSPCu/ZDLbsHUoLxIH7AKy9WJ4LFtW3S HxzoLptRpoH5ZU7T07/51D4C2Bw+LZ7bgl3s3scWx/mME1WXQNFZJmxk7OXaG5NrtM iOZCFtiWeW/pxmYkgfbDgks/cwvORZ661ilYJqmc/0RdCn/bSECDzhmZo73dehyv4T BzIguU211dUv5WBgDl/3cFvwgF8IAqMNT+er8Xgo42tEr1Qw4MXqWy9ZBkVIk7fHzH 7pI3h+NTo5F+g== Date: Mon, 10 Mar 2025 21:42:01 +0100 From: Ingo Molnar To: Uros Bizjak Cc: Borislav Petkov , x86@kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner , Dave Hansen , "H. Peter Anvin" Subject: Re: [PATCH] x86/hweight: Fix and improve __arch_hweight{32,64}() assembly Message-ID: References: <20250310200817.33581-1-ubizjak@gmail.com> <20250310201227.GXZ89Hq5LVWKHjHBeO@fat_crate.local> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: * Uros Bizjak wrote: > On Mon, Mar 10, 2025 at 9:12 PM Borislav Petkov wrote: > > > > On Mon, Mar 10, 2025 at 09:08:04PM +0100, Uros Bizjak wrote: > > > a) Use ASM_CALL_CONSTRAINT to prevent inline asm that includes call > > > instruction from being scheduled before the frame pointer gets set > > > up by the containing function, causing objtool to print a "call > > > without frame pointer save/setup" warning. > > > > The other two are ok but this is new. How do you trigger this? I've never seen > > it in my randconfig builds... > > It is not triggered now, but without this constraint, nothing prevents > the compiler from scheduling the insn in front of frame creation. Please add: 'Current versions of compilers don't seem to trigger this condition, but without this constraint there's nothing to prevent the compiler from scheduling the insn in front of frame creation.' Thanks, Ingo