linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Budankov <alexey.budankov@linux.intel.com>
To: "David E. Box" <david.e.box@linux.intel.com>,
	lee.jones@linaro.org, dvhart@infradead.org, andy@infradead.org,
	alexander.h.duyck@linux.intel.com
Cc: linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org,
	Alexey Budankov <alexey.budankov@linux.intel.com>
Subject: Re: [PATCH 3/3] platform/x86: Intel PMT Crashlog capability driver
Date: Sat, 19 Sep 2020 10:58:38 +0300	[thread overview]
Message-ID: <0ec64bdc-66fd-4be1-03cf-561a7c42de68@linux.intel.com> (raw)
In-Reply-To: <20200911194549.12780-4-david.e.box@linux.intel.com>

Hi,

Thanks for the patches.

On 11.09.2020 22:45, David E. Box wrote:
> From: Alexander Duyck <alexander.h.duyck@linux.intel.com>
> 
> Add support for the Intel Platform Monitoring Technology crashlog
> interface.  This interface provides a few sysfs values to allow for
> controlling the crashlog telemetry interface as well as a character driver
> to allow for mapping the crashlog memory region so that it can be accessed
> after a crashlog has been recorded.
> 
> This driver is meant to only support the server version of the crashlog
> which is identified as crash_type 1 with a version of zero. Currently no
> other types are supported.
> 
> Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
> Signed-off-by: David E. Box <david.e.box@linux.intel.com>
> ---
>  .../ABI/testing/sysfs-class-pmt_crashlog      |  66 ++
>  drivers/platform/x86/Kconfig                  |  10 +
>  drivers/platform/x86/Makefile                 |   1 +
>  drivers/platform/x86/intel_pmt_crashlog.c     | 588 ++++++++++++++++++
>  4 files changed, 665 insertions(+)
>  create mode 100644 Documentation/ABI/testing/sysfs-class-pmt_crashlog
>  create mode 100644 drivers/platform/x86/intel_pmt_crashlog.c

<SNIP>

> +
> +/*
> + * devfs
> + */
> +static int pmt_crashlog_open(struct inode *inode, struct file *filp)
> +{
> +	struct crashlog_entry *entry;
> +	struct pci_driver *pci_drv;
> +	struct pmt_crashlog_priv *priv;
> +
> +	if (!capable(CAP_SYS_ADMIN))
> +		return -EPERM;

Will not this above still block access to /dev/crashlogX for admin_group users
in case root configured access e.g. similar to this:

ls -alh /dev/
crw-rw----.  1 root admin_group      1,   9 Sep 15 18:28 crashlogX

If yes then that capable() check is probably superfluous and
should be avoided in order not to block access to PMT data.

Could you please clarify or comment?

Thanks,
Alexei  

  parent reply	other threads:[~2020-09-19  7:58 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11 19:45 [PATCH 0/3] intel_pmt: Add Alder Lake and OOB-MSM support David E. Box
2020-09-11 19:45 ` [PATCH 1/3] mfd: intel_pmt: Add OOBMSM device ID David E. Box
2020-09-14 13:01   ` Hans de Goede
2020-09-29  9:51   ` Lee Jones
2020-09-29 18:19     ` David E. Box
2020-09-30  7:12       ` Lee Jones
2020-09-30 16:50         ` David E. Box
2020-10-01  7:55           ` Lee Jones
2020-09-11 19:45 ` [PATCH 2/3] mfd: intel_pmt: Add Alder Lake (ADL) support David E. Box
2020-09-14 13:01   ` Hans de Goede
2020-09-11 19:45 ` [PATCH 3/3] platform/x86: Intel PMT Crashlog capability driver David E. Box
2020-09-14 13:28   ` Hans de Goede
2020-09-14 18:07     ` Alexander Duyck
2020-09-14 22:35       ` Alexander Duyck
2020-09-17 12:12         ` Hans de Goede
2020-09-17 21:35           ` Alexander Duyck
2020-09-21 13:16             ` Hans de Goede
2020-09-21 13:57               ` Alexander Duyck
2020-09-21 14:02                 ` Hans de Goede
2020-09-21 13:18             ` Hans de Goede
2020-09-17 11:48       ` Hans de Goede
2020-09-19  7:58   ` Alexey Budankov [this message]
2020-09-21 13:36     ` Alexander Duyck
     [not found]       ` <69a7e595-1b5c-bfb3-f3e6-16cf5fcc9999@linux.intel.com>
2020-09-21 17:33         ` Alexander Duyck
2020-09-21 17:52           ` Alexey Budankov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0ec64bdc-66fd-4be1-03cf-561a7c42de68@linux.intel.com \
    --to=alexey.budankov@linux.intel.com \
    --cc=alexander.h.duyck@linux.intel.com \
    --cc=andy@infradead.org \
    --cc=david.e.box@linux.intel.com \
    --cc=dvhart@infradead.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).