Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp367416rwe; Thu, 25 Aug 2022 01:34:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR45oVmSj5Uw9HkDd2zQFYXS1IJTRMisAAezRBfbQkoZhg1+4Xz56B+uWFJz8Q4BBmv159mp X-Received: by 2002:a63:8341:0:b0:42a:cd2e:2732 with SMTP id h62-20020a638341000000b0042acd2e2732mr2448188pge.299.1661416493023; Thu, 25 Aug 2022 01:34:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661416493; cv=none; d=google.com; s=arc-20160816; b=W3GkkLrOJOTLc4igRJmlcaXm9N1rnEc0wNOs1xwTHNtHu5XbrQNH86Ucd5ElUIH55m 4JC27RzYMHbnRb4F/RAZX6R8s/N/jPlF9nXWa8rwS9f7NJbjHFs4qDa0C+tHL2TEN4Pd o5xb+Kq/bvXiCVW7oR2nhtjvDdVH2qu72ko0hcu6leahxBxRdCa/D02cKJhL3b2S8xB+ spZ8C3o6sUg0jINPsc8FkxmYJS9pPos9Mw4FxqajywwnLfwCFeWAmKIC70CkndPSroQZ 7sYFGKRRIEdEEPvjiY35DP3Emo8mu2JFV4WKwiNL/cgX0SLiDyq/jRTgd3+bypwdc+0i UgEQ== 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=UGRq4akNUG59xkhRh7o3k1+G/F+GgEUlb+NCJhtY/0U=; b=hgO087E1KODHmuHrd4Jr+ljz2VFQERrA0twHbwvlVWLJ/L4fawT8GREbCoX7/rKGpB Szsfw3O1LnYxeQzQqHl927F/1kNfhYiAYhCvjSbyJLoARdGQVQSPN56Gb4UNl8473Yia YsVAmqd6OcaJfQWw8DiLO56/FDsLwzHy9nMQZuQedpJZf+3BvLNZtJjJ4pexLrAD8ZW0 0S1fiStQ815onnPNyRFaCT44i0ryBDi+tsKhlz5/qdSroacvy+XCrCbF/p+Up630ydzQ 2MdzU+y0Nusd3ICj1TGC70JpvwvQqO/qXE1ObpUZbi1wZProtAIycNYG+28eFCzUzduH I62w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=qPZKoaJp; 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=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iq21-20020a17090afb5500b001faf3df0d9esi3176192pjb.94.2022.08.25.01.34.42; Thu, 25 Aug 2022 01:34:53 -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=@alien8.de header.s=dkim header.b=qPZKoaJp; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238576AbiHYHzJ (ORCPT + 99 others); Thu, 25 Aug 2022 03:55:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229592AbiHYHzD (ORCPT ); Thu, 25 Aug 2022 03:55:03 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15D495FCB for ; Thu, 25 Aug 2022 00:54:53 -0700 (PDT) Received: from zn.tnic (p200300ea971b9859329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:971b:9859:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id B91A71EC05DE; Thu, 25 Aug 2022 09:54:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1661414091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=UGRq4akNUG59xkhRh7o3k1+G/F+GgEUlb+NCJhtY/0U=; b=qPZKoaJpGAb3SYeJlG33++UcEWLxXSSE2I21kPG8ShV3V7lT2yPEIowEA5iYXwSNmMFMFX OaEQsDpI+u6g6LzSTbPIyO/Q0A3s3TxqmjsaPXfRPYnpYUiza1ZmjCtsI2oTWKvipFJv74 UaJwq+2ZZvLzrUSYG/DBkdSeA3IFON8= From: Borislav Petkov To: X86 ML Cc: LKML Subject: [PATCH] x86/microcode: Remove ->request_microcode_user() Date: Thu, 25 Aug 2022 09:54:45 +0200 Message-Id: <20220825075445.28171-1-bp@alien8.de> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 From: Borislav Petkov 181b6f40e9ea ("x86/microcode: Rip out the OLD_INTERFACE") removed the old microcode loading interface but forgot to remove the related ->request_microcode_user() functionality which it uses. Rip it out now too. Signed-off-by: Borislav Petkov --- arch/x86/include/asm/microcode.h | 3 --- arch/x86/kernel/cpu/microcode/amd.c | 7 ------- arch/x86/kernel/cpu/microcode/intel.c | 17 ----------------- 3 files changed, 27 deletions(-) diff --git a/arch/x86/include/asm/microcode.h b/arch/x86/include/asm/microcode.h index 0c3d3440fe27..7f7800e15ed0 100644 --- a/arch/x86/include/asm/microcode.h +++ b/arch/x86/include/asm/microcode.h @@ -32,9 +32,6 @@ enum ucode_state { }; struct microcode_ops { - enum ucode_state (*request_microcode_user) (int cpu, - const void __user *buf, size_t size); - enum ucode_state (*request_microcode_fw) (int cpu, struct device *, bool refresh_fw); diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c index 8b2fcdfa6d31..5f38dd75cbc5 100644 --- a/arch/x86/kernel/cpu/microcode/amd.c +++ b/arch/x86/kernel/cpu/microcode/amd.c @@ -924,12 +924,6 @@ static enum ucode_state request_microcode_amd(int cpu, struct device *device, return ret; } -static enum ucode_state -request_microcode_user(int cpu, const void __user *buf, size_t size) -{ - return UCODE_ERROR; -} - static void microcode_fini_cpu_amd(int cpu) { struct ucode_cpu_info *uci = ucode_cpu_info + cpu; @@ -938,7 +932,6 @@ static void microcode_fini_cpu_amd(int cpu) } static struct microcode_ops microcode_amd_ops = { - .request_microcode_user = request_microcode_user, .request_microcode_fw = request_microcode_amd, .collect_cpu_info = collect_cpu_info_amd, .apply_microcode = apply_microcode_amd, diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c index 025c8f0cd948..1fcbd671f1df 100644 --- a/arch/x86/kernel/cpu/microcode/intel.c +++ b/arch/x86/kernel/cpu/microcode/intel.c @@ -916,24 +916,7 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device, return ret; } -static enum ucode_state -request_microcode_user(int cpu, const void __user *buf, size_t size) -{ - struct iov_iter iter; - struct iovec iov; - - if (is_blacklisted(cpu)) - return UCODE_NFOUND; - - iov.iov_base = (void __user *)buf; - iov.iov_len = size; - iov_iter_init(&iter, WRITE, &iov, 1, size); - - return generic_load_microcode(cpu, &iter); -} - static struct microcode_ops microcode_intel_ops = { - .request_microcode_user = request_microcode_user, .request_microcode_fw = request_microcode_fw, .collect_cpu_info = collect_cpu_info, .apply_microcode = apply_microcode_intel, -- 2.35.1