Received: by 10.192.165.156 with SMTP id m28csp248519imm; Tue, 10 Apr 2018 20:57:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx494aSFSuOhSWCSv9IOK5W39r5Jj0FL0YKgRpjclhW/X7IJcDmgKOrkFB8ROZeX3dHbdP8QO X-Received: by 10.99.51.137 with SMTP id z131mr2203731pgz.386.1523419022495; Tue, 10 Apr 2018 20:57:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523419022; cv=none; d=google.com; s=arc-20160816; b=vnq0IyssHDKb0GgmkW8FMM4HW9F0ux8D7DAdPf8Hb86PYV162VNfaRicdbWu5dZyRv 4+SS32Kqyv+Cz/IjwSq/jNfNI7l61ImexIQFynnY66ErqgwlmgWQoOr6s6cW8MTboBnz O3PN/Dp2c2gfbMsM6rin43WPw4DDjx0iCpsMfYVJKYLy/HB9nmDxMKig9rnNSoOe5gdc uRoGmkWgTh47nVTtVrNYAh5QW5LlY7WJ5+XpLFHIvXj9uoWo2+whLYdUSZzikqGTCsj9 RQPzexgnYFz6s2oCIUSexQX/4ST/M9q8yTFCJHqifmhTEGH9wZ0f2ULqUlwX0KIwPLLy RbUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=IsX1eBWAYy67j0ZXK+2mTmWLjuZ/gXxwUF/tetpp3Pc=; b=LvTKLHhGLAW77IdktuHSlIqbOt4d8p98+vFCK32I0G1WQxbIWnbYFnASuDkqTLaHfd nV/bUD9W9mW/9ppnh8t7v15vLDpDCk2tKsrkto7ULKInZ1Ge3Plcu3i38EPlNiSG/zwq +jTu9HRHg+qluWb9ubFTDFZscYa8PWoFtYsLcWzV+JI2PqnbEgjoonyuKRC1EW1OGVbN DLe8CHxqiazRkzjf7IKHaBR+xDzVIcQOeooCJKl+AQApSr3QQyMIqHhmC8O5ZNyI7ImS zWB+Wv8oCH4cKwdFdYn+TEscF+Y8dGG/r8zq9YOQ0kefDqoPS15QwRMm03WYG0JawSvw AzrA== 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 g7-v6si271744plm.539.2018.04.10.20.56.25; Tue, 10 Apr 2018 20:57:02 -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 S1752381AbeDKDxi (ORCPT + 99 others); Tue, 10 Apr 2018 23:53:38 -0400 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]:47078 "EHLO out30-130.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752140AbeDKDxf (ORCPT ); Tue, 10 Apr 2018 23:53:35 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07488;MF=zhang.jia@linux.alibaba.com;NM=1;PH=DS;RN=3;SR=0;TI=SMTPD_---0T.-8WcN_1523418812; Received: from localhost(mailfrom:zhang.jia@linux.alibaba.com fp:SMTPD_---0T.-8WcN_1523418812) by smtp.aliyun-inc.com(127.0.0.1); Wed, 11 Apr 2018 11:53:32 +0800 From: Jia Zhang To: jeyu@kernel.org Cc: linux-kernel@vger.kernel.org, zhang.jia@linux.alibaba.com Subject: [PATCH 1/2] module: Do not access sig_enforce directly Date: Wed, 11 Apr 2018 11:53:33 +0800 Message-Id: <1523418814-6857-1-git-send-email-zhang.jia@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 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 a6e43a5..f695474 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -2785,7 +2785,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