[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191223110111.GA4390@linux.intel.com>
Date: Mon, 23 Dec 2019 13:01:11 +0200
From: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org,
linux-sgx@...r.kernel.org, akpm@...ux-foundation.org,
dave.hansen@...el.com, sean.j.christopherson@...el.com,
nhorman@...hat.com, npmccallum@...hat.com, serge.ayoun@...el.com,
shay.katz-zamir@...el.com, haitao.huang@...el.com,
andriy.shevchenko@...ux.intel.com, tglx@...utronix.de,
kai.svahn@...el.com, bp@...en8.de, josh@...htriplett.org,
luto@...nel.org, kai.huang@...el.com, rientjes@...gle.com,
cedric.xing@...el.com, puiterwijk@...hat.com,
linux-security-module@...r.kernel.org,
Suresh Siddha <suresh.b.siddha@...el.com>
Subject: Re: [PATCH v23 12/24] x86/sgx: Linux Enclave Driver
On Mon, Dec 09, 2019 at 09:57:19PM +0200, Jarkko Sakkinen wrote:
> On Sat, Dec 07, 2019 at 09:09:39AM +0100, Greg KH wrote:
> > On Fri, Dec 06, 2019 at 10:38:07PM +0200, Jarkko Sakkinen wrote:
> > > > Why a whole cdev?
> > > >
> > > > Why not use a misc device? YOu only have 2 devices right? Why not 2
> > > > misc devices then? That saves the use of a whole major number and makes
> > > > your code a _LOT_ simpler.
> > >
> > > The downside would be that if we ever want to add sysfs attributes, that
> > > could not be done synchronously with the device creation.
> >
> > That is what the groups member of struct misc_device is for.
>
> OK, cool, then there is no problem changing to misc.
>
> I haven't seen misc drivers (not that I've looked through every single
> of them so I suppose there are such) to use it and somehow have been
> blind to seeing it that it si there.
>
> Thanks again for the feedback. I'll fix this for the next patch set
> version.
Back in 2014 we bumped with the TPM driver to this issue with sysfs
attributes and converted the driver to have its own class to get around
the issue.
The feature came into misc in 2015 [*]. When I sent the first versions
of the patch set in 2017 I was not aware of this change (should have
checked tho). Agree that the bus was not a great choice but I just
used what I thought I had available.
[*] bd735995308b553cc3c7f6a975aa284b270c7e2c
/Jarkko
Powered by blists - more mailing lists