All of lore.kernel.org
 help / color / mirror / Atom feed
* [refpolicy] what is a suitable type for /dev/cdc-wdm[01]
@ 2011-09-26 10:27 Dominick Grift
  2011-09-27 13:17 ` Christopher J. PeBenito
  0 siblings, 1 reply; 7+ messages in thread
From: Dominick Grift @ 2011-09-26 10:27 UTC (permalink / raw)
  To: refpolicy

/dev/cdc-wdm[01] character device nodes are currently labeled type
device_t:

> # matchpathcon /dev/cdc-wdm0
> /dev/cdc-wdm0	system_u:object_r:device_t:s0

what would be suitable type for these devices?

> CDC Device Management (2 "devices") 
>  CDC Mobile Direct Line (1 "device") 
> 
> The first is supported by the cdc-wdm driver available in 2.6.29 
> (haven't checked exactly when it was added, but it is rather new).
>  It 
> will add two new devices you can send AT commands
> to /dev/cdc-wdm[01], 
> but not do any high speed data transfers over.  Quite useful, since
> the 
> three ACM devices are easily "lost" to GPS, SMS daemon and PPP. 
> 
> The CDC Mobile Direct Line is actually a masqueraded CDC Ethernet 
> device. Ericsson has provided a driver which is mostly a copy of 
> cdc_ether.c.  Nice feature to have, but I've not been able to measure 
> any speed advantages compared to PPP on ttyACM0.  Still, fun to play 
> with :-)

Also, why are ACM tty character device nodes labeled type tty_device_t
and not for example acmtty_device_t?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20110926/549fc39e/attachment.bin 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [refpolicy] what is a suitable type for /dev/cdc-wdm[01]
  2011-09-26 10:27 [refpolicy] what is a suitable type for /dev/cdc-wdm[01] Dominick Grift
@ 2011-09-27 13:17 ` Christopher J. PeBenito
  2011-09-27 15:33   ` Dominick Grift
  2011-09-27 15:49   ` Dominick Grift
  0 siblings, 2 replies; 7+ messages in thread
From: Christopher J. PeBenito @ 2011-09-27 13:17 UTC (permalink / raw)
  To: refpolicy

On 09/26/11 06:27, Dominick Grift wrote:
> /dev/cdc-wdm[01] character device nodes are currently labeled type
> device_t:
> 
>> # matchpathcon /dev/cdc-wdm0
>> /dev/cdc-wdm0	system_u:object_r:device_t:s0
> 
> what would be suitable type for these devices?
> 
>> CDC Device Management (2 "devices") 
>>  CDC Mobile Direct Line (1 "device") 
>>
>> The first is supported by the cdc-wdm driver available in 2.6.29 
>> (haven't checked exactly when it was added, but it is rather new).
>>  It 
>> will add two new devices you can send AT commands
>> to /dev/cdc-wdm[01], 
>> but not do any high speed data transfers over.  Quite useful, since
>> the 
>> three ACM devices are easily "lost" to GPS, SMS daemon and PPP. 

I'm not sure, possibly modem_device_t or a new type.

>> The CDC Mobile Direct Line is actually a masqueraded CDC Ethernet 

If this is a different device node then this probably should be a new type.

>> device. Ericsson has provided a driver which is mostly a copy of 
>> cdc_ether.c.  Nice feature to have, but I've not been able to measure 
>> any speed advantages compared to PPP on ttyACM0.  Still, fun to play 
>> with :-)
>
> Also, why are ACM tty character device nodes labeled type tty_device_t
> and not for example acmtty_device_t?

It would seem that modem_device_t would be a better choice, assuming all ttyACM* devices are cellular modems.

-- 
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [refpolicy] what is a suitable type for /dev/cdc-wdm[01]
  2011-09-27 13:17 ` Christopher J. PeBenito
@ 2011-09-27 15:33   ` Dominick Grift
  2011-09-27 15:42     ` Christopher J. PeBenito
  2011-09-27 15:49   ` Dominick Grift
  1 sibling, 1 reply; 7+ messages in thread
From: Dominick Grift @ 2011-09-27 15:33 UTC (permalink / raw)
  To: refpolicy

