Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp201992ybl; Wed, 4 Dec 2019 01:02:26 -0800 (PST) X-Google-Smtp-Source: APXvYqyjtKuY3bcXvZWZQp9RYhbe4fXjavfVg8gFbVZnMuz3Xo7KTksJrOd9jMlu0FZJta6eOTbO X-Received: by 2002:aca:a949:: with SMTP id s70mr1751526oie.80.1575450146772; Wed, 04 Dec 2019 01:02:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575450146; cv=none; d=google.com; s=arc-20160816; b=I+wMHPtm8G23EwPPc7UPpg+nZAQKpnGoUmb8agHEPb7GSeMe4MtVNEpLaEKuiq3vLQ +8VAGGDBd8KLdxXFsHZYomY96I1G8P2MU65VcM9mMImDXN//8pMtyWeNj2Ehliu/n/xh uKAPM181kyNtdEwK1ISHf6vAFzwZnfDMASRp9XvCiMU8bEvMzKJdVd57P8o/X4Tfwofb TwjhRmbV4HFy1EI2SWCEq8FfEHH69zeYlFnoyLt3908JW03nCXU3WDt5xbZqhLeQXpu0 P4YUC9lDvqRHQk8OWycy1z/LpDjV+5WsJS+uecOMf5fyJfYcVmQpJzu5l3XxMWV5c8Ek opag== 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:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=XZl0TEd0uhbePX4D61x6HJEBJ53m07luBQ/lJjnWcV0=; b=eky72WRFxNTC0WDp/QQXJbwBBYGSV9f19P91p/C9sWlXZSJfiRiEzjKJoGDOndZGgA rONcrMmzrl3nEbEAOcQIwpnllo3L7YPHvYk9qp+ZqTt/Z8PLdRuvyEpi1EpPcnZthfPV Tz+etIvXR4qqVdLeoq7oJ3loN1KPhpX7rKvnUb5JZEWtqaf6RG7Rkdk0huAfYbRKbE5r 1olznXgX275mij87ZI9ibbGensXKHleXCA0p5Fiy7ISlYj5ubDU0xYyHa/WQoJvJH01/ eKI384Ftt5PoEQu+VajWsMryMDU1C2rSdLiZU95pZRk+4k0tJ5OCA4+25glF5cvCttk3 rNzA== 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 v129si2771822oib.156.2019.12.04.01.02.12; Wed, 04 Dec 2019 01:02:26 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726679AbfLDJBQ (ORCPT + 99 others); Wed, 4 Dec 2019 04:01:16 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:7631 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726166AbfLDJBQ (ORCPT ); Wed, 4 Dec 2019 04:01:16 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 5852DDA47E66650A345A; Wed, 4 Dec 2019 17:01:13 +0800 (CST) Received: from [127.0.0.1] (10.133.216.73) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Wed, 4 Dec 2019 17:01:07 +0800 Subject: Re: firmware: dmi-sysfs: why is the access mode of dmi sysfs entries restricted to 0400? To: Greg Kroah-Hartman CC: Mike Waychison , , wanghaibin 00208455 , Thomas Gleixner References: <42bb2db8-66e0-3df4-75b7-98b2b2bcfca8@huawei.com> <20191204074133.GA3548765@kroah.com> From: Guoheyi Message-ID: Date: Wed, 4 Dec 2019 17:01:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20191204074133.GA3548765@kroah.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.133.216.73] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ?? 2019/12/4 15:41, Greg Kroah-Hartman ะด??: > On Wed, Dec 04, 2019 at 03:31:22PM +0800, Guoheyi wrote: >> Hi, >> >> Why is the access mode of dmi sysfs entries restricted to 0400? Is it for >> security concern? If it is, which information do we consider as privacy? > There's lots of "interesting" information in dmi entries that you > probably do not want all processes reading, which is why they are > restricted. > >> We would like to fetch CPU information from non-root application, is there >> feasible way to do that? > What specific CPU information is not currently exported in /proc/cpuinfo > that only shows up in DMI entries that you are interested in? We'd like to get processor manufacturer, speed and version, and pass the information to qemu virtual machine, for users of VM might be happy to see this instead of "unknown xxx", while qemu may run as non-root. > > You can always have root change the permissions of a sysfs file if you > have a service that wants to allow non-root programs to read specific > entries. Thanks; we'll try it. Heyi > > thanks, > > greg k-h > > .