[pulseaudio-discuss] [PATCH 2/2] pulsecore: srbchannel: Introduce per-client SHM files

David Henningsson david.henningsson at canonical.com
Fri Aug 28 06:25:44 PDT 2015



On 2015-08-28 15:22, Ahmed S. Darwish wrote:
> On 2015-08-28 02:58PM +0200, David Henningsson wrote:
>>
>> On 2015-08-28 14:48, Ahmed S. Darwish wrote:
>>>
>>> The PA daemon currently uses a system-wide SHM file for all clients
>>> sending and receiving commands using the srbchannel low-latency
>>> mechanism.
>>>
>>> To be able to safely run PA daemon in system mode later using memfds,
>>> and to provide the necessary ground work for policy and sandboxing,
>>> create the srbchannel SHM files on a per-client basis.
>>>
>>> Signed-off-by: Ahmed S. Darwish <darwish.07 at gmail.com>
>>
>> Looks good as a start, but notice that this will not fix security, as the
>> audio is still routed over the ordinary mempool.
>>
>
> Thanks :-)
>
> Regarding the mempools, after doing doing some inspection, there are
> only two remaining:
>
> - One is created by the client using pa_context_new(), and seems to
>    be the main one for sending audio from client to daemon. Do we have
>    to do anything about it?
>
> - The other is created, system-wide, by the daeamon at pa_core->mempool.
>    I still did not check what this one is used for. Any advice?

Both of these are used for sending audio (one in each direction). If 
possible, I'd like to move both into the current per-client rwpool. If 
impossible, just move the system-wide one there.

>
>>
>> Would be interesting to know how this affects memory usage though.
>>
>
> I agree. Let's measure memory consumption vs. an increasing number
> of connected PA clients and see the resulting graph before and after.
>
> Regards,
>

-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic


More information about the pulseaudio-discuss mailing list