On Tue, 2011-09-27 at 09:17 -0400, Christopher J. PeBenito wrote:
> On 09/26/11 06:27, Dominick Grift wrote:
> > /dev/cdc-wdm[01] character device nodes are currently labeled type
> > device_t:
> > 
> >> # matchpathcon /dev/cdc-wdm0
> >> /dev/cdc-wdm0	system_u:object_r:device_t:s0
> > 
> > what would be suitable type for these devices?
> > 
> >> CDC Device Management (2 "devices") 
> >>  CDC Mobile Direct Line (1 "device") 
> >>
> >> The first is supported by the cdc-wdm driver available in 2.6.29 
> >> (haven't checked exactly when it was added, but it is rather new).
> >>  It 
> >> will add two new devices you can send AT commands
> >> to /dev/cdc-wdm[01], 
> >> but not do any high speed data transfers over.  Quite useful, since
> >> the 
> >> three ACM devices are easily "lost" to GPS, SMS daemon and PPP. 
> 
> I'm not sure, possibly modem_device_t or a new type.
> 
> >> The CDC Mobile Direct Line is actually a masqueraded CDC Ethernet 
> 
> If this is a different device node then this probably should be a new type.
> 
> >> device. Ericsson has provided a driver which is mostly a copy of 
> >> cdc_ether.c.  Nice feature to have, but I've not been able to measure 
> >> any speed advantages compared to PPP on ttyACM0.  Still, fun to play 
> >> with :-)
> >
> > Also, why are ACM tty character device nodes labeled type tty_device_t
> > and not for example acmtty_device_t?
> 
> It would seem that modem_device_t would be a better choice, assuming all ttyACM* devices are cellular modems.
> 

why are serial ttys labeled tty_device_t?

> ls -alZ /dev/ | grep ttyS
> crw-rw----. root tty     system_u:object_r:tty_device_t:s0 ttyS0
> crw-rw----. root dialout system_u:object_r:tty_device_t:s0 ttyS1
> crw-rw----. root dialout system_u:object_r:tty_device_t:s0 ttyS2
> crw-rw----. root dialout system_u:object_r:tty_device_t:s0 ttyS3
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20110927/e361b0e2/attachment.bin 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [refpolicy] what is a suitable type for /dev/cdc-wdm[01]
  2011-09-27 15:33   ` Dominick Grift
@ 2011-09-27 15:42     ` Christopher J. PeBenito
  0 siblings, 0 replies; 7+ messages in thread
From: Christopher J. PeBenito @ 2011-09-27 15:42 UTC (permalink / raw)
  To: refpolicy

On 09/27/11 11:33, Dominick Grift wrote:
> On Tue, 2011-09-27 at 09:17 -0400, Christopher J. PeBenito wrote:
>> On 09/26/11 06:27, Dominick Grift wrote:

>>> Also, why are ACM tty character device nodes labeled type tty_device_t
>>> and not for example acmtty_device_t?
>>
>> It would seem that modem_device_t would be a better choice, assuming all ttyACM* devices are cellular modems.
>>
> 
> why are serial ttys labeled tty_device_t?
> 
>> ls -alZ /dev/ | grep ttyS
>> crw-rw----. root tty     system_u:object_r:tty_device_t:s0 ttyS0
>> crw-rw----. root dialout system_u:object_r:tty_device_t:s0 ttyS1
>> crw-rw----. root dialout system_u:object_r:tty_device_t:s0 ttyS2
>> crw-rw----. root dialout system_u:object_r:tty_device_t:s0 ttyS3

Presumably due to serial terminals.  Its an imperfect default label, since serial ports can support other things.  I'm open to other suggestions.

-- 
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [refpolicy] what is a suitable type for /dev/cdc-wdm[01]
  2011-09-27 13:17 ` Christopher J. PeBenito
  2011-09-27 15:33   ` Dominick Grift
@ 2011-09-27 15:49   ` Dominick Grift
  2011-10-04 12:28     ` Christopher J. PeBenito
  1 sibling, 1 reply; 7+ messages in thread
From: Dominick Grift @ 2011-09-27 15:49 UTC (permalink / raw)
  To: refpolicy

