Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp827124ybe; Fri, 6 Sep 2019 07:56:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqz11PK+Um1Lbk0QkuPLLVocREHOybRYO/lGTtjivvVY6XG2lp8Z1UWWkZtAoZcBFQ6BPX/z X-Received: by 2002:a62:2ac4:: with SMTP id q187mr10868134pfq.242.1567781764046; Fri, 06 Sep 2019 07:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567781764; cv=none; d=google.com; s=arc-20160816; b=B4+W9hu+9lGFxL+7cZ44aZmo3bzl/3PA6EC4gvUQCuUEOGb2y5v4lBjd5HKXGJyeCj ih8d/ukOavCvB7fyFMJy+zLv25EtJXafhrj3prFvH9wK0iIXGJvLWnyzQlvXSC3LmeOy RfFiMcP0JgPTAd58C7m1sNBz/3Qh5Urfg/tCXLCSLBT8PbPW6Zi/vz48Jq5juPh+c/35 Ej41iNSNBPAleUiifvGkiB0ovpFKDOO+3hCvRjq19WkejTlkk3PnZTSp64rRtxt1Hj1U OuYQpxV99xbkUbzrEwwY+jTAdoS5eOdU44HmvpoKw/IzVcWh9YYzCvsBt1nhKfaaDjoY viNA== 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:message-id:subject:cc:to:from:date; bh=yMeBjNcR7/A/FjqvaKX7m8jXljiEAgKdIQpDq3jNgts=; b=Wlg8f4DRF8u8cVxsBz6JGMjhMcrN+itJTmxdmbZEyVZIRbqLIM+QWxUnZ0HLGggk8+ 9HtEgS/kQ2bDne79xWCjuFnaKLTS4xkNGIbeC3w8+Y6IdcKgjCGMEcpSFV4tjBGHpENX 8jleYHIl91ANB7qcyAMNi2X8xCX+H9znCYG2CPxCiWIeC0FrLwhelP9Kge4R2lqgmjx1 uzWT7HSR7nxFPQAVMLNY4OKmlmoIun1cwpGXOboEw/Iqs5LBpU4FgJY5OQatvr0kx1vQ a8vSxbeCZhW+bWxl9DhP6nxDtc4HRibaP4mt9eEAgYlHk0qAchCU+z78A7DHDoxD/dsA TgTA== 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 y16si6228292pff.107.2019.09.06.07.55.48; Fri, 06 Sep 2019 07:56:04 -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 S2392142AbfIFLCN (ORCPT + 99 others); Fri, 6 Sep 2019 07:02:13 -0400 Received: from mx2.suse.de ([195.135.220.15]:54512 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731418AbfIFLCN (ORCPT ); Fri, 6 Sep 2019 07:02:13 -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 3A9E9B646; Fri, 6 Sep 2019 11:02:12 +0000 (UTC) Date: Fri, 6 Sep 2019 13:02:21 +0200 From: Jean Delvare To: Arnd Bergmann , Greg Kroah-Hartman , Thomas Cc: LKML Subject: /dev/mem and secure boot Message-ID: <20190906130221.0b47a565@endymion> 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 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. 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)? Thanks, -- Jean Delvare SUSE L3 Support