Re: [LAD] Realtime threads and security

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Daniel Poelzleithner <poelzi@...>
Cc: <linux-audio-dev@...>
Date: Friday, February 25, 2011 - 3:23 pm

On 02/23/2011 06:24 PM, Daniel Poelzleithner wrote:

Yes, that's the idea. Maybe limit the number of audio clients to a few ones.

> There is no nice api for detecting the number of processes in a group

In the case of Android, here's what I imagine:

- a client program asks for (realtime) audio access
- the audio server verifies if there aren't too many clients
- from that, the server either allows or denies access
- in case of a denial the client program can display a meaningful error

One thing is that each client runs under a different UID. This is part of app
sandboxing. There isn't any predetermined groups of users who can or can't
access audio (oh well there is a permission system for that, but it's another
question).

Basically, any app could request audio access, and ulatencyd or whatever does
the same job would have to be rather tightly integrated into the sound server,
and move the requesting app to a realtime cgroup if it's possible, or deny
access and return an error.

Well, you could imagine that ulatencyd and the sound server are distinct and
that the client program must connect to both to achieve realtime + audio access.

But let's take JACK for example. It handles setting up realtime scheduling
transparently when one creates a jack client. There isn't any extra step
necessary. As a supposition, could you imagine that ulatencyd integrates tightly
into JACK to provide fine-grained per-client realtime permissions?

This would for example result in a new error reported by jack_client_open() in
case realtime permissions can't be granted because there are too many clients, etc..

--
Olivier

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAD] Realtime threads and security, Olivier Guilyardi, (Thu Feb 17, 8:40 pm)
Re: [LAD] Realtime threads and security, Daniel Poelzleithner, (Fri Feb 18, 1:43 pm)
Re: [LAD] Realtime threads and security, Olivier Guilyardi, (Wed Feb 23, 10:10 am)
Re: [LAD] Realtime threads and security, Daniel Poelzleithner, (Wed Feb 23, 5:24 pm)
Re: [LAD] Realtime threads and security, Olivier Guilyardi, (Fri Feb 25, 3:23 pm)
Re: [LAD] Realtime threads and security, Paul Davis, (Fri Feb 25, 3:29 pm)
Re: [LAD] Realtime threads and security, torbenh, (Fri Feb 25, 3:56 pm)
Re: [LAD] Realtime threads and security, Olivier Guilyardi, (Fri Feb 25, 3:54 pm)
Re: [LAD] Realtime threads and security, Paul Davis, (Fri Feb 25, 4:32 pm)
Re: [LAD] Realtime threads and security, Olivier Guilyardi, (Fri Feb 25, 4:40 pm)
Re: [LAD] Realtime threads and security, Olivier Guilyardi, (Fri Feb 25, 4:31 pm)
Re: [LAD] Realtime threads and security, Paul Davis, (Fri Feb 25, 4:33 pm)
Re: [LAD] Realtime threads and security, Olivier Guilyardi, (Fri Feb 25, 4:49 pm)
Re: [LAD] Realtime threads and security, Paul Davis, (Fri Feb 25, 4:54 pm)
Re: [LAD] Realtime threads and security, Paul Davis, (Thu Feb 17, 8:48 pm)
Re: [LAD] Realtime threads and security, Olivier Guilyardi, (Thu Feb 17, 9:27 pm)
Re: [LAD] Realtime threads and security, Robin Gareus, (Thu Feb 17, 9:54 pm)
Re: [LAD] Realtime threads and security, Olivier Guilyardi, (Wed Feb 23, 10:22 am)
Re: [LAD] Realtime threads and security, Robin Gareus, (Wed Feb 23, 7:28 pm)
Re: [LAD] Realtime threads and security, Olivier Guilyardi, (Thu Feb 24, 2:59 pm)
Re: [LAD] Realtime threads and security, Robin Gareus, (Thu Feb 24, 6:01 pm)
Re: [LAD] Realtime threads and security, Olivier Guilyardi, (Thu Feb 24, 7:09 pm)
Re: [LAD] Realtime threads and security, Fons Adriaensen, (Thu Feb 17, 10:04 pm)
Re: [LAD] Realtime threads and security, Olivier Guilyardi, (Fri Feb 18, 12:17 pm)
Re: [LAD] Realtime threads and security, torbenh, (Fri Feb 18, 11:19 am)
Re: [LAD] Realtime threads and security, Paul Davis, (Thu Feb 17, 9:55 pm)