Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5266787ybe; Tue, 10 Sep 2019 00:41:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqx1ctxk6F6m3bRzzBPlTmae8Ik1FH98vFrEVJx5AHZb2FUKC6JnK2DR3wZY+MqtjCkBihI5 X-Received: by 2002:aa7:cf97:: with SMTP id z23mr28757378edx.29.1568101308600; Tue, 10 Sep 2019 00:41:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568101308; cv=none; d=google.com; s=arc-20160816; b=zFTdqjVXy1tcuIOUnQBhJNPJoOAkcWon1YQADIQBZyE2zYSVmMlgyd9tsOwZ7BNlOK KOGplvxX/kNAbsZLiZDdLQ/QTD1CoBuM9O9GN3ZZBoRH01D6faWE6lryWnVPBMJJtJVa R1nBDzqUwn1WRFEiQQo2aF+UWv0QHZFDfHZJzzT3MKd11d43pULM0A6gLJsZs42DogJe vQk50pOBZqnsbaPnZbawtsSyo07U4kGTPc+7vAlTvGDGHGstm+GURXmm+spXvpl3G9Rp 38h4fquhN/kXvVMGjF93rYXp2wyrzQ4G6xYDS7g30BpMeSYluQ21U/HTq57ySPTH5B54 GLRA== 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:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=9WFsxD3g2QCDT4el8dvkML9ifjGYe/jI0vyy0qfGyJE=; b=myFKhXBjp72pSHu1LrWQuF2fph2jX4SeR5U9tG6iB0tjLqQA2LTQKwiXbAYKdOMfDo QXDDGQvyWqlxqy049+QRhdsjKiFuwy+OqvmCMuF+d/Ak9St4LwsOrkLJbAdQptC0uAt4 ZXNFrG5fEcojaXse2f7DRPDILtvx2pl+iGzHxy+J7y0AO+KkZOqL5jC1EC3WGQQWY6KN bRjrgemzCBE0QEuhntvDPjmdHsBk1Mn0lGu5tgOvR2we9XnTi9199U4Z4hCLPTBAfuM0 SDX0EPFlmzRfNWe37xlAMpQwjZvyaNaBIzqXNCGCbg08UgZPl4zn2JXlVvLkl/D78Pft 8Jug== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rs27si9091023ejb.379.2019.09.10.00.41.13; Tue, 10 Sep 2019 00:41:48 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729683AbfIINJw (ORCPT + 99 others); Mon, 9 Sep 2019 09:09:52 -0400 Received: from mx2.suse.de ([195.135.220.15]:41232 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725978AbfIINJw (ORCPT ); Mon, 9 Sep 2019 09:09:52 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C724FB63D; Mon, 9 Sep 2019 13:09:50 +0000 (UTC) Date: Mon, 9 Sep 2019 15:09:57 +0200 From: Jean Delvare To: Greg Kroah-Hartman Cc: Arnd Bergmann , Thomas , LKML , David Howells Subject: Re: /dev/mem and secure boot Message-ID: <20190909150957.12abe684@endymion> In-Reply-To: <20190906121510.GA17328@kroah.com> References: <20190906130221.0b47a565@endymion> <20190906121510.GA17328@kroah.com> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Greg, On Fri, 6 Sep 2019 14:15:10 +0200, Greg Kroah-Hartman wrote: > On Fri, Sep 06, 2019 at 01:02:21PM +0200, Jean Delvare wrote: > > I've been bitten recently by mcelog not working on machines started in > > secure boot mode. mcelog tries to read DMI information from /dev/mem > > and fails to open it. > > What do you mean by "secure boot"? Is this matthew's patchset that > restricts /dev/mem/ or something else? I mean that early in the kernel log is: Secure boot enabled and kernel locked down Digging it up, I found that this comes from a patch in our SLES kernel, that's not upstream (yet). It is from a patch set by David Howells (Cc'd) posted in April 2017: https://patchwork.kernel.org/patch/9665591/ https://patchwork.kernel.org/patch/9665015/ I wrongly assumed it had been merged upstream meanwhile but I was wrong. David, any reason why this didn't happen? Out of curiosity, are these patches in RHEL kernels? > > This made me wonder: if not even root can read /dev/mem (nor, I > > suppose, /dev/kmem and /dev/port) in secure boot mode, why are we > > creating these device nodes at all in the first place? Can't we detect > > that we are in secure boot mode and skip that step, and reap the rewards > > (faster boot, lower memory footprint and less confusion)? > > Sure, feel free to not register it at all if the mode is enabled. Now I feel sorry that I asked my question upstream when there's nothing to be done there. I'll go bother SUSE kernel folks instead, sorry for the noise. And thanks for the advice. -- Jean Delvare SUSE L3 Support