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 0C0233C26 for ; Tue, 31 Oct 2023 17:06:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="UtFDBtrj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E3A1C433C9; Tue, 31 Oct 2023 17:06:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1698772004; bh=LSaU24fW/93mXA/Q0ZqMnaHy79KV+D5kMWHSvCoXEO8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UtFDBtrjKcqPhN/6GfaCbY6VSRpcKi/VWdgKeNw3+xX4YGIXLg6vQ9QjKp1nJ1w1z imWYrCrWmhXutFOOzTS/D7bUvDZvy23wbLTQA6NGf+u7L/jpK5lBuxQq/RkwKpfCPM Zcd0aH5ETDvVA0V2uDkapgohnd/KD6D2HK145hCg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, John Sperbeck Subject: [PATCH 6.1 86/86] objtool/x86: add missing embedded_insn check Date: Tue, 31 Oct 2023 18:01:51 +0100 Message-ID: <20231031165921.208269029@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231031165918.608547597@linuxfoundation.org> References: <20231031165918.608547597@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: John Sperbeck When dbf460087755 ("objtool/x86: Fixup frame-pointer vs rethunk") was backported to some stable branches, the check for dest->embedded_insn in is_special_call() was missed. The result is that the warning it was intended to suppress still appears. For example on 6.1 (on kernels before 6.1, the '-s' argument would instead be 'check'): $ tools/objtool/objtool -s arch/x86/lib/retpoline.o arch/x86/lib/retpoline.o: warning: objtool: srso_untrain_ret+0xd: call without frame pointer save/setup With this patch, the warning is correctly suppressed, and the kernel still passes the normal Google kernel developer tests. Signed-off-by: John Sperbeck Signed-off-by: Greg Kroah-Hartman --- tools/objtool/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -2478,7 +2478,7 @@ static bool is_special_call(struct instr if (!dest) return false; - if (dest->fentry) + if (dest->fentry || dest->embedded_insn) return true; }