* firmware: dmi-sysfs: why is the access mode of dmi sysfs entries restricted to 0400? @ 2019-12-04 7:31 Guoheyi 2019-12-04 7:41 ` Greg Kroah-Hartman 0 siblings, 1 reply; 5+ messages in thread From: Guoheyi @ 2019-12-04 7:31 UTC (permalink / raw) To: Mike Waychison Cc: linux-kernel, wanghaibin 00208455, Thomas Gleixner, Greg Kroah-Hartman 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? We would like to fetch CPU information from non-root application, is there feasible way to do that? Any advice is appreciated. Thanks, Heyi ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: firmware: dmi-sysfs: why is the access mode of dmi sysfs entries restricted to 0400? 2019-12-04 7:31 firmware: dmi-sysfs: why is the access mode of dmi sysfs entries restricted to 0400? Guoheyi @ 2019-12-04 7:41 ` Greg Kroah-Hartman 2019-12-04 9:01 ` Guoheyi 0 siblings, 1 reply; 5+ messages in thread From: Greg Kroah-Hartman @ 2019-12-04 7:41 UTC (permalink / raw) To: Guoheyi Cc: Mike Waychison, linux-kernel, wanghaibin 00208455, Thomas Gleixner 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? 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, greg k-h ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: firmware: dmi-sysfs: why is the access mode of dmi sysfs entries restricted to 0400? 2019-12-04 7:41 ` Greg Kroah-Hartman @ 2019-12-04 9:01 ` Guoheyi 2019-12-04 9:29 ` Greg Kroah-Hartman 0 siblings, 1 reply; 5+ messages in thread From: Guoheyi @ 2019-12-04 9:01 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Mike Waychison, linux-kernel, wanghaibin 00208455, Thomas Gleixner 在 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 > > . ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: firmware: dmi-sysfs: why is the access mode of dmi sysfs entries restricted to 0400? 2019-12-04 9:01 ` Guoheyi @ 2019-12-04 9:29 ` Greg Kroah-Hartman 2019-12-06 2:04 ` Guoheyi 0 siblings, 1 reply; 5+ messages in thread From: Greg Kroah-Hartman @ 2019-12-04 9:29 UTC (permalink / raw) To: Guoheyi Cc: Mike Waychison, linux-kernel, wanghaibin 00208455, Thomas Gleixner 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! greg k-h ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: firmware: dmi-sysfs: why is the access mode of dmi sysfs entries restricted to 0400? 2019-12-04 9:29 ` Greg Kroah-Hartman @ 2019-12-06 2:04 ` Guoheyi 0 siblings, 0 replies; 5+ messages in thread From: Guoheyi @ 2019-12-06 2:04 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Mike Waychison, linux-kernel, wanghaibin 00208455, Thomas Gleixner 在 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 > > . ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-12-06 2:04 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-12-04 7:31 firmware: dmi-sysfs: why is the access mode of dmi sysfs entries restricted to 0400? Guoheyi 2019-12-04 7:41 ` Greg Kroah-Hartman 2019-12-04 9:01 ` Guoheyi 2019-12-04 9:29 ` Greg Kroah-Hartman 2019-12-06 2:04 ` Guoheyi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).