Return-Path: Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=aj.id.au (client-ip=66.111.4.29; helo=out5-smtp.messagingengine.com; envelope-from=andrew@aj.id.au; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="t1OZK0qG"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="pXb7XhWx"; dkim-atps=neutral Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42vjkM0kmjzDrPy for ; Wed, 14 Nov 2018 09:59:38 +1100 (AEDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id F12342079B; Tue, 13 Nov 2018 17:59:35 -0500 (EST) Received: from web3 ([10.202.2.213]) by compute4.internal (MEProxy); Tue, 13 Nov 2018 17:59:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h= message-id:from:to:cc:mime-version:content-transfer-encoding :content-type:date:references:subject:in-reply-to; s=fm1; bh=VE7 z6Gw9FjEFeaIERTP4nnLnk8s+x9xHD/hy7qZKoG0=; b=t1OZK0qGrggC+q2k4Ii MFFz6DW6f8XjONvjj9dHzLmeNgmelkf0ERfbIpOGPBHdetzPcf95QZ4e1gPm9X2s 5BXXu6VIQSgFcoGaSFszBT6T9BQAkOoGuzebdKl+xFj/u6YdhIPeZaWjWpJjwnL2 n3CkHHkXbmtJ96OIEgLQcwLCPmUuQSWVmwDR52TcL+hEvDtKgXyUqCPorU3F3FnC L4brxfJdjY4tqfi5Qw3QZMiwSZPx+qt9g/3Xbk6gHbKHNp9ypiaU1ZIrun5tL95s u9YhYDA6HKzi8vr7RJI+dZYRHN3kHUAOBdXIHdunBeCvTQEoL3Q6h0aRMqBznMUG zvQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=VE7z6Gw9FjEFeaIERTP4nnLnk8s+x9xHD/hy7qZKo G0=; b=pXb7XhWxnNHhahhawkCi74B5Ri/w/3DuFt563bAFhoJgSiuguvWV6aast BqkfVXmcQuWFz8niuYcQGumb65xDfLEjJUKF8xPIVcSVPKpOQUxZMwdeDkmiif2i Gcv36xxgC0XpwEHTrqtcPGcL77zqNj0LR1EtDzQXR4RzuNj922i6vwMvUVmY1YXr vSWrx9He4PbndwxD0XPsE/BBLR+0mYLvihcM2ulsR4xlOjuXqt03FJ5nFfmRzPId u8MEdj/+7tIKFmKZd5SRi1RRb0SLqttj9fOiihsOPVqy5RhPm7CfaCSIy86eqOvz 24lRfJDdV0UtZ8FQpsZGPPeoIVO/A== X-ME-Sender: X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 8D1F19E498; Tue, 13 Nov 2018 17:59:34 -0500 (EST) Message-Id: <1542149974.194577.1575978144.2C46B67A@webmail.messagingengine.com> From: Andrew Jeffery To: =?utf-8?Q?C=C3=A9dric=20Le=20Goater?= , Joel Stanley Cc: OpenBMC Maillist MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-2d882eb6 Date: Wed, 14 Nov 2018 09:29:34 +1030 References: <20181012080723.15825-1-clg@kaod.org> <1541639492.1485316.1569473080.44A0676A@webmail.messagingengine.com> <3583a7d8-72ed-a724-418f-016cc5fb9bcd@kaod.org> Subject: Re: [PATCH linux dev-4.18] /dev/mem: add a devmem kernel parameter to activate the device In-Reply-To: <3583a7d8-72ed-a724-418f-016cc5fb9bcd@kaod.org> X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2018 22:59:43 -0000 On Tue, 13 Nov 2018, at 23:33, C=C3=A9dric Le Goater wrote: > On 11/8/18 2:11 AM, Andrew Jeffery wrote: > > On Mon, 22 Oct 2018, at 08:54, Joel Stanley wrote: > >> On Fri, 12 Oct 2018 at 18:37, C=C3=A9dric Le Goater wro= te: > >>> > >>> For security reasons, some configuration needs to run without /dev/mem > >>> but on some occasions, to debug HW for instance, it's still useful to > >>> be able to reboot the system with access to physical memory. > >>> > >>> Add a kernel parameter which activates the /dev/mem device only when > >>> 'mem.devmem' is enabled. > >>> > >>> Signed-off-by: C=C3=A9dric Le Goater > >> > >> Thanks C=C3=A9dric. I've put this in the 4.18 tree. > >> > >> Can you submit this upstream too please? > >=20 > > Have this been done? Just following up out of interest. >=20 > no.=20 >=20 > > I do wonder about it though. /dev/mem is accessible if you're root, but= given > > pretty much everything runs as root on the BMC we turn it off. But if = it's just > > a kernel commandline parameter away, it's also just a > > `fw_setenv ... && reboot` away, at which point all the security is gone= ? If > > you're somehow not root on the BMC then you wouldn't have access even if > > it were present, and you can't change the u-boot environment either. >=20 > You seem to be suggesting that we should reactivate /dev/mem ?=20 Not really arguing either way, just observing that the patch doesn't gain a= ny security over just enabling it outright. >=20 > C.=20