From patchwork Tue Jun 15 22:04:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian May X-Patchwork-Id: 1492489 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G4MmR09WYz9sRN; Wed, 16 Jun 2021 08:04:22 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1ltHAP-0006G9-5N; Tue, 15 Jun 2021 22:04:17 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1ltHAN-0006Fu-QB for kernel-team@lists.ubuntu.com; Tue, 15 Jun 2021 22:04:15 +0000 Received: from mail-ed1-f72.google.com ([209.85.208.72]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1ltHAN-0007Sg-IZ for kernel-team@lists.ubuntu.com; Tue, 15 Jun 2021 22:04:15 +0000 Received: by mail-ed1-f72.google.com with SMTP id z16-20020aa7d4100000b029038feb83da57so23168469edq.4 for ; Tue, 15 Jun 2021 15:04:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0tn48tVxrdXZOTU8B+z9DnV3JqQ4c6nLTGfAW1iim5A=; b=Crsg/+LnPBRzMw8dLXS35WQGyyA6Yne68/6348cRepxysGxOrOu1E0JIWgIMGEuqs1 hJlg6e71NlCF0t8CtYADRQMaO6ChaQe+CVfAo9OaUP1Qe+233nAnO+2XbCcZKXjHG+Hk dtbI05C1TKzp6TaqE+Vly9qWY5kHyW3UwAlIC2A12Buor3MgBSlh3kltgtlaOu6a65+z SSf7e11vNP6pZPn5rY6qBvB3pZUdXHe52qeeJ8yaQVP1ygiL96MY9Q/9GdVX7Gk4tgLm TFpPXtiY0VxL+/Pc4/6SIhwGJRUENQ4pN8iE9iEjbNwq1s1YxDqksNPzRqWDPBbOCWPU oFbg== X-Gm-Message-State: AOAM531/dk3fx3c++NnzvxnyvmWfAnUY8bSYDJYwCLMIE3j/zlx+J8OM y+KVRJhgMNkxLErRtmBijkecIRE1cFAEmKq5+RRu2Os52Ul9V2zB20vPt81DxqqaF5mrNf29vkw DM59a3HLonfkJS+8xqFEs/CdkQ2Xwn35tiV+EG+zXjQ== X-Received: by 2002:a05:6402:6c8:: with SMTP id n8mr351701edy.180.1623794655235; Tue, 15 Jun 2021 15:04:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/SmBdsSSzDYszbjRFZKFsWZQY/p4DhzZRSPt8/FTNMXiDjxBdwwlID7cx73x81OxXY96ymQ== X-Received: by 2002:a05:6402:6c8:: with SMTP id n8mr351669edy.180.1623794654958; Tue, 15 Jun 2021 15:04:14 -0700 (PDT) Received: from uws.buildd ([2001:67c:1562:8007::aac:44bb]) by smtp.gmail.com with ESMTPSA id o20sm200801eds.20.2021.06.15.15.04.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Jun 2021 15:04:14 -0700 (PDT) From: Ian May To: kernel-team@lists.ubuntu.com Subject: [SRU][F][PATCH 1/8] UBUNTU: SAUCE: Revert "modules: inherit TAINT_PROPRIETARY_MODULE" Date: Tue, 15 Jun 2021 17:04:01 -0500 Message-Id: <20210615220408.1407292-2-ian.may@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210615220408.1407292-1-ian.may@canonical.com> References: <20210615220408.1407292-1-ian.may@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1932065 This reverts commit 0c7a3184ffcd6f6db7236a57a74ab66d121bba62. Upstream introduced 'module' patches that removed exported symbols that might cause potential disruption and breakage for customers. Temporarily reverting as SAUCE patches to allow customers time to make necessary changes to support patch changes. Signed-off-by: Ian May --- include/linux/module.h | 1 - kernel/module.c | 26 -------------------------- 2 files changed, 27 deletions(-) diff --git a/include/linux/module.h b/include/linux/module.h index 3e01e01f00cc..6eea5d8e0498 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -376,7 +376,6 @@ struct module { unsigned int num_gpl_syms; const struct kernel_symbol *gpl_syms; const s32 *gpl_crcs; - bool using_gplonly_symbols; #ifdef CONFIG_UNUSED_SYMBOLS /* unused exported symbols. */ diff --git a/kernel/module.c b/kernel/module.c index 88a6a9e04f8d..124b50860ac3 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -1429,24 +1429,6 @@ static int verify_namespace_is_imported(const struct load_info *info, return 0; } -static bool inherit_taint(struct module *mod, struct module *owner) -{ - if (!owner || !test_bit(TAINT_PROPRIETARY_MODULE, &owner->taints)) - return true; - - if (mod->using_gplonly_symbols) { - pr_err("%s: module using GPL-only symbols uses symbols from proprietary module %s.\n", - mod->name, owner->name); - return false; - } - - if (!test_bit(TAINT_PROPRIETARY_MODULE, &mod->taints)) { - pr_warn("%s: module uses symbols from proprietary module %s, inheriting taint.\n", - mod->name, owner->name); - set_bit(TAINT_PROPRIETARY_MODULE, &mod->taints); - } - return true; -} /* Resolve a symbol for this module. I.e. if we find one, record usage. */ static const struct kernel_symbol *resolve_symbol(struct module *mod, @@ -1472,14 +1454,6 @@ static const struct kernel_symbol *resolve_symbol(struct module *mod, if (!sym) goto unlock; - if (license == GPL_ONLY) - mod->using_gplonly_symbols = true; - - if (!inherit_taint(mod, owner)) { - sym = NULL; - goto getname; - } - if (!check_version(info, name, mod, crc)) { sym = ERR_PTR(-EINVAL); goto getname;