On Tue, 2011-09-27 at 09:17 -0400, Christopher J. PeBenito wrote:
> On 09/26/11 06:27, Dominick Grift wrote:
> > /dev/cdc-wdm[01] character device nodes are currently labeled type
> > device_t:
> > 
> >> # matchpathcon /dev/cdc-wdm0
> >> /dev/cdc-wdm0	system_u:object_r:device_t:s0
> > 
> > what would be suitable type for these devices?
> > 
> >> CDC Device Management (2 "devices") 
> >>  CDC Mobile Direct Line (1 "device") 
> >>
> >> The first is supported by the cdc-wdm driver available in 2.6.29 
> >> (haven't checked exactly when it was added, but it is rather new).
> >>  It 
> >> will add two new devices you can send AT commands
> >> to /dev/cdc-wdm[01], 
> >> but not do any high speed data transfers over.  Quite useful, since
> >> the 
> >> three ACM devices are easily "lost" to GPS, SMS daemon and PPP. 
> 
> I'm not sure, possibly modem_device_t or a new type.
> 
> >> The CDC Mobile Direct Line is actually a masqueraded CDC Ethernet 
> 
> If this is a different device node then this probably should be a new type.
> 
> >> device. Ericsson has provided a driver which is mostly a copy of 
> >> cdc_ether.c.  Nice feature to have, but I've not been able to measure 
> >> any speed advantages compared to PPP on ttyACM0.  Still, fun to play 
> >> with :-)
> >
> > Also, why are ACM tty character device nodes labeled type tty_device_t
> > and not for example acmtty_device_t?
> 
> It would seem that modem_device_t would be a better choice, assuming all ttyACM* devices are cellular modems.
> 

>From what i am reading these ttyACM character device nodes are "USB
virtual serial ports"

On my system they are used for sms gps and ppp but i am not sure if that
makes modem_device_t a suitable type for these.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20110927/6924cd0e/attachment.bin 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [refpolicy] what is a suitable type for /dev/cdc-wdm[01]
  2011-09-27 15:49   ` Dominick Grift
@ 2011-10-04 12:28     ` Christopher J. PeBenito
  2011-10-04 12:44       ` Dominick Grift
  0 siblings, 1 reply; 7+ messages in thread
From: Christopher J. PeBenito @ 2011-10-04 12:28 UTC (permalink / raw)
  To: refpolicy

On 09/27/11 11:49, Dominick Grift wrote:
> On Tue, 2011-09-27 at 09:17 -0400, Christopher J. PeBenito wrote:
>> On 09/26/11 06:27, Dominick Grift wrote:

>>>> device. Ericsson has provided a driver which is mostly a copy of 
>>>> cdc_ether.c.  Nice feature to have, but I've not been able to measure 
>>>> any speed advantages compared to PPP on ttyACM0.  Still, fun to play 
>>>> with :-)
>>>
>>> Also, why are ACM tty character device nodes labeled type tty_device_t
>>> and not for example acmtty_device_t?
>>
>> It would seem that modem_device_t would be a better choice, assuming all ttyACM* devices are cellular modems.
>>
> 
> From what i am reading these ttyACM character device nodes are "USB
> virtual serial ports"
> 
> On my system they are used for sms gps and ppp but i am not sure if that
> makes modem_device_t a suitable type for these.
 
Then it seems that tty_device_t is appropriate.

-- 
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [refpolicy] what is a suitable type for /dev/cdc-wdm[01]
  2011-10-04 12:28     ` Christopher J. PeBenito
@ 2011-10-04 12:44       ` Dominick Grift
  0 siblings, 0 replies; 7+ messages in thread
From: Dominick Grift @ 2011-10-04 12:44 UTC (permalink / raw)
  To: refpolicy

On Tue, 2011-10-04 at 08:28 -0400, Christopher J. PeBenito wrote:
<snip>
> > 
> > From what i am reading these ttyACM character device nodes are "USB
> > virtual serial ports"
> > 
> > On my system they are used for sms gps and ppp but i am not sure if that
> > makes modem_device_t a suitable type for these.
>  
> Then it seems that tty_device_t is appropriate.
> 

This to be exact:

usb0 : Ericsson F3507g Mobile Broadband Minicard Network Adapter
ttyACM0 : Ericsson F3507g Mobile Broadband Minicard Modem
ttyACM1 : Ericsson F3507g Mobile Broadband Minicard Data Modem
ttyACM2 : Ericsson F3507g Mobile Broadband Minicard GPS Port
cdc-wdm0 : Ericsson F3507g Mobile Broadband Minicard Device Management
cdc-wdm1 : Ericsson F3507g Mobile Broadband Minicard PC SC Port

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-10-04 12:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-26 10:27 [refpolicy] what is a suitable type for /dev/cdc-wdm[01] Dominick Grift
2011-09-27 13:17 ` Christopher J. PeBenito
2011-09-27 15:33   ` Dominick Grift
2011-09-27 15:42     ` Christopher J. PeBenito
2011-09-27 15:49   ` Dominick Grift
2011-10-04 12:28     ` Christopher J. PeBenito
2011-10-04 12:44       ` Dominick Grift

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.