netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tcp: don't require root to read tcp_metrics
@ 2014-07-30 17:13 Debabrata Banerjee
  2014-07-30 17:38 ` Sergei Shtylyov
  2014-07-30 19:33 ` [PATCH] " Julian Anastasov
  0 siblings, 2 replies; 6+ messages in thread
From: Debabrata Banerjee @ 2014-07-30 17:13 UTC (permalink / raw)
  To: netdev, David S . Miller
  Cc: Debabrata Banerjee, Julian Anastasov, linux-kernel

commit d23ff701643a4a725e2c7a8ba2d567d39daa29ea introduced netlink support for
the new tcp_metrics, however it restricted getting of tcp_metrics to root user
only. This is a change from how these values could have been fetched when in
the old route cache. Unless there's a legitimate reason to restrict the reading
of these values it would be better if normal users could fetch them.

Cc: Julian Anastasov <ja@ssi.bg>
Cc: linux-kernel@vger.kernel.org
---
 net/ipv4/tcp_metrics.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c
index 4fe0418..0d54e59 100644
--- a/net/ipv4/tcp_metrics.c
+++ b/net/ipv4/tcp_metrics.c
@@ -1093,7 +1093,6 @@ static const struct genl_ops tcp_metrics_nl_ops[] = {
 		.doit = tcp_metrics_nl_cmd_get,
 		.dumpit = tcp_metrics_nl_dump,
 		.policy = tcp_metrics_nl_policy,
-		.flags = GENL_ADMIN_PERM,
 	},
 	{
 		.cmd = TCP_METRICS_CMD_DEL,
-- 
2.0.3

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

* Re: [PATCH] tcp: don't require root to read tcp_metrics
  2014-07-30 17:13 [PATCH] tcp: don't require root to read tcp_metrics Debabrata Banerjee
@ 2014-07-30 17:38 ` Sergei Shtylyov
  2014-07-30 17:50   ` [PATCH v2] " Debabrata Banerjee
  2014-07-30 19:33 ` [PATCH] " Julian Anastasov
  1 sibling, 1 reply; 6+ messages in thread
From: Sergei Shtylyov @ 2014-07-30 17:38 UTC (permalink / raw)
  To: Debabrata Banerjee, netdev, David S . Miller
  Cc: Julian Anastasov, linux-kernel

Hello.

On 07/30/2014 09:13 PM, Debabrata Banerjee wrote:

> commit d23ff701643a4a725e2c7a8ba2d567d39daa29ea introduced netlink support for

    Please also specify that commit's summary line in parens.

> the new tcp_metrics, however it restricted getting of tcp_metrics to root user
> only. This is a change from how these values could have been fetched when in
> the old route cache. Unless there's a legitimate reason to restrict the reading
> of these values it would be better if normal users could fetch them.

> Cc: Julian Anastasov <ja@ssi.bg>
> Cc: linux-kernel@vger.kernel.org

    You need to sign off on the patch, else it couldn't be applied.

WBR, Sergei

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

* [PATCH v2] tcp: don't require root to read tcp_metrics
  2014-07-30 17:38 ` Sergei Shtylyov
@ 2014-07-30 17:50   ` Debabrata Banerjee
  2014-07-31 21:07     ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Debabrata Banerjee @ 2014-07-30 17:50 UTC (permalink / raw)
  To: Sergei Shtylyov, netdev, David S . Miller
  Cc: Debabrata Banerjee, Julian Anastasov, linux-kernel

commit d23ff7016 (tcp: add generic netlink support for tcp_metrics) introduced
netlink support for the new tcp_metrics, however it restricted getting of
tcp_metrics to root user only. This is a change from how these values could
have been fetched when in the old route cache. Unless there's a legitimate
reason to restrict the reading of these values it would be better if normal
users could fetch them.

Cc: Julian Anastasov <ja@ssi.bg>
Cc: linux-kernel@vger.kernel.org

Signed-off-by: Debabrata Banerjee <dbanerje@akamai.com>
---
 net/ipv4/tcp_metrics.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c
index 4fe0418..0d54e59 100644
--- a/net/ipv4/tcp_metrics.c
+++ b/net/ipv4/tcp_metrics.c
@@ -1093,7 +1093,6 @@ static const struct genl_ops tcp_metrics_nl_ops[] = {
 		.doit = tcp_metrics_nl_cmd_get,
 		.dumpit = tcp_metrics_nl_dump,
 		.policy = tcp_metrics_nl_policy,
-		.flags = GENL_ADMIN_PERM,
 	},
 	{
 		.cmd = TCP_METRICS_CMD_DEL,
-- 
2.0.3

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

* Re: [PATCH] tcp: don't require root to read tcp_metrics
  2014-07-30 17:13 [PATCH] tcp: don't require root to read tcp_metrics Debabrata Banerjee
  2014-07-30 17:38 ` Sergei Shtylyov
@ 2014-07-30 19:33 ` Julian Anastasov
  2014-07-30 19:58   ` Banerjee, Debabrata
  1 sibling, 1 reply; 6+ messages in thread
From: Julian Anastasov @ 2014-07-30 19:33 UTC (permalink / raw)
  To: Debabrata Banerjee; +Cc: netdev, David S . Miller, linux-kernel


	Hello,

On Wed, 30 Jul 2014, Debabrata Banerjee wrote:

> commit d23ff701643a4a725e2c7a8ba2d567d39daa29ea introduced netlink support for
> the new tcp_metrics, however it restricted getting of tcp_metrics to root user
> only. This is a change from how these values could have been fetched when in
> the old route cache. Unless there's a legitimate reason to restrict the reading
> of these values it would be better if normal users could fetch them.

	Not sure how fatal is to show TCP fastopen cookies to
any user. Otherwise, I don't remember for other restrictions.

Regards

--
Julian Anastasov <ja@ssi.bg>

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

* Re: [PATCH] tcp: don't require root to read tcp_metrics
  2014-07-30 19:33 ` [PATCH] " Julian Anastasov
@ 2014-07-30 19:58   ` Banerjee, Debabrata
  0 siblings, 0 replies; 6+ messages in thread
From: Banerjee, Debabrata @ 2014-07-30 19:58 UTC (permalink / raw)
  To: Julian Anastasov, Sergei Shtylyov
  Cc: netdev@vger.kernel.org, David S . Miller,
	linux-kernel@vger.kernel.org

Hi,

On 7/30/14, 3:33 PM, "Julian Anastasov" <ja@ssi.bg> wrote:
>On Wed, 30 Jul 2014, Debabrata Banerjee wrote:
>
>> commit d23ff701643a4a725e2c7a8ba2d567d39daa29ea introduced netlink
>>support for
>> the new tcp_metrics, however it restricted getting of tcp_metrics to
>>root user
>> only. This is a change from how these values could have been fetched
>>when in
>> the old route cache. Unless there's a legitimate reason to restrict the
>>reading
>> of these values it would be better if normal users could fetch them.
>
>	Not sure how fatal is to show TCP fastopen cookies to
>any user. Otherwise, I don't remember for other restrictions.


TFO cookie as reported is sent in the clear in the tcp header. It is not
the secret/key used to generate the cookie, so this should be fine.

-Debabrata

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

* Re: [PATCH v2] tcp: don't require root to read tcp_metrics
  2014-07-30 17:50   ` [PATCH v2] " Debabrata Banerjee
@ 2014-07-31 21:07     ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2014-07-31 21:07 UTC (permalink / raw)
  To: dbanerje; +Cc: sergei.shtylyov, netdev, ja, linux-kernel

From: Debabrata Banerjee <dbanerje@akamai.com>
Date: Wed, 30 Jul 2014 13:50:17 -0400

> commit d23ff7016 (tcp: add generic netlink support for tcp_metrics) introduced
> netlink support for the new tcp_metrics, however it restricted getting of
> tcp_metrics to root user only. This is a change from how these values could
> have been fetched when in the old route cache. Unless there's a legitimate
> reason to restrict the reading of these values it would be better if normal
> users could fetch them.
> 
> Cc: Julian Anastasov <ja@ssi.bg>
> Cc: linux-kernel@vger.kernel.org
> 
> Signed-off-by: Debabrata Banerjee <dbanerje@akamai.com>

Applied to net-next, thanks.

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

end of thread, other threads:[~2014-07-31 21:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-30 17:13 [PATCH] tcp: don't require root to read tcp_metrics Debabrata Banerjee
2014-07-30 17:38 ` Sergei Shtylyov
2014-07-30 17:50   ` [PATCH v2] " Debabrata Banerjee
2014-07-31 21:07     ` David Miller
2014-07-30 19:33 ` [PATCH] " Julian Anastasov
2014-07-30 19:58   ` Banerjee, Debabrata

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).