Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp848081imw; Wed, 13 Jul 2022 09:03:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tkuxqPKEWpl7JvpYELiDGVZhhr3NuAkmq1jjcr0YPY9MblyvzaPQDsN61VWQJbW0PPmza4 X-Received: by 2002:a63:86c2:0:b0:415:cb:e12 with SMTP id x185-20020a6386c2000000b0041500cb0e12mr3549950pgd.144.1657728182027; Wed, 13 Jul 2022 09:03:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657728182; cv=none; d=google.com; s=arc-20160816; b=psPi2RTDH/Fk4yblfv8OSSid+89APn26Imtd4h1ddcVguH71DHQTxRwxTtttpAqxar bWrGUpz78Z1Nv7pzuBI3/hwI+FwDEpmiJfqoZ8PyH2kMoxHBJdTu92JEaaDXoIr7eMKn eaThB9VtSrptwRSOlPOV+rB4jqU5OiD0RsQrng/yKUqe7IAIYHwUJJUdtBh0VJ0Q6Wg1 jbQCvGn3Gj/M+9m6c2KpP08UWD697oNTaVCqFFtOfy6hGrMlba5LMcEABgXxlhWAaWe4 Wdo2XeS/hWx4/7xW+UJuTIG3fXDCjwrHwdkjejpbTZqWXUkgXQJN2Mq3eup7i5HinQtR QvjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=P/y1kSZWrmMveCY0nergqiCux1bbGMRtY4xVx4kPGGQ=; b=R7/cLZL/tRYOIb88/4Av5zhJV1BB3WrCDOGVngoQsnBEkdq8PqiGF7EgsZVobW2297 GZl2OyqJ7SpJfkYjvIcv5sYjA1M4hFHtwv+3vsIGuKW1iwCdPSBX36wTrW3+InB0GIkg sDlZcX42zaQKDf8e1kQ8zQosCTcm/N6UD78gZ4QvUmcCfILUwkRZu8Xjko3GKY6hV4Wo 7yK+0puQDCye/b+BOdOwjqQsVMmRhDT+NfZqFK6QwX60blHdbnNJXDlmaifEWqHEzvNt +0p5K65tAazzvV4CBO+M8v537/vNnX7Ur2JZJ2UhKpjqXRXoUjdUFd6VjYnYa6OisnyY dM7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="o/c0IfS2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i62-20020a638741000000b004160cd9df90si9917745pge.668.2022.07.13.09.02.25; Wed, 13 Jul 2022 09:03:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="o/c0IfS2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236951AbiGMPsE (ORCPT + 99 others); Wed, 13 Jul 2022 11:48:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236968AbiGMPsC (ORCPT ); Wed, 13 Jul 2022 11:48:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 940E54F1A6 for ; Wed, 13 Jul 2022 08:48:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2403261972 for ; Wed, 13 Jul 2022 15:48:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48F54C3411E; Wed, 13 Jul 2022 15:48:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657727280; bh=P/y1kSZWrmMveCY0nergqiCux1bbGMRtY4xVx4kPGGQ=; h=Date:From:To:Cc:Subject:From; b=o/c0IfS29fTaXvDU7EwJtnTo8GUzzlHqm/LoCuYcWW2tE6MUR277/25Ti+n/k3K/L elZzki4S0Ac5aCSONwgypwcie7hYwxrSH5zFY1LbyOwyScozGWnjYUwjJXsJ2S4+im vZ4gv/cJt51qbJybybqZw+Ndjk+1TS5zytC3t7S8gljRKZvR+kG75+WZp1Jkm8Te5V DR2WQnRWo1VAcK7iBRcwS6rkFghiYxHF9m4vhs9Sos6u1smme3ZBmsu0O6TkzB4ttp jlGnECxlEbSuMrrKFGknXE37tbc9YzeOhAZl2Q4EotjaQnlF4fGRvVOgTjM4eP1u5A HdVMJqPXVNj4g== Date: Wed, 13 Jul 2022 08:47:58 -0700 From: Nathan Chancellor To: Josh Poimboeuf , Peter Zijlstra Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: objtool "'naked' return found in RETHUNK build" with clang + CONFIG_K{A,C}SAN=y Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Josh and Peter, After commit 9bb2ec608a20 ("objtool: Update Retpoline validation") and commit f43b9876e857 ("x86/retbleed: Add fine grained Kconfig knobs"), I see a spew of objtool warnings when building certain configurations with clang. Examples below, they appear to trigger in every single file. With x86_64_defconfig + CONFIG_KASAN=y: arch/x86/ia32/audit.o: warning: objtool: asan.module_ctor+0x11: 'naked' return found in RETHUNK build arch/x86/ia32/audit.o: warning: objtool: asan.module_dtor+0x11: 'naked' return found in RETHUNK build init/version.o: warning: objtool: asan.module_ctor+0x11: 'naked' return found in RETHUNK build init/version.o: warning: objtool: asan.module_dtor+0x11: 'naked' return found in RETHUNK build arch/x86/kernel/cpu/rdrand.o: warning: objtool: asan.module_ctor+0x11: 'naked' return found in RETHUNK build arch/x86/kernel/cpu/rdrand.o: warning: objtool: asan.module_dtor+0x11: 'naked' return found in RETHUNK build arch/x86/kernel/fpu/bugs.o: warning: objtool: asan.module_ctor+0x11: 'naked' return found in RETHUNK build arch/x86/kernel/fpu/bugs.o: warning: objtool: asan.module_dtor+0x11: 'naked' return found in RETHUNK build arch/x86/kernel/platform-quirks.o: warning: objtool: asan.module_ctor+0x0: 'naked' return found in RETHUNK build init/calibrate.o: warning: objtool: asan.module_ctor+0x11: 'naked' return found in RETHUNK build init/calibrate.o: warning: objtool: asan.module_dtor+0x11: 'naked' return found in RETHUNK build With x86_64_defconfig + CONFIG_KCSAN=y: arch/x86/ia32/audit.o: warning: objtool: tsan.module_ctor+0x5: 'naked' return found in RETHUNK build init/calibrate.o: warning: objtool: tsan.module_ctor+0x5: 'naked' return found in RETHUNK build init/version.o: warning: objtool: tsan.module_ctor+0x5: 'naked' return found in RETHUNK build arch/x86/kernel/fpu/bugs.o: warning: objtool: tsan.module_ctor+0x5: 'naked' return found in RETHUNK build arch/x86/kernel/cpu/rdrand.o: warning: objtool: tsan.module_ctor+0x5: 'naked' return found in RETHUNK build arch/x86/events/probe.o: warning: objtool: tsan.module_ctor+0x5: 'naked' return found in RETHUNK build arch/x86/kernel/apic/ipi.o: warning: objtool: tsan.module_ctor+0x5: 'naked' return found in RETHUNK build If there is any additional information I can provide or patches I can test, I am happy to do so! Cheers, Nathan