Discussion:
[pulseaudio-discuss] [PATCH] sink: Increase max sink inputs per sink
Arun Raghavan
2013-09-20 03:44:09 UTC
Permalink
We're hitting the 32 sink-input limit quite often with increasing use of
PA by web browsers, so let's increase this limit.
---
src/pulsecore/sink.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pulsecore/sink.h b/src/pulsecore/sink.h
index 332e2b1..e12faba 100644
--- a/src/pulsecore/sink.h
+++ b/src/pulsecore/sink.h
@@ -48,7 +48,7 @@ typedef struct pa_sink_volume_change pa_sink_volume_change;
#include <pulsecore/thread-mq.h>
#include <pulsecore/sink-input.h>

-#define PA_MAX_INPUTS_PER_SINK 32
+#define PA_MAX_INPUTS_PER_SINK 256

/* Returns true if sink is linked: registered and accessible from client side. */
static inline bool PA_SINK_IS_LINKED(pa_sink_state_t x) {
--
1.8.3.1
David Henningsson
2013-09-20 07:29:16 UTC
Permalink
Post by Arun Raghavan
We're hitting the 32 sink-input limit quite often with increasing use of
PA by web browsers, so let's increase this limit.
Does this increase the risk of us being the target of attacks; i e, if a
web browser deliberately starts 255 streams, would we risk getting
killed by using too much rtprio cpu time?

Btw; is there a specific web browser you're looking at?
Post by Arun Raghavan
---
src/pulsecore/sink.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pulsecore/sink.h b/src/pulsecore/sink.h
index 332e2b1..e12faba 100644
--- a/src/pulsecore/sink.h
+++ b/src/pulsecore/sink.h
@@ -48,7 +48,7 @@ typedef struct pa_sink_volume_change pa_sink_volume_change;
#include <pulsecore/thread-mq.h>
#include <pulsecore/sink-input.h>
-#define PA_MAX_INPUTS_PER_SINK 32
+#define PA_MAX_INPUTS_PER_SINK 256
/* Returns true if sink is linked: registered and accessible from client side. */
static inline bool PA_SINK_IS_LINKED(pa_sink_state_t x) {
--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
Tanu Kaskinen
2013-09-20 08:59:39 UTC
Permalink
Post by David Henningsson
Post by Arun Raghavan
We're hitting the 32 sink-input limit quite often with increasing use of
PA by web browsers, so let's increase this limit.
Does this increase the risk of us being the target of attacks; i e, if a
web browser deliberately starts 255 streams, would we risk getting
killed by using too much rtprio cpu time?
Even with the limit being at 32 it's possible to do a DoS attack by
creating streams with many channels and a high sample rate. As far as I
can see, raising the limit doesn't create any new threats.
--
Tanu
Arun Raghavan
2013-09-20 12:06:17 UTC
Permalink
Post by David Henningsson
Post by Arun Raghavan
We're hitting the 32 sink-input limit quite often with increasing use of
PA by web browsers, so let's increase this limit.
Does this increase the risk of us being the target of attacks; i e, if a
web browser deliberately starts 255 streams, would we risk getting
killed by using too much rtprio cpu time?
As Tanu says, this doesn't open up a new vector, really.
Post by David Henningsson
Btw; is there a specific web browser you're looking at?
webkitgtk+ uses PulseAudio via GStreamer and Firefox has a PulseAudio
backend that maps each stream to a PA stream. Chrome/Chromium also has
as PA backend, but I don't recall off the top of my head if they do
their own mixing.

-- Arun
David Henningsson
2013-09-20 12:55:48 UTC
Permalink
Post by Arun Raghavan
Post by David Henningsson
Post by Arun Raghavan
We're hitting the 32 sink-input limit quite often with increasing use of
PA by web browsers, so let's increase this limit.
Does this increase the risk of us being the target of attacks; i e, if a
web browser deliberately starts 255 streams, would we risk getting
killed by using too much rtprio cpu time?
As Tanu says, this doesn't open up a new vector, really.
Post by David Henningsson
Btw; is there a specific web browser you're looking at?
webkitgtk+ uses PulseAudio via GStreamer and Firefox has a PulseAudio
backend that maps each stream to a PA stream. Chrome/Chromium also has
as PA backend, but I don't recall off the top of my head if they do
their own mixing.
Thanks, patch acked from me.
--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
Arun Raghavan
2013-09-20 13:17:42 UTC
Permalink
Post by David Henningsson
Post by Arun Raghavan
Post by David Henningsson
Post by Arun Raghavan
We're hitting the 32 sink-input limit quite often with increasing use of
PA by web browsers, so let's increase this limit.
Does this increase the risk of us being the target of attacks; i e, if a
web browser deliberately starts 255 streams, would we risk getting
killed by using too much rtprio cpu time?
As Tanu says, this doesn't open up a new vector, really.
Post by David Henningsson
Btw; is there a specific web browser you're looking at?
webkitgtk+ uses PulseAudio via GStreamer and Firefox has a PulseAudio
backend that maps each stream to a PA stream. Chrome/Chromium also has
as PA backend, but I don't recall off the top of my head if they do
their own mixing.
Thanks, patch acked from me.
Thanks for the review, pushed now.

-- Arun

Loading...