Received: by 10.213.65.68 with SMTP id h4csp887893imn; Fri, 23 Mar 2018 20:03:38 -0700 (PDT) X-Google-Smtp-Source: AG47ELsW6HeNjmVsZVTXaS7RD1+aVGGCbwsqMDDJzVmOa3hFq5Wd0OqSEARbHlsCwZRN1exIiBjH X-Received: by 2002:a17:902:1e5:: with SMTP id b92-v6mr20312519plb.78.1521860618328; Fri, 23 Mar 2018 20:03:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521860618; cv=none; d=google.com; s=arc-20160816; b=Kf147euApv80LzZFxTP8tLQK2fPQZ3K4Gv0WoEsLNBASj28eqdCyyd5we+qEutF7YD 5a48oTweC6g3hPH0NE8raZaAnROKy3HAAoXNH0uCx7scXI7Zff1/jobkCS2aqhAGPjAI fqpNk7dLlspC5gvyNX6xlhRyvV/9sFLWZ6w6LfIHXIpQ2lrJOqytAxpjCSetmO404enW 96f+BTJEeOqhdMRhKoa77IHDt8KSdecdJbSrqh0l3tkaLg0eu1+i/SJcgxKGPrq+n4w9 3LOXzz0nCcRmtG0kBL90XGqYnS+3rnt5GxTU/ycJ5rFv+PoT/QAI9gLPbs2N+ho9XIdS jSQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=g+iQGxxSbAM5+DuEMv83Cr6w1b7Ov6ixbvokhK3Vcfw=; b=ZkslEdkkW6Rij17fTAJdZ8O3cGijr2vBWL+aiBu3SpUwUHsSTnCu60NL2cz4D0IA7K lMVrx97KHIGgH2+CPhnEETj35bP4qInUpn3HidKb6KAxVo/OAJs4bw8bbl09ULL723l4 P/IFvuefXAAKR485hvHs49ov6jYqDxagLmm6o826aPEnhjHMXqtZUt+m/V2fNUPIwIgs 2vGvOt+zX8698TIViwEWajGvX9fhF5oI3SH5jYFfYfGiV5WyDMki/x+3OLmAledloNbW Ld6rWsUssATq5LNLY/UAHFI0vQrulqyDnNyBYnF8wINs9ZXWRe2rqKtvOlmfwXuQmc8d LiAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si6950344pgq.219.2018.03.23.20.02.44; Fri, 23 Mar 2018 20:03:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751923AbeCXDAE (ORCPT + 99 others); Fri, 23 Mar 2018 23:00:04 -0400 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:41995 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751531AbeCXDAD (ORCPT ); Fri, 23 Mar 2018 23:00:03 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R751e4;CH=green;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04455;MF=zhang.jia@linux.alibaba.com;NM=1;PH=DS;RN=3;SR=0;TI=SMTPD_---0T--KI2d_1521860387; Received: from localhost(mailfrom:zhang.jia@linux.alibaba.com fp:106.11.233.214) by smtp.aliyun-inc.com(127.0.0.1); Sat, 24 Mar 2018 10:59:47 +0800 From: Jia Zhang To: jeyu@kernel.org Cc: linux-kernel@vger.kernel.org, zhang.jia@linux.alibaba.com Subject: [PATCH 1/3] module: Do not access sig_enforce directly Date: Sat, 24 Mar 2018 10:59:47 +0800 Message-Id: <1521860389-19262-2-git-send-email-zhang.jia@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1521860389-19262-1-git-send-email-zhang.jia@linux.alibaba.com> References: <1521860389-19262-1-git-send-email-zhang.jia@linux.alibaba.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Call is_module_sig_enforced() instead. Signed-off-by: Jia Zhang --- kernel/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/module.c b/kernel/module.c index ad2d420..003d0ab 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -2789,7 +2789,7 @@ static int module_sig_check(struct load_info *info, int flags) } /* Not having a signature is only an error if we're strict. */ - if (err == -ENOKEY && !sig_enforce) + if (err == -ENOKEY && !is_module_sig_enforced()) err = 0; return err; -- 1.8.3.1