Received: by 10.223.164.202 with SMTP id h10csp940911wrb; Tue, 7 Nov 2017 18:05:20 -0800 (PST) X-Google-Smtp-Source: ABhQp+SmlY6kvQNkGic/w6jT4BZZ1eAgiDFLHyoD/mAe7JohXkC72UQ+wL5gLK/58DB6yBbhECrh X-Received: by 10.98.34.130 with SMTP id p2mr762722pfj.108.1510106720713; Tue, 07 Nov 2017 18:05:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510106720; cv=none; d=google.com; s=arc-20160816; b=x5xZAu6A7v5T4TOLop1OJ2kRoP7T3qzUYWYfK/DEHKK7CkGIiL0WFtTII99iyxlhsh D0pSLA3P+s5WoH+99xObK+J5hzvEW9yqzmPZBU39TUD/Kv6iUN4o01AJeX4hziXHxcQk DHNuS6XU0Zmer/S5JeYVj3FSPoTORdgI1GtTPoMq5BxV8GK+zMJWaznlBJQeHsr8sOfS AfW0/yWmg2QY+1aURSv4rFPUruJYRrplLXB4Ep0nstBPWFx/2NZkohC+9sMUyNYjQcHd lgsiL8VebAmOK0DV2uaFsuGgZzo5hUBhqbk+K6T7kcw36QTPLf/sLLira98kPXaI73tA emTg== 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:date:in-reply-to:subject:cc:to:from:references :arc-authentication-results; bh=7E6MAPIo9735TDT7FhJo85miEs2aWY4NK8B6mufvLDU=; b=hTCgnNOQGXhlA66HxYzU7eOkVHnr7YvizWoWF2D2B4q/OVOybW0C6LZMps0rkCJ4c4 cZrVD4tu/Z0FeACiAKUVqRBXn/THzIWNA0DAp9V2U/A+5jBR/AZJvWN4q+OFqY597mM2 kflERrouWG/LNSuPq+YuTiYbRarMgCl4D0hXwsOutrtCrz2tUU21axfzo4I2jfD3I5Vv y6h2Odfb7G4dtsxI77sfJ86xW1oudApzNYdjP31UPmwHvS/NhsgQxVR0zQS+J/V5hGPO U6ABjW3RWvhqp/BQpnf1fZOU7gILWZ55Tsnl4d0V/UYB47InfTt1tDiAiqnSADt+PVlk 5o8A== 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 69si2395244plc.414.2017.11.07.18.05.07; Tue, 07 Nov 2017 18:05:20 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752947AbdKGRjS (ORCPT + 91 others); Tue, 7 Nov 2017 12:39:18 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:50074 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752802AbdKGRjP (ORCPT ); Tue, 7 Nov 2017 12:39:15 -0500 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vA7HXoJ1132342 for ; Tue, 7 Nov 2017 12:39:15 -0500 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0b-001b2d01.pphosted.com with ESMTP id 2e3g1jvcq9-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 07 Nov 2017 12:39:14 -0500 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 7 Nov 2017 12:39:14 -0500 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 7 Nov 2017 12:39:11 -0500 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vA7HdAB246924024; Tue, 7 Nov 2017 17:39:10 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D5425AE034; Tue, 7 Nov 2017 12:39:58 -0500 (EST) Received: from morokweng (unknown [9.85.174.39]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTPS id 1C8E8AE03B; Tue, 7 Nov 2017 12:39:56 -0500 (EST) References: <150842463163.7923.11081723749106843698.stgit@warthog.procyon.org.uk> <150842464774.7923.7951986297563109339.stgit@warthog.procyon.org.uk> From: Thiago Jung Bauermann To: David Howells Cc: linux-security-module@vger.kernel.org, gnomes@lxorguk.ukuu.org.uk, linux-efi@vger.kernel.org, matthew.garrett@nebula.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, jforbes@redhat.com Subject: Re: [PATCH 02/27] Add a SysRq option to lift kernel lockdown In-reply-to: <150842464774.7923.7951986297563109339.stgit@warthog.procyon.org.uk> Date: Tue, 07 Nov 2017 15:39:06 -0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 17110717-2213-0000-0000-00000237B57F X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008027; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000239; SDB=6.00942517; UDB=6.00475448; IPR=6.00722804; BA=6.00005676; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017899; XFM=3.00000015; UTC=2017-11-07 17:39:13 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17110717-2214-0000-0000-00005816B2A4 Message-Id: <877ev2rnt1.fsf@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-07_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1711070236 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello David, David Howells writes: > +static struct sysrq_key_op lockdown_lift_sysrq_op = { > + .handler = sysrq_handle_lockdown_lift, > + .help_msg = "unSB(x)", > + .action_msg = "Disabling Secure Boot restrictions", > + .enable_mask = SYSRQ_DISABLE_USERSPACE, > +}; > + > +static int __init lockdown_lift_sysrq(void) > +{ > + if (kernel_locked_down) { > + lockdown_lift_sysrq_op.help_msg[5] = LOCKDOWN_LIFT_KEY; > + register_sysrq_key(LOCKDOWN_LIFT_KEY, &lockdown_lift_sysrq_op); > + } > + return 0; > +} > + > +late_initcall(lockdown_lift_sysrq); > + > +#endif /* CONFIG_ALLOW_LOCKDOWN_LIFT_BY_KEY */ On non-x86 platforms (tested on powerpc) this fails to build with: security/lock_down.c: In function ‘lockdown_lift_sysrq’: security/lock_down.c:100:40: error: ‘LOCKDOWN_LIFT_KEY’ undeclared (first use in this function) lockdown_lift_sysrq_op.help_msg[5] = LOCKDOWN_LIFT_KEY; ^~~~~~~~~~~~~~~~~ security/lock_down.c:100:40: note: each undeclared identifier is reported only once for each function it appears in -- Thiago Jung Bauermann IBM Linux Technology Center From 1581728061667553727@xxx Thu Oct 19 22:50:27 +0000 2017 X-GM-THRID: 1581705988971189585 X-Gmail-Labels: Inbox,Category Forums