Received: by 10.223.185.116 with SMTP id b49csp5864000wrg; Wed, 7 Mar 2018 20:29:50 -0800 (PST) X-Google-Smtp-Source: AG47ELs5mayezkQ04sQCu1tQO7mzFmyH92MUoLqYfufkRlcpQlMXwn/7js9owbjqfJ23ihoiAgEu X-Received: by 10.98.34.75 with SMTP id i72mr24705957pfi.165.1520483390744; Wed, 07 Mar 2018 20:29:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520483390; cv=none; d=google.com; s=arc-20160816; b=vUUqX4jf1Pg3lB/elHjij9meaYmF3+a9BQ27GKalWiy4UtKsSJAx0lt3QIJwiZDsHx 2lhkkOOJtF9hEEKriPXogm6EsI/5mLeNy07lzXMHPQoamKvi0lEIJwJ7xjdfvHSFeS19 IClLaHhqChc3hukFmYHmW+5vbseKNw8oV9BZz9TGVOUsxpkhjKWEkiqZpcWmF+3aKagk kx2zLlRTywb70lcnbAJde8UiQcV9etOd9ImOl8FnZlmIdlSPs8PmgTD+NqvbJcS4TB6v rssbsDXPnqwSu5u3BMKJR9kv44MJ1/r2tRTLxa0rD+PZ0VusMUGmkkvFYK2Nr1//zjoP lkfA== 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=bjR+kMFclixFD6dkWl7BwAbMhn7bvC5llVO9BcFL6x9Hs50lv9fGSSVwKP1qbF6fFu OqfddiVtNGfBiPUI1vEbmVclHHQxSUT/qEDubhfwYLkU1kfBstBcR+b6nPxfWisKKeU9 h3j2D+WKKDxHBHaiP0mcIo1SB+CuoKvEHJXbstmlNm20zHkz01SHEx4NCOqvDAhKFswx WhpE5e9p27N8jbON0CgM+diuqxbwPxE+0htT4ofGOQuegiXDdJzHK2L6yRVL8HSXOB/s YRX6b4GfQ7JizgOM1Uguw8YVk/ydxbW/Ym0qdLocvYXIWVWOBJFhEpEzzse+lMXJMcB6 iRDQ== 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 l4-v6si14604912pln.121.2018.03.07.20.29.36; Wed, 07 Mar 2018 20:29:50 -0800 (PST) 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 S934873AbeCHE16 (ORCPT + 99 others); Wed, 7 Mar 2018 23:27:58 -0500 Received: from out30-132.freemail.mail.aliyun.com ([115.124.30.132]:48606 "EHLO out30-132.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753901AbeCHE1J (ORCPT ); Wed, 7 Mar 2018 23:27:09 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R471e4;CH=green;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07486;MF=zhang.jia@linux.alibaba.com;NM=1;PH=DS;RN=3;SR=0;TI=SMTPD_---0Sz3wC4Q_1520483226; Received: from localhost(mailfrom:zhang.jia@linux.alibaba.com fp:106.11.233.9) by smtp.aliyun-inc.com(127.0.0.1); Thu, 08 Mar 2018 12:27:06 +0800 From: Jia Zhang To: jeyu@kernel.org Cc: linux-kernel@vger.kernel.org, zhang.jia@linux.alibaba.com Subject: [PATCH 1/4] module: Do not access sig_enforce directly Date: Thu, 8 Mar 2018 12:27:00 +0800 Message-Id: <1520483223-6596-2-git-send-email-zhang.jia@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1520483223-6596-1-git-send-email-zhang.jia@linux.alibaba.com> References: <1520483223-6596-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