Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp202384ybl; Thu, 5 Dec 2019 18:06:01 -0800 (PST) X-Google-Smtp-Source: APXvYqxy8mC7vc2reGCixwbFkXqpJX/cKynzqzT3E5qIkS60+0U4q/FO/kRIUk+fUgW9NLlAoOlw X-Received: by 2002:a05:6830:236a:: with SMTP id r10mr8804285oth.329.1575597961216; Thu, 05 Dec 2019 18:06:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575597961; cv=none; d=google.com; s=arc-20160816; b=xEKCo1J7tx/wyOFKOSLeLxZ4K6zYfZ822FBxByQP/NB+ff+4WDtE06wHQjkWt4YtCY cF7M3o4jmUGYc0tLbVH1waMBk+Zf+qpdxUUXJkDrI18Pk7u6giuweHCiERPmgLN626Rv 9i+zMWnIeb2JSHmlnHBvo+Me57M0Wy0EFTBBGsKrP/HMnLPeveX57isKtyHpq9SaeyEM F5cYnIR0+1qcSr+XzQ+Y6WpVeRY4E8pn2Bp49cz0PeRa1A7aq69JZxPcVTviKd++/B+S 93P9eBm9iOrHHOh/XAjXTxhh6gnsb7O/fj/EreBw/uJM3VMXyW5yjFRty7Wp2cPRgFup MpDA== 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=sES5LVVtqvUMLdrCWMqaVbfJRuIgGe+DchNNly1RlxI=; b=x1CHxq9HqpC/JGqHal6KSuSW202MNDQzFL1WN4q8cxM6DjeohqNbDtkTeGSm2OtXZ6 lUpergFv57ppzd72pRLr0PFOs3WEM12io5Ax0IOcrtaCoA02Z06bRE7FDCfdi6SWLcd9 gcY6OCFs4a8tm8AVmysJR2R9XUHtgwN6/PKyhcQKfk9tMrhry8UC4a8kdI1M/khPkESC lcsawKp6KeNqlq2GqLgUa36ColUE+8kXuUkyBWFgiwc+ssyCGD9XtMWTE+hweZ3K7RXn 3QlOe0VV9Ssyw1eIIPMwPYbGJSkSA3rQv40Tr+P77aVpNXwHA6AujTzVMHpyeCbb2CKR k2xA== 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 q7si6129209otg.238.2019.12.05.18.05.47; Thu, 05 Dec 2019 18:06:01 -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 S1726206AbfLFCEm (ORCPT + 99 others); Thu, 5 Dec 2019 21:04:42 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:53122 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726109AbfLFCEm (ORCPT ); Thu, 5 Dec 2019 21:04:42 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id ADCEB110BE5C4D92B220; Fri, 6 Dec 2019 10:04:38 +0800 (CST) Received: from [127.0.0.1] (10.133.216.73) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Fri, 6 Dec 2019 10:04:32 +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> <20191204092942.GA3557583@kroah.com> From: Guoheyi Message-ID: Date: Fri, 6 Dec 2019 10:04:31 +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: <20191204092942.GA3557583@kroah.com> Content-Type: text/plain; charset="utf-8"; 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 17:29, Greg Kroah-Hartman 写道: > On Wed, Dec 04, 2019 at 05:01:06PM +0800, Guoheyi wrote: >> 在 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. > Careful about this as if you move that virtual machine around, those > values will change and if userspace was depending on them being static > (set up at program start time), then you might have problems. > > good luck! The information will be used as VM DMI/SMBIOS as well, so it will be read only once during VM boot. I guess we will be OK :) Thanks a lot. Heyi > > greg k-h > > .