Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3182231ybd; Mon, 24 Jun 2019 21:09:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFSviciwkKmZZZSfuTSabQyL+GelIXJh7SLSPqcPyPnHMPzgO33dK62oPsiEu3MoWx4Tch X-Received: by 2002:a17:90a:1ac5:: with SMTP id p63mr28545979pjp.25.1561435791292; Mon, 24 Jun 2019 21:09:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561435791; cv=none; d=google.com; s=arc-20160816; b=zTE4fSftWFBCFvOzYFix0OB6UjsSAZHq/Mkrk7E4n7JeQG+5hKBLPgdBM6YfZ61aRA g+/+IUySvA1GF8gbzruUKoUH0SiC+M56fMUr/KpmkZdQDVQdTrZkqLibmZiL7NwKI4Y9 7X4rD9BgQXpEWD4mfCIIqtER8GGkt7Hvmx7bkBQZJXZb2jkujKd/dVX7FufvhOlypJWt CLB+n6TqsT9aM1YNaNqIB9IV88A/1pKSmsjyGh7TQdpWKj8QYpBJSCp8/GVU1nC+Ikuf iiikshyCqLXxlew0C7MUbolCJzzhJJ2XmJCUyU2Kk6y7CMMYDcrNXWWj8JVuxByXAkd1 0JPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:date:cc:to:from:subject; bh=/+EGpDFogTa5O771fvGUiiAVzxv0VV8oGIrTPtZHmlA=; b=uaXBhKveAv6TdPHp5XtcTBCWl3zLgAncvXqjY5937EhQ4dN7EPI5VTLfgqQFdBznjm rCtW5i27GgUwoiP/Slf2e95FJlbGuTE5/h0b+mWzL4Sh1gEzqErdaqRb50MDfJw5Wq9r gxT8ov39TbP13+d+faluaJhHGAjZNT4aaphklSM3FQp4Z2yWxMup3EuoV0roBOoveayd GJG6Jzgb5BebFlkpDonP/YjamUJrIwa9xFpzVOqPXfj/5IBM06UciXMuWs6iWZMogUJO 99klok50haQIVami1ZxYJAoHJoOPG0elj6Bv9UDwmfxqzHH/vZBH4goaTyjqtxQmYwix jCvQ== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y66si12907145pfy.197.2019.06.24.21.09.35; Mon, 24 Jun 2019 21:09:51 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730154AbfFYBqZ (ORCPT + 99 others); Mon, 24 Jun 2019 21:46:25 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:25772 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730134AbfFYBqY (ORCPT ); Mon, 24 Jun 2019 21:46:24 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5P1gQMe141317 for ; Mon, 24 Jun 2019 21:46:23 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0b-001b2d01.pphosted.com with ESMTP id 2tb7x0mng2-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 24 Jun 2019 21:46:22 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 25 Jun 2019 02:46:20 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 25 Jun 2019 02:46:16 +0100 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5P1kFOe60752006 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Jun 2019 01:46:15 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B32D8A4062; Tue, 25 Jun 2019 01:46:15 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6F738A405B; Tue, 25 Jun 2019 01:46:14 +0000 (GMT) Received: from localhost.localdomain (unknown [9.80.110.18]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 25 Jun 2019 01:46:14 +0000 (GMT) Subject: Re: [PATCH V31 07/25] kexec_file: Restrict at runtime if the kernel is locked down From: Mimi Zohar To: Matthew Garrett Cc: Dave Young , James Morris , Jiri Bohac , Linux API , kexec@lists.infradead.org, Linux Kernel Mailing List , David Howells , LSM List , Andy Lutomirski Date: Mon, 24 Jun 2019 21:46:03 -0400 In-Reply-To: References: <20190326182742.16950-1-matthewgarrett@google.com> <20190326182742.16950-8-matthewgarrett@google.com> <20190621064340.GB4528@localhost.localdomain> <20190624015206.GB2976@dhcp-128-65.nay.redhat.com> <1561411657.4340.70.camel@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 19062501-0020-0000-0000-0000034D0FB6 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19062501-0021-0000-0000-000021A07C50 Message-Id: <1561427163.4340.98.camel@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-25_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906250011 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2019-06-24 at 17:02 -0700, Matthew Garrett wrote: > On Mon, Jun 24, 2019 at 2:27 PM Mimi Zohar wrote: > > > I agree with Dave. There should be a stub lockdown function to > > prevent enforcing lockdown when it isn't enabled. > > Sorry, when what isn't enabled? If no LSMs are enforcing lockdown then > the check will return 0. The goal here is for distributions to be able > to ship a kernel that has CONFIG_KEXEC_SIG=y, CONFIG_KEXEC_SIG_FORCE=n > and at runtime be able to enforce a policy that requires signatures on > kexec payloads. Never mind, the call can't be moved earlier.