All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ramalingam C <ramalingam.c@intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4 05/13] drivers: create binary sysfs for class
Date: Mon, 15 Apr 2019 22:44:12 +0530	[thread overview]
Message-ID: <20190415171412.GA25423@intel.com> (raw)
In-Reply-To: <20190415144716.GA4017@kroah.com>

On 2019-04-15 at 16:47:16 +0200, Greg Kroah-Hartman wrote:
> On Mon, Apr 15, 2019 at 06:11:13PM +0530, Ramalingam C wrote:
> > On 2019-04-05 at 14:32:00 +0200, Greg Kroah-Hartman wrote:
> > > On Fri, Apr 05, 2019 at 04:06:22PM +0530, Ramalingam C wrote:
> > > > On 2019-04-05 at 11:23:00 +0200, Greg Kroah-Hartman wrote:
> > > > > On Fri, Apr 05, 2019 at 02:12:54PM +0530, Ramalingam C wrote:
> > > > > > Functions to create and remove the binary sysfs for class are added.
> > > > > > 
> > > > > > These are getting introduced as DRM wants to create the common binary
> > > > > > sysfs across the drm subsystem to handle hdcp srm.
> > > > > 
> > > > > Why do you need individual files?  That's almost always a sign that you
> > > > > are going to race with userspace in a bad way.  Why not just use an
> > > > > attribute group which provides automatic support for this?
> > > > Greg,
> > > > 
> > > > Reason behind this move is to have a common srm entry path across all drm
> > > > drivers. And the data fed into this is binary blob. So I am creating a
> > > > binary sysfs "hdcp_srm" at /sys/class/drm/
> > > 
> > > Ah, you want to have a file in your class directory, not your class
> > > device directory.
> > > 
> > > No, please do not do that.  There's a reason I got rid of those same
> > > types of apis in the past.
> > > 
> > > And "binary blobs" are horrid anyway, they are only to be used as a
> > > pass-through to the device itself, from the kernel, no touching the data
> > > at all.  If you really need/want this, then put it in the device's
> > > directory as that is where the data is going to, not the kernel "class"
> > > code as it sure as heck better not be doing anything with it.
> > Greg,
> > 
> > But here the parsing of the received binary blob is done outside the drm
> > device/cards. This will be generic code for all drm cardx(drivers). And
> > this will provide the service helper functions to the drm drivers for HDCP SRM checking.
> 
> Again, the kernel is NOT to be parsing any binary data that comes
> through a sysfs file.  If you need such a crazy thing, do it through
> your normal drm ioctl.
> 
> > So we prefer to have the binary sysfs at /sys/class/drm/ than inside the
> > cardx folders, so that it will be generic. Could you please suggest a way to achieve that?
> 
> What is a "cardx" driver? 
Meant card0 card1 etc.. Drm drivers.
> Why can you not do it in a device-specific
> location?  Are suddenly _ALL_ DRM drivers going to need this
> information?  What is the use case?  Who is going to be providing this
> blob and where is it going?  What in the kernel uses it?  What on the
> hardware uses it?  What is it actually?

This is for HDCP usecase. List of compromised receivers' ID  called system
renewability Message (SRM) will be available at userspace which needs to
be passed to be kernel. And this data can be parsed at kernel used
across all DRM drivers to implement the HDCP authentication. Hence we
want generic code to parse the SRM data and provide a helper function to
all DRM drivers to validate their HDCP sink's ID.

To achieve this we want to keep the sysfs and parsing logic outside the
drm drivers at the class level.

At present I915 will be using these implementation. in future other DRM
drivers can use the same.

Thanks,
-Ram
> 
> I need a lot more information before being able to determine what you
> can do here.
> 
> thanks,
> 
> greg k-h
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-04-15 17:14 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05  8:42 [PATCH v4 00/13] HDCP2.2 Phase II Ramalingam C
2019-04-05  8:42 ` [PATCH v4 01/13] drm: move content protection property to mode_config Ramalingam C
2019-04-05  8:42 ` [PATCH v4 02/13] drm/i915: debugfs: HDCP2.2 capability read Ramalingam C
2019-04-05  8:42 ` [PATCH v4 03/13] drm: Add Content protection type property Ramalingam C
2019-04-05  8:42 ` [PATCH v4 04/13] drm/i915: Attach content " Ramalingam C
2019-04-05  8:42 ` [PATCH v4 05/13] drivers: create binary sysfs for class Ramalingam C
2019-04-05  9:23   ` Greg Kroah-Hartman
2019-04-05 10:36     ` Ramalingam C
2019-04-05 12:32       ` Greg Kroah-Hartman
2019-04-15 12:41         ` Ramalingam C
2019-04-15 14:47           ` Greg Kroah-Hartman
2019-04-15 17:14             ` Ramalingam C [this message]
2019-04-15 18:01               ` Greg Kroah-Hartman
2019-04-15 19:14                 ` Daniel Vetter
2019-04-16  9:04                   ` Greg Kroah-Hartman
2019-04-16  9:25                     ` Daniel Vetter
2019-04-05  8:42 ` [PATCH v4 06/13] drm: HDCP SRM binary sysfs for subsystem Ramalingam C
2019-04-05  8:42 ` [PATCH v4 07/13] drm/i915: SRM revocation check for HDCP1.4 and 2.2 Ramalingam C
2019-04-05  8:42 ` [PATCH v4 08/13] drm/hdcp: gathering hdcp related code into drm_hdcp.c Ramalingam C
2019-04-05  8:42 ` [PATCH v4 09/13] drm: uevent for connector status change Ramalingam C
2019-04-05  8:42 ` [PATCH v4 10/13] drm/hdcp: update content protection property with uevent Ramalingam C
2019-04-05  8:43 ` [PATCH v4 11/13] drm/i915: update the hdcp state " Ramalingam C
2019-04-05  8:43 ` [PATCH v4 12/13] drm: Add CP downstream_info property Ramalingam C
2019-04-05  8:43 ` [PATCH v4 13/13] drm/i915: Populate downstream info for HDCP Ramalingam C
2019-04-05 12:03   ` Ramalingam C
2019-04-05 11:16 ` ✗ Fi.CI.CHECKPATCH: warning for HDCP2.2 Phase II (rev5) Patchwork
2019-04-05 11:26 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-04-05 11:41 ` ✓ Fi.CI.BAT: success " Patchwork
2019-04-06  7:11 ` ✓ Fi.CI.IGT: " Patchwork

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=20190415171412.GA25423@intel.com \
    --to=ramalingam.c@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=intel-gfx@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.