Re: [PATCH v2 2/3] driver: provide sysfs interfaces to access TXT config space

2013-05-17 Thread Pavel Machek
On Fri 2013-05-17 08:50:11, Ren, Qiaowei wrote:
> On 2013-05-17, Pavel Machek wrote:
> > On Tue 2013-05-14 01:24:43, Qiaowei Ren wrote:
> >> +What: /sys/devices/platform/intel_txt/config/STS_raw +Date:   
> >> May 2013
> >> +KernelVersion:3.9 +Contact:   "Qiaowei Ren" 
> >> +Description:  TXT.STS is the general status register. This read-only
> >> register + is used by AC modules and the MLE to get the status of
> >> various +  Intel TXT features.
> > 
> > This is not enough to allow people to understand what this does/should
> > do, nor does it allow (for example) ARM people to implement something 
> > compatible.
> 
> Currently TXT is only a technology for safer computing provided by Intel. I 
> am absolutely not sure whether similar technology will be provided on ARM or 
> other platform in future. But I guess I don't have to consider those future 
> possible implementation on ARM or other platform. :)
> 

You still have to properly design the interface and properly document
it, so people can understand and test it, and develop compatible
implementations.
Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH v2 2/3] driver: provide sysfs interfaces to access TXT config space

2013-05-17 Thread Ren, Qiaowei
On 2013-05-17, Pavel Machek wrote:
> On Tue 2013-05-14 01:24:43, Qiaowei Ren wrote:
>> +What:   /sys/devices/platform/intel_txt/config/STS_raw +Date:   
>> May 2013
>> +KernelVersion:  3.9 +Contact:   "Qiaowei Ren" 
>> +Description:TXT.STS is the general status register. This read-only
>> register +   is used by AC modules and the MLE to get the status of
>> various +Intel TXT features.
> 
> This is not enough to allow people to understand what this does/should
> do, nor does it allow (for example) ARM people to implement something 
> compatible.

Currently TXT is only a technology for safer computing provided by Intel. I am 
absolutely not sure whether similar technology will be provided on ARM or other 
platform in future. But I guess I don't have to consider those future possible 
implementation on ARM or other platform. :)

Thanks,
Qiaowei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 2/3] driver: provide sysfs interfaces to access TXT config space

2013-05-16 Thread Pavel Machek
On Tue 2013-05-14 01:24:43, Qiaowei Ren wrote:
> These interfaces are located in /sys/devices/platform/intel_txt/config,
> and including totally 37 files, providing access to Intel TXT
> configuration registers.

This looks like very wrong interface... equivalent of /dev/mem.

> +What:/sys/devices/platform/intel_txt/config/STS_raw
> +Date:May 2013
> +KernelVersion:   3.9
> +Contact: "Qiaowei Ren" 
> +Description: TXT.STS is the general status register. This read-only register
> + is used by AC modules and the MLE to get the status of various
> + Intel TXT features.

This is not enough to allow people to understand what this does/should
do, nor does it allow (for example) ARM people to implement something
compatible.

Is there specific reason why "better" interface is impossible?
Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH v2 2/3] driver: provide sysfs interfaces to access TXT config space

2013-05-13 Thread Ren, Qiaowei
On 2013-05-14, Matthew Garrett wrote:
> On Tue, 2013-05-14 at 01:24 +0800, Qiaowei Ren wrote:
> > These interfaces are located
> > in /sys/devices/platform/intel_txt/config,
> > and including totally 37 files, providing access to Intel TXT
> > configuration registers.
> 
> Do you have any example userspace code using these features?

You mean test programs using these sysfs files? Currently I just did some 
simple demos like the following:

cat config/STS_private_open
echo 1 > CMD_CLOSE_PRIVATE
cat config/STS_private_open

cat config/STS_ locality_1_open
echo 1 > CMD_CLOSE_LOCALITY1
cat config/ STS_ locality_1_open
echo 1 > CMD_OPEN_LOCALITY1
cat config/ STS_ locality_1_open

Thanks,
Qiaowei
N�r��yb�X��ǧv�^�)޺{.n�+{zX����ܨ}���Ơz�&j:+v���zZ+��+zf���h���~i���z��w���?�&�)ߢf��^jǫy�m��@A�a���
0��h���i

Re: [PATCH v2 2/3] driver: provide sysfs interfaces to access TXT config space

2013-05-13 Thread Matthew Garrett
On Tue, 2013-05-14 at 01:24 +0800, Qiaowei Ren wrote:
> These interfaces are located
> in /sys/devices/platform/intel_txt/config,
> and including totally 37 files, providing access to Intel TXT
> configuration registers.

Do you have any example userspace code using these features?

-- 
Matthew Garrett | mj...@srcf.ucam.org
N�r��yb�X��ǧv�^�)޺{.n�+{zX����ܨ}���Ơz�&j:+v���zZ+��+zf���h���~i���z��w���?�&�)ߢf��^jǫy�m��@A�a���
0��h���i