From patchwork Fri May 19 09:40:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 96339 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1110806vqo; Fri, 19 May 2023 02:56:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ71rREzmRagaFwpmbHHlRTl8fhq0IKRNsMoGhBra0bhWBVrzXCpk6MrtiJinBA3OM2vXmZU X-Received: by 2002:a17:90a:c093:b0:253:9131:4955 with SMTP id o19-20020a17090ac09300b0025391314955mr88200pjs.34.1684490200442; Fri, 19 May 2023 02:56:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684490200; cv=none; d=google.com; s=arc-20160816; b=YsSHT3sS+ekblE19s3ZutRdlWJjm1emS7T/4i11Y/j7ejrTW8FCGWZAqM6fcIsBAIS 2azdYtpgH9v7VHIEYZzLQsNcTjjug1rnLgekZz4uljCe1T6jAXgXU46pGVRf3mMh/Esn GSE3gFxEMy9Fe0cxsLaUm1tz5XpeQfJVSZAj5aJKy9G0UVmB5H5P2ZdSnuogA/BH7ybS dg0wS6qaG0/awIloyzkhzoAPaT90DNl2J4U6opBVmSV+Isv3ASfGTbVa2mBUankzjFVH SeD01hUIYuYA3SzQHexeGhunV7Ch5UkWcahgWyimnS/SCUndIt7nlGMxwjBfExYl3QzZ 1KkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=DEi8i4KLoiEi3W7J/Chptf+Bt/dh72wfaSeoeqgHJPI=; b=jcjyL7tr4tE/xU3/e7BCcXUa72tm1KxIsnBaY38CdIxTwMnjYVkdSvHbBb1pOmbQZc Cw95vmAW8wZwKDfi08OFyvk86bqWj3IfBClH4qVlsLZCwzhvILMEvwixaDuHPfAS+R2l K1ZPLes3ufflzEns2J0WKPN3DOJDDkM/1QkO5rlKcggImd63Am2dbkav6MiyJaii9Mch VvqlFtzmk4bIr6A7u/xAqufC8roMp4JEUgkXykwhqzRwWfs6T4M75ef0LusHT+dv40s9 GIHf5jYYZPKkUS6P73tuMbFy/mi9vd9dc9CNQl+vPV0nM+/4+ycUzKatv285OfdhIVOC 7M7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DDLt1yXs; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bt6-20020a17090af00600b002507cbb009bsi1465944pjb.112.2023.05.19.02.56.26; Fri, 19 May 2023 02:56:40 -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=DDLt1yXs; 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 S231442AbjESJnz (ORCPT + 99 others); Fri, 19 May 2023 05:43:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230290AbjESJnW (ORCPT ); Fri, 19 May 2023 05:43:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A84E213A for ; Fri, 19 May 2023 02:41:31 -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 62314655A8 for ; Fri, 19 May 2023 09:40:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C9A3C433EF; Fri, 19 May 2023 09:40:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684489252; bh=sczsbRpuY6qul0O2IVlTqPIb+oBjrjpfMfChzCygpVA=; h=From:To:Cc:Subject:Date:From; b=DDLt1yXsc4kiSMPPgaoLRVpN1ga2Jv10Ch5WxuSZ/NGfEMjcXINZ2rm5YShP05rhK CwNvEBpoLIf1AYj+LZ2loA306P1ZEwe2YNdSkgIPFjQhk7bTIrp4+olzDAw/ooqht2 uJX6wY6WHiOsNcFjOQlHHUh1sB28ua4s0acCDfR/UfEk8W9z2wSwANhgxIjcghnvCF 9cFqLTHhwNVuyxKfBuJqaobFUXx/s/rSlXUdrZx40vTXgJcVUGk9MfdxfeF+nKiI3j fORBXXpWQrj553ABJycTVZ219zTqxzk4vKIWx4AYptnv5t31/Jz+VucbynL6Sge9gV jEAvP7FnwD8vQ== From: Arnd Bergmann To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Peter Zijlstra Cc: Arnd Bergmann , "H. Peter Anvin" , Kees Cook , Song Liu , Nadav Amit , linux-kernel@vger.kernel.org Subject: [PATCH] x86: alternative: add __alt_reloc_selftest prototype Date: Fri, 19 May 2023 11:40:27 +0200 Message-Id: <20230519094035.11259-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766315996257533628?= X-GMAIL-MSGID: =?utf-8?q?1766315996257533628?= From: Arnd Bergmann The newly introduced selftest function causes a warning when -Wmissing-prototypes is enabled: arch/x86/kernel/alternative.c:1461:32: error: no previous prototype for '__alt_reloc_selftest' [-Werror=missing-prototypes] Since it's only used locally, add the prototype directly in front of it. Fixes: 270a69c4485d ("x86/alternative: Support relocations in alternatives") Signed-off-by: Arnd Bergmann --- arch/x86/kernel/alternative.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index 93aa95afd005..4338bd74b663 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -1458,6 +1458,7 @@ static noinline void __init int3_selftest(void) static __initdata int __alt_reloc_selftest_addr; +extern void __init __alt_reloc_selftest(void *arg); __visible noinline void __init __alt_reloc_selftest(void *arg) { WARN_ON(arg != &__alt_reloc_selftest_addr);