Received: by 10.213.65.68 with SMTP id h4csp78059imn; Mon, 12 Mar 2018 07:16:58 -0700 (PDT) X-Google-Smtp-Source: AG47ELuZRyij7VI3eb/75/TWJDGXb7ZB+7WQSmBfDKA6aaGb342lzuWNY9qIRP1xb9ynr8TYVZjV X-Received: by 10.98.245.131 with SMTP id b3mr8230742pfm.20.1520864218086; Mon, 12 Mar 2018 07:16:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520864218; cv=none; d=google.com; s=arc-20160816; b=RjfPCCNjN0u7rej5xJy2cSJyYNf0lGol8Sipyaz6nGaRFHzxSiD4/adHhZ/tqDcNu2 Cmk+J8ySayHiSIFSfpbtWhjSCpuDTBaF88kzNaLyeOOZV3MHv31z+bUYZRue1fQRDFl5 5HEjq7TGRHsI5HUzgsdffgw9x6GjRu4t5IGjlLxctoBqT11kGf6MfhwaVShg6W9SYdtV 9YVaok8zm9oV1ZI0kWZGwsCTR4GxWy12imMXWrrMkEo4qD2ftSYlhBrFSSw8i+oOj7p5 s+C/IpdBZ7OgswqY2Xau9OPdcr6aO4xdex+PHKEbvw6AcmIERMKftrzMTclCcSVENDKZ +Fsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=N1+tEDIoGqYgqqtU3PaeEbAfOzj6r3DLuSCfDlZXGss=; b=kUhUIct1xEEBbxu0cCEsO9xV7R1+Uiq8sPmxIq6sphuJfCfs9R+fWkV04DxH5IYkyQ 8EApiSFBcw4g86FmeJ0HXAxOICBOIToe4bBnYR0PH8ZM+vlBt3R4ESgn48nzLZWMGHpu KhQmgTPkE5SsLT9GgOw/YcRWDuj0TR05HTI/wBC9daN9FsWsascjecgAwLY5GLxpOu6m dD+apOp6oFq7Ndcbjw3OZxF5oB2iXI0V9eNdK2/J+spGkn76IF1gJ3l8iY5Ai8LyRs09 8gkPaAryTwV16Sr/tI3SQazNsurZp936i6FRWFFg8qv2s6WMBFOsPwJfrIYnx3BBPnFe oq7A== 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 c11si1728072pga.382.2018.03.12.07.16.43; Mon, 12 Mar 2018 07:16:58 -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 S1751773AbeCLOPy (ORCPT + 99 others); Mon, 12 Mar 2018 10:15:54 -0400 Received: from out30-132.freemail.mail.aliyun.com ([115.124.30.132]:50602 "EHLO out30-132.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751339AbeCLOPx (ORCPT ); Mon, 12 Mar 2018 10:15:53 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R281e4;CH=green;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01353;MF=zhang.jia@linux.alibaba.com;NM=1;PH=DS;RN=2;SR=0;TI=SMTPD_---0SzHkA5D_1520864148; Received: from ali-6c96cfd98fb5.local(mailfrom:zhang.jia@linux.alibaba.com fp:121.0.29.156) by smtp.aliyun-inc.com(127.0.0.1); Mon, 12 Mar 2018 22:15:49 +0800 Subject: Re: [PATCH v2 0/4] modsign enhancement To: Jessica Yu Cc: linux-kernel@vger.kernel.org References: <1520483223-6596-1-git-send-email-zhang.jia@linux.alibaba.com> <20180312132823.dixp7gkjypjlgymt@redbean.localdomain> From: Jia Zhang Message-ID: <6727b467-e2fe-4981-fe77-b9ec3ebf8818@linux.alibaba.com> Date: Mon, 12 Mar 2018 22:15:48 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180312132823.dixp7gkjypjlgymt@redbean.localdomain> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/3/12 下午9:28, Jessica Yu wrote: > +++ Jia Zhang [08/03/18 12:26 +0800]: >> This patch series allows to disable module validity enforcement >> in runtime through /sys/kernel/security/modsign/enforce interface. >> >> Assuming CONFIG_MODULE_SIG_FORCE=y, here are the instructions to >> disable the validity enforcement. >> >> # cat /sys/kernel/security/modsign/enforce >> # echo -n 0 > data >> # openssl smime -sign -nocerts -noattr -binary -in data \ >>    -inkey -signer -outform der \ >>    -out /sys/kernel/security/modsign/enforce >> >> Now enable enforcement again on demand. >> >> # echo 1 > /sys/kernel/security/modsign/enforce >> >> Changelog: >> v2: >> - Support to disable validity enforcement in runtime. > > NAK - please use /sys/module/module/parameters/sig_enforce. > > And I would rather keep this parameter bool_enable_only, plain and simple. > What use case do you have/why would you want to disable signature > enforcement - after having enabled it - during runtime?  None of this > is explained nor justified in the cover letter. Because there is no way to disable it such as module.no_sig_enforce when MODULE_SIG_FORCE=y available unless re-compiling a kernel without this enforcement. This is inconvenient a bit. IMA and SELinux both have cmdline control, but modsign doesn't have. Even we really have a module.no_sig_enforce in cmdline, runtime disablement can be used to avoid machine reboot. Sometimes machine reboot is expensive. If you agree, I can implement the runtime disablement via /sys/module/module/parameters/sig_enforce. Additionally, supporting module.no_sig_enforce when MODULE_SIG_FORCE=y is another one to be implemented. Thanks, Jia > > Thanks, > > Jessica