All of lore.kernel.org
 help / color / mirror / Atom feed
* root owned writeable files under /sys
@ 2010-06-03 21:58 Sumeet Lahorani
       [not found] ` <4C082598.8000809-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Sumeet Lahorani @ 2010-06-03 21:58 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA


Hi All,

With ofed 1.5.1 (and it appears to be the case in prior versions as 
well), I see the following files created under /sys which are world 
writeable

# find /sys -type f -perm 222 -ls
  6834    0 --w--w--w-   1 root     root            0 Jun  3 14:50 
/sys/class/infiniband/mlx4_0/diag_counters/clear_diag
  8344    0 --w--w--w-   1 root     root         4096 Jun  3 14:43 
/sys/class/net/ib1/delete_child
  8343    0 --w--w--w-   1 root     root         4096 Jun  3 14:43 
/sys/class/net/ib1/create_child
  8295    0 --w--w--w-   1 root     root         4096 Jun  3 14:43 
/sys/class/net/ib0/delete_child
  8294    0 --w--w--w-   1 root     root            0 Jun  3 14:39 
/sys/class/net/ib0/create_child
  6017    0 --w--w--w-   1 root     root         4096 Jun  3 14:43 
/sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/port_trigger

ib0 & ib1 are slave interfaces corresponding to the 2 ports on a 
ConnectX HCA.

At least the create_child & delete_child files appear to be dangerous to 
leave as world writeable because they result in resources allocations. 
I'm not sure about the others. Do these have to be world writeable?

- Sumeet

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: root owned writeable files under /sys
       [not found] ` <4C082598.8000809-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2010-06-06  4:59   ` Or Gerlitz
       [not found]     ` <4C0B2B24.6020304-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Or Gerlitz @ 2010-06-06  4:59 UTC (permalink / raw)
  To: Sumeet Lahorani, Roland Dreier; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Sumeet Lahorani wrote:
> I see the following files created under /sys which are world writeable
> /sys/class/net/ib0/delete_child
> /sys/class/net/ib0/create_child
> At least the create_child & delete_child files appear to be dangerous to
> leave as world writeable because they result in resources allocations.

Yes, this looks bad. The below patch fixes that, I tested it on 2.6.35-rc1

[PATCH] make ipoib child entries non-world writable

Sumeet Lahorani <sumeet.lahorani-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> reported that the ipoib 
child entries are world writable, fix them to be root only writable

Signed-off-by: Or Gerlitz <ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org>

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index df3eb8c..b4b2257 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -1163,7 +1163,7 @@ static ssize_t create_child(struct device *dev,
 
 	return ret ? ret : count;
 }
-static DEVICE_ATTR(create_child, S_IWUGO, NULL, create_child);
+static DEVICE_ATTR(create_child, S_IWUSR, NULL, create_child);
 
 static ssize_t delete_child(struct device *dev,
 			    struct device_attribute *attr,
@@ -1183,7 +1183,7 @@ static ssize_t delete_child(struct device *dev,
 	return ret ? ret : count;
 
 }
-static DEVICE_ATTR(delete_child, S_IWUGO, NULL, delete_child);
+static DEVICE_ATTR(delete_child, S_IWUSR, NULL, delete_child);
 
 int ipoib_add_pkey_attr(struct net_device *dev)
 {
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: root owned writeable files under /sys
       [not found]     ` <4C0B2B24.6020304-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
@ 2010-06-06 16:08       ` Sumeet Lahorani
       [not found]         ` <4C0BC819.1060201-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  2010-06-24  6:15       ` sysfs IPoIB root owned writable files Or Gerlitz
  2010-07-06 21:24       ` root owned writeable files under /sys Roland Dreier
  2 siblings, 1 reply; 19+ messages in thread
From: Sumeet Lahorani @ 2010-06-06 16:08 UTC (permalink / raw)
  To: Or Gerlitz; +Cc: Roland Dreier, linux-rdma-u79uwXL29TY76Z2rM5mHXA


Thanks. I realized that my earlier find command didn't capture all the 
files I was looking for. After your patch, the following still need to 
be addressed (all are mlx4 files)

# find /sys -type f -perm -222
/sys/class/infiniband/mlx4_0/diag_counters/clear_diag
/sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/port_trigger
/sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/mlx4_port2
/sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/mlx4_port1

- Sumeet

Or Gerlitz wrote:
> Sumeet Lahorani wrote:
>   
>> I see the following files created under /sys which are world writeable
>> /sys/class/net/ib0/delete_child
>> /sys/class/net/ib0/create_child
>> At least the create_child & delete_child files appear to be dangerous to
>> leave as world writeable because they result in resources allocations.
>>     
>
> Yes, this looks bad. The below patch fixes that, I tested it on 2.6.35-rc1
>
> [PATCH] make ipoib child entries non-world writable
>
> Sumeet Lahorani <sumeet.lahorani-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> reported that the ipoib 
> child entries are world writable, fix them to be root only writable
>
> Signed-off-by: Or Gerlitz <ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org>
>
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> index df3eb8c..b4b2257 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> @@ -1163,7 +1163,7 @@ static ssize_t create_child(struct device *dev,
>  
>  	return ret ? ret : count;
>  }
> -static DEVICE_ATTR(create_child, S_IWUGO, NULL, create_child);
> +static DEVICE_ATTR(create_child, S_IWUSR, NULL, create_child);
>  
>  static ssize_t delete_child(struct device *dev,
>  			    struct device_attribute *attr,
> @@ -1183,7 +1183,7 @@ static ssize_t delete_child(struct device *dev,
>  	return ret ? ret : count;
>  
>  }
> -static DEVICE_ATTR(delete_child, S_IWUGO, NULL, delete_child);
> +static DEVICE_ATTR(delete_child, S_IWUSR, NULL, delete_child);
>  
>  int ipoib_add_pkey_attr(struct net_device *dev)
>  {
>   

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: root owned writeable files under /sys
       [not found]         ` <4C0BC819.1060201-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2010-06-07  4:56           ` Or Gerlitz
  2010-06-08  9:10           ` Eli Cohen
  2010-07-07  5:42           ` root owned writable " Or Gerlitz
  2 siblings, 0 replies; 19+ messages in thread
From: Or Gerlitz @ 2010-06-07  4:56 UTC (permalink / raw)
  To: Sumeet Lahorani; +Cc: Roland Dreier, linux-rdma-u79uwXL29TY76Z2rM5mHXA

Sumeet Lahorani wrote:
> Thanks. I realized that my earlier find command didn't capture all the
> files I was looking for. After your patch, the following still need to
> be addressed (all are mlx4 files)

&& all are not part of the mainline kernel, as such, you should approach the ofed maintainers or make a comment when the relevant code is submitted upstream.

Or.

> /sys/class/infiniband/mlx4_0/diag_counters/clear_diag
> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/port_trigger
> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/mlx4_port2
> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/mlx4_port1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: root owned writeable files under /sys
       [not found]         ` <4C0BC819.1060201-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  2010-06-07  4:56           ` Or Gerlitz
@ 2010-06-08  9:10           ` Eli Cohen
       [not found]             ` <AANLkTikpFbgHyXoeQQt5wU4WkpbXQnqXUYRoy718qSuW-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2010-07-07  5:42           ` root owned writable " Or Gerlitz
  2 siblings, 1 reply; 19+ messages in thread
From: Eli Cohen @ 2010-06-08  9:10 UTC (permalink / raw)
  To: Sumeet Lahorani
  Cc: Or Gerlitz, Roland Dreier, linux-rdma-u79uwXL29TY76Z2rM5mHXA

I don't understand why mlx4_port1 and mlx4_port2 have world write
permissions on your system. I can't see this from the sources nor from
installing ofed-1.5.1 on my system. I agree though that the
permissions for port_trigger and clear_diag should be changed. We'll
push a fix to OFED 1.5.2.

On Sun, Jun 6, 2010 at 7:08 PM, Sumeet Lahorani
<Sumeet.Lahorani-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> wrote:
>
> Thanks. I realized that my earlier find command didn't capture all the files
> I was looking for. After your patch, the following still need to be
> addressed (all are mlx4 files)
>
> # find /sys -type f -perm -222
> /sys/class/infiniband/mlx4_0/diag_counters/clear_diag
> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/port_trigger
> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/mlx4_port2
> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/mlx4_port1
>
> - Sumeet
>
> Or Gerlitz wrote:
>>
>> Sumeet Lahorani wrote:
>>
>>>
>>> I see the following files created under /sys which are world writeable
>>> /sys/class/net/ib0/delete_child
>>> /sys/class/net/ib0/create_child
>>> At least the create_child & delete_child files appear to be dangerous to
>>> leave as world writeable because they result in resources allocations.
>>>
>>
>> Yes, this looks bad. The below patch fixes that, I tested it on 2.6.35-rc1
>>
>> [PATCH] make ipoib child entries non-world writable
>>
>> Sumeet Lahorani <sumeet.lahorani-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> reported that the ipoib child
>> entries are world writable, fix them to be root only writable
>>
>> Signed-off-by: Or Gerlitz <ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org>
>>
>> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c
>> b/drivers/infiniband/ulp/ipoib/ipoib_main.c
>> index df3eb8c..b4b2257 100644
>> --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
>> +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
>> @@ -1163,7 +1163,7 @@ static ssize_t create_child(struct device *dev,
>>        return ret ? ret : count;
>>  }
>> -static DEVICE_ATTR(create_child, S_IWUGO, NULL, create_child);
>> +static DEVICE_ATTR(create_child, S_IWUSR, NULL, create_child);
>>  static ssize_t delete_child(struct device *dev,
>>                            struct device_attribute *attr,
>> @@ -1183,7 +1183,7 @@ static ssize_t delete_child(struct device *dev,
>>        return ret ? ret : count;
>>  }
>> -static DEVICE_ATTR(delete_child, S_IWUGO, NULL, delete_child);
>> +static DEVICE_ATTR(delete_child, S_IWUSR, NULL, delete_child);
>>  int ipoib_add_pkey_attr(struct net_device *dev)
>>  {
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: root owned writeable files under /sys
       [not found]             ` <AANLkTikpFbgHyXoeQQt5wU4WkpbXQnqXUYRoy718qSuW-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2010-06-09  7:20               ` Sumeet Lahorani
  0 siblings, 0 replies; 19+ messages in thread
From: Sumeet Lahorani @ 2010-06-09  7:20 UTC (permalink / raw)
  To: Eli Cohen; +Cc: Or Gerlitz, Roland Dreier, linux-rdma-u79uwXL29TY76Z2rM5mHXA


You are right. The mlx4_port* files are world writeable in ofed 1.4.2 
but not in 1.5.1.

static int mlx4_init_port_info(struct mlx4_dev *dev, int port)
{
        struct mlx4_port_info *info = &mlx4_priv(dev)->port[port];
        struct attribute attr = {.name = info->dev_name,
                                        .mode =  S_IWUGO | S_IRUGO};

- Sumeet

Eli Cohen wrote:
> I don't understand why mlx4_port1 and mlx4_port2 have world write
> permissions on your system. I can't see this from the sources nor from
> installing ofed-1.5.1 on my system. I agree though that the
> permissions for port_trigger and clear_diag should be changed. We'll
> push a fix to OFED 1.5.2.
>
> On Sun, Jun 6, 2010 at 7:08 PM, Sumeet Lahorani
> <Sumeet.Lahorani-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> wrote:
>   
>> Thanks. I realized that my earlier find command didn't capture all the files
>> I was looking for. After your patch, the following still need to be
>> addressed (all are mlx4 files)
>>
>> # find /sys -type f -perm -222
>> /sys/class/infiniband/mlx4_0/diag_counters/clear_diag
>> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/port_trigger
>> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/mlx4_port2
>> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/mlx4_port1
>>
>> - Sumeet
>>
>> Or Gerlitz wrote:
>>     
>>> Sumeet Lahorani wrote:
>>>
>>>       
>>>> I see the following files created under /sys which are world writeable
>>>> /sys/class/net/ib0/delete_child
>>>> /sys/class/net/ib0/create_child
>>>> At least the create_child & delete_child files appear to be dangerous to
>>>> leave as world writeable because they result in resources allocations.
>>>>
>>>>         
>>> Yes, this looks bad. The below patch fixes that, I tested it on 2.6.35-rc1
>>>
>>> [PATCH] make ipoib child entries non-world writable
>>>
>>> Sumeet Lahorani <sumeet.lahorani-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> reported that the ipoib child
>>> entries are world writable, fix them to be root only writable
>>>
>>> Signed-off-by: Or Gerlitz <ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org>
>>>
>>> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c
>>> b/drivers/infiniband/ulp/ipoib/ipoib_main.c
>>> index df3eb8c..b4b2257 100644
>>> --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
>>> +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
>>> @@ -1163,7 +1163,7 @@ static ssize_t create_child(struct device *dev,
>>>        return ret ? ret : count;
>>>  }
>>> -static DEVICE_ATTR(create_child, S_IWUGO, NULL, create_child);
>>> +static DEVICE_ATTR(create_child, S_IWUSR, NULL, create_child);
>>>  static ssize_t delete_child(struct device *dev,
>>>                            struct device_attribute *attr,
>>> @@ -1183,7 +1183,7 @@ static ssize_t delete_child(struct device *dev,
>>>        return ret ? ret : count;
>>>  }
>>> -static DEVICE_ATTR(delete_child, S_IWUGO, NULL, delete_child);
>>> +static DEVICE_ATTR(delete_child, S_IWUSR, NULL, delete_child);
>>>  int ipoib_add_pkey_attr(struct net_device *dev)
>>>  {
>>>
>>>       
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>>     

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: sysfs IPoIB root owned writable files
       [not found]     ` <4C0B2B24.6020304-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
  2010-06-06 16:08       ` Sumeet Lahorani
@ 2010-06-24  6:15       ` Or Gerlitz
  2010-07-06 21:24       ` root owned writeable files under /sys Roland Dreier
  2 siblings, 0 replies; 19+ messages in thread
From: Or Gerlitz @ 2010-06-24  6:15 UTC (permalink / raw)
  To: Roland Dreier; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA


>> the following files created under /sys which are world writeable
>> /sys/class/net/ib0/delete_child  /sys/class/net/ib0/create_child
>> At least the create_child & delete_child files appear to be dangerous to leave as world writeable because they result in resources allocations.
Roland,

If I see a patch in linux-rdma patchwork, e.g 
https://patchwork.kernel.org/patch/104502 with the below patch, does 
this mean it will get to be reviewed/merged towards 2.6.36, or you 
prefer a reminder on the list?

Or.
> Yes, this looks bad. The below patch fixes that, I tested it on 2.6.35-rc1
>
> [PATCH] make ipoib child entries non-world writable
>
> Sumeet Lahorani <sumeet.lahorani-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> reported that the ipoib 
> child entries are world writable, fix them to be root only writable
>
> Signed-off-by: Or Gerlitz <ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org>
>
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> index df3eb8c..b4b2257 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> @@ -1163,7 +1163,7 @@ static ssize_t create_child(struct device *dev,
>  
>  	return ret ? ret : count;
>  }
> -static DEVICE_ATTR(create_child, S_IWUGO, NULL, create_child);
> +static DEVICE_ATTR(create_child, S_IWUSR, NULL, create_child);
>  
>  static ssize_t delete_child(struct device *dev,
>  			    struct device_attribute *attr,
> @@ -1183,7 +1183,7 @@ static ssize_t delete_child(struct device *dev,
>  	return ret ? ret : count;
>  
>  }
> -static DEVICE_ATTR(delete_child, S_IWUGO, NULL, delete_child);
> +static DEVICE_ATTR(delete_child, S_IWUSR, NULL, delete_child);
>  
>  int ipoib_add_pkey_attr(struct net_device *dev)
>  {

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: root owned writeable files under /sys
       [not found]     ` <4C0B2B24.6020304-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
  2010-06-06 16:08       ` Sumeet Lahorani
  2010-06-24  6:15       ` sysfs IPoIB root owned writable files Or Gerlitz
@ 2010-07-06 21:24       ` Roland Dreier
       [not found]         ` <adaaaq4mhhd.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
  2 siblings, 1 reply; 19+ messages in thread
From: Roland Dreier @ 2010-07-06 21:24 UTC (permalink / raw)
  To: Or Gerlitz; +Cc: Sumeet Lahorani, linux-rdma-u79uwXL29TY76Z2rM5mHXA

thanks, applied
-- 
Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: root owned writable files under /sys
       [not found]         ` <4C0BC819.1060201-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  2010-06-07  4:56           ` Or Gerlitz
  2010-06-08  9:10           ` Eli Cohen
@ 2010-07-07  5:42           ` Or Gerlitz
       [not found]             ` <4C3413BD.5030008-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
  2 siblings, 1 reply; 19+ messages in thread
From: Or Gerlitz @ 2010-07-07  5:42 UTC (permalink / raw)
  To: Sumeet Lahorani, Jack Morgenstein, Tziporet Koren
  Cc: Roland Dreier, linux-rdma-u79uwXL29TY76Z2rM5mHXA

Sumeet Lahorani wrote:
> # find /sys -type f -perm -222
> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/port_trigger
> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/mlx4_port2
> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/mlx4_port1

Jack, Tziporet 

Can you clarify the status of the upstream kernel mlx4 multi-protocol support? looking on Linus git, I see one commit, 7ff93f8b7ecbc36e7ffc5c11a61643821c1bfee5 "mlx4_core: Multiple port type support" dated to Oct 2008, wheres ofed ships couple of patches touching this area, e.g adding the above sysfs entries. So what is the extra functionality introduced or bug/s fixed by those patches? any reason not to push them upstream? 


Or.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: root owned writable files under /sys
       [not found]             ` <4C3413BD.5030008-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
@ 2010-07-07 11:25               ` Tziporet Koren
       [not found]                 ` <E113D394D7C5DB4F8FF691FA7EE9DB443A943033CD-WQlSmcKwN8Te+A/uUDamNg@public.gmane.org>
  2010-07-18 14:03               ` Jack Morgenstein
  1 sibling, 1 reply; 19+ messages in thread
From: Tziporet Koren @ 2010-07-07 11:25 UTC (permalink / raw)
  To: Or Gerlitz, Sumeet Lahorani, Jack Morgenstein
  Cc: Roland Dreier, linux-rdma-u79uwXL29TY76Z2rM5mHXA

On 7/7/2010 8:42 AM, Or Gerlitz wrote:
>
> Jack, Tziporet 
>
> Can you clarify the status of the upstream kernel mlx4 multi-protocol support? looking on Linus git, I see one commit, 7ff93f8b7ecbc36e7ffc5c11a61643821c1bfee5 "mlx4_core: Multiple port type support" dated to Oct 2008, wheres ofed ships couple of patches touching this area, e.g adding the above sysfs entries. So what is the extra functionality introduced or bug/s fixed by those patches? any reason not to push them upstream? 
>
Jack is on vacation and will be back in 2 weeks
I will ask him to look at this when he is back

Tziporet

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: root owned writable files under /sys
       [not found]                 ` <E113D394D7C5DB4F8FF691FA7EE9DB443A943033CD-WQlSmcKwN8Te+A/uUDamNg@public.gmane.org>
@ 2010-07-07 11:46                   ` Or Gerlitz
  0 siblings, 0 replies; 19+ messages in thread
From: Or Gerlitz @ 2010-07-07 11:46 UTC (permalink / raw)
  To: Tziporet Koren
  Cc: Sumeet Lahorani, Roland Dreier,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Yevgeny Petrilin

Tziporet Koren wrote:
> Jack is on vacation and will be back in 2 weeks. I will ask him to look at this when he is back
All this could have been much simpler if Yevgeny was responding, he's 
signed on the multi-protocol related patches shipped with ofed. So far, 
I had hard time getting responses form him on any of the notes I sent re 
mlx4_en and _core

Or.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: root owned writeable files under /sys
       [not found]         ` <adaaaq4mhhd.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
@ 2010-07-07 14:48           ` Or Gerlitz
       [not found]             ` <AANLkTimCsfv06uHec5bA-PNJVL2ghdZCycyn1w8HybNe-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Or Gerlitz @ 2010-07-07 14:48 UTC (permalink / raw)
  To: Roland Dreier
  Cc: Or Gerlitz, Sumeet Lahorani, linux-rdma-u79uwXL29TY76Z2rM5mHXA

Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> wrote:
> thanks, applied

I don't see it, and none of the other patches you accepted last night,
in the for-next brach of yours, where are they...?

Or.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: root owned writeable files under /sys
       [not found]             ` <AANLkTimCsfv06uHec5bA-PNJVL2ghdZCycyn1w8HybNe-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2010-07-07 15:19               ` Roland Dreier
  0 siblings, 0 replies; 19+ messages in thread
From: Roland Dreier @ 2010-07-07 15:19 UTC (permalink / raw)
  To: Or Gerlitz; +Cc: Or Gerlitz, Sumeet Lahorani, linux-rdma-u79uwXL29TY76Z2rM5mHXA

 > I don't see it, and none of the other patches you accepted last night,
 > in the for-next brach of yours, where are they...?

Sitting on my local system ;)
Forgot to do git push to kernel.org.
-- 
Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: root owned writable files under /sys
       [not found]             ` <4C3413BD.5030008-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
  2010-07-07 11:25               ` Tziporet Koren
@ 2010-07-18 14:03               ` Jack Morgenstein
       [not found]                 ` <E113D394D7C5DB4F8FF691FA7EE9DB443B38B99C02-WQlSmcKwN8Te+A/uUDamNg@public.gmane.org>
  1 sibling, 1 reply; 19+ messages in thread
From: Jack Morgenstein @ 2010-07-18 14:03 UTC (permalink / raw)
  To: Or Gerlitz, Sumeet Lahorani, Tziporet Koren
  Cc: Roland Dreier, linux-rdma-u79uwXL29TY76Z2rM5mHXA

Or,
The sysfs entries you refer to are actually introduced in commit 7ff93f8b7ecbc36e7ffc5c11a61643821c1bfee5.
Which patches in ofed but not upstream are you referring to?

-Jack

-----Original Message-----
From: Or Gerlitz [mailto:ogerlitz-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org]
Sent: Wednesday, July 07, 2010 8:42 AM
To: Sumeet Lahorani; Jack Morgenstein; Tziporet Koren
Cc: Roland Dreier; linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: root owned writable files under /sys

Sumeet Lahorani wrote:
> # find /sys -type f -perm -222
> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/port_trigger
> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/mlx4_port2
> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/mlx4_port1

Jack, Tziporet

Can you clarify the status of the upstream kernel mlx4 multi-protocol support? looking on Linus git, I see one commit, 7ff93f8b7ecbc36e7ffc5c11a61643821c1bfee5 "mlx4_core: Multiple port type support" dated to Oct 2008, wheres ofed ships couple of patches touching this area, e.g adding the above sysfs entries. So what is the extra functionality introduced or bug/s fixed by those patches? any reason not to push them upstream?


Or.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: root owned writable files under /sys
       [not found]                 ` <E113D394D7C5DB4F8FF691FA7EE9DB443B38B99C02-WQlSmcKwN8Te+A/uUDamNg@public.gmane.org>
@ 2010-07-18 16:49                   ` Or Gerlitz
       [not found]                     ` <4C43309E.4020001-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Or Gerlitz @ 2010-07-18 16:49 UTC (permalink / raw)
  To: Jack Morgenstein
  Cc: Sumeet Lahorani, Tziporet Koren, Roland Dreier,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Yevgeny Petrilin

Jack Morgenstein wrote:
> The sysfs entries you refer to are introduced in commit 7ff93f8b7ecbc36e7ffc5c11a61643821c1bfee5
> which patches in ofed but not upstream are you referring to?

Hi Jack,

I took another look, indeed the mlx4_port{1,2} sysfs entries are introduced in the commit
you pointed on and their permissions looks okay (S_IRUGO | S_IWUSR), they are not world writable. 

As for the port_trigger sysfs entry, it is introduced by a patch shipped with ofed which isn't upstream (mlx4_1190_sense_port_trigger.patch) and indeed this entry is world writable.

So the question here, if there's any reason for multi-protocol related patches such as this
guy and its such not to be pushed upstream? I failed to get any constructive response (== pathces to Roland or Dave Miller) from Yevgeny and I was hoping you could be helpful here.

Or.

> Sumeet Lahorani wrote:
>> # find /sys -type f -perm -222
>> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/port_trigger
>> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/mlx4_port2
>> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/mlx4_port1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: root owned writable files under /sys
       [not found]                     ` <4C43309E.4020001-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
@ 2010-11-18  9:55                       ` Or Gerlitz
       [not found]                         ` <4CE4F811.2010006-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Or Gerlitz @ 2010-11-18  9:55 UTC (permalink / raw)
  To: Jack Morgenstein
  Cc: Sumeet Lahorani, Tziporet Koren, Roland Dreier,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Yevgeny Petrilin

Jack, 

I didn't see any further response on the matter, I got customers to complain on why the port_trigger sysfs entry is world writable and I wonder why isn't this pushed upstream, once you guys do that we can fix the permissions. Also they noted that the diag_counters entry has the same problem and its also not upstream (ofed patch mlx4_0320_diag_counters_sysfs.patch), can some progress be made here? 

Or.

Or Gerlitz wrote:
> Jack Morgenstein wrote:
>> The sysfs entries you refer to are introduced in commit 7ff93f8b7ecbc36e7ffc5c11a61643821c1bfee5
>> which patches in ofed but not upstream are you referring to?
> 
> Hi Jack,
> 
> I took another look, indeed the mlx4_port{1,2} sysfs entries are introduced in the commit
> you pointed on and their permissions looks okay (S_IRUGO | S_IWUSR), they are not world writable. 
> 
> As for the port_trigger sysfs entry, it is introduced by a patch shipped with ofed which isn't upstream (mlx4_1190_sense_port_trigger.patch) and indeed this entry is world writable.
> 
> So the question here, if there's any reason for multi-protocol related patches such as this
> guy and its such not to be pushed upstream? I failed to get any constructive response (== pathces to Roland or Dave Miller) from Yevgeny and I was hoping you could be helpful here.
> 
> Or.
> 
>> Sumeet Lahorani wrote:
>>> # find /sys -type f -perm -222
>>> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/port_trigger
>>> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/mlx4_port2
>>> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/mlx4_port1
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: root owned writable files under /sys
       [not found]                         ` <4CE4F811.2010006-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
@ 2010-11-18 12:59                           ` Jack Morgenstein
       [not found]                             ` <E113D394D7C5DB4F8FF691FA7EE9DB443D1BDCA193-WQlSmcKwN8Te+A/uUDamNg@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Jack Morgenstein @ 2010-11-18 12:59 UTC (permalink / raw)
  To: Or Gerlitz
  Cc: Sumeet Lahorani, Tziporet Koren, Roland Dreier,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Yevgeny Petrilin

Port trigger belongs to Yevgeny P.
Please interact with him regarding this.

-Jack

-----Original Message-----
From: Or Gerlitz [mailto:ogerlitz-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org]
Sent: Thursday, November 18, 2010 11:55 AM
To: Jack Morgenstein
Cc: Sumeet Lahorani; Tziporet Koren; Roland Dreier; linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Yevgeny Petrilin
Subject: Re: root owned writable files under /sys

Jack,

I didn't see any further response on the matter, I got customers to complain on why the port_trigger sysfs entry is world writable and I wonder why isn't this pushed upstream, once you guys do that we can fix the permissions. Also they noted that the diag_counters entry has the same problem and its also not upstream (ofed patch mlx4_0320_diag_counters_sysfs.patch), can some progress be made here?

Or.

Or Gerlitz wrote:
> Jack Morgenstein wrote:
>> The sysfs entries you refer to are introduced in commit 7ff93f8b7ecbc36e7ffc5c11a61643821c1bfee5
>> which patches in ofed but not upstream are you referring to?
>
> Hi Jack,
>
> I took another look, indeed the mlx4_port{1,2} sysfs entries are introduced in the commit
> you pointed on and their permissions looks okay (S_IRUGO | S_IWUSR), they are not world writable.
>
> As for the port_trigger sysfs entry, it is introduced by a patch shipped with ofed which isn't upstream (mlx4_1190_sense_port_trigger.patch) and indeed this entry is world writable.
>
> So the question here, if there's any reason for multi-protocol related patches such as this
> guy and its such not to be pushed upstream? I failed to get any constructive response (== pathces to Roland or Dave Miller) from Yevgeny and I was hoping you could be helpful here.
>
> Or.
>
>> Sumeet Lahorani wrote:
>>> # find /sys -type f -perm -222
>>> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/port_trigger
>>> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/mlx4_port2
>>> /sys/devices/pci0000:00/0000:00:04.0/0000:13:00.0/mlx4_port1
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: root owned writable files under /sys
       [not found]                             ` <E113D394D7C5DB4F8FF691FA7EE9DB443D1BDCA193-WQlSmcKwN8Te+A/uUDamNg@public.gmane.org>
@ 2010-11-18 13:03                               ` Or Gerlitz
       [not found]                                 ` <4CE5241A.20400-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Or Gerlitz @ 2010-11-18 13:03 UTC (permalink / raw)
  To: Jack Morgenstein, Yevgeny Petrilin
  Cc: Sumeet Lahorani, Tziporet Koren, linux-rdma-u79uwXL29TY76Z2rM5mHXA

Jack Morgenstein wrote:
> Port trigger belongs to Yevgeny P. Please interact with him regarding this.

I know, the thing is that I failed to get any response from him on the matter 
of pushing it upstream for long time, and this is IB related patch, so I tried to pull you on that... Yevgeny, could you push that patch any time soon?

Or.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: root owned writable files under /sys
       [not found]                                 ` <4CE5241A.20400-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
@ 2010-11-18 13:23                                   ` Tziporet Koren
  0 siblings, 0 replies; 19+ messages in thread
From: Tziporet Koren @ 2010-11-18 13:23 UTC (permalink / raw)
  To: Or Gerlitz, Jack Morgenstein, Yevgeny Petrilin
  Cc: Sumeet Lahorani, linux-rdma-u79uwXL29TY76Z2rM5mHXA

Yevgeny is going to RD next week
Will see if someone can work on this here before he returns

Tziporet

-----Original Message-----
From: Or Gerlitz [mailto:ogerlitz-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org] 
Sent: Thursday, November 18, 2010 3:03 PM
To: Jack Morgenstein; Yevgeny Petrilin
Cc: Sumeet Lahorani; Tziporet Koren; linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: root owned writable files under /sys

Jack Morgenstein wrote:
> Port trigger belongs to Yevgeny P. Please interact with him regarding this.

I know, the thing is that I failed to get any response from him on the matter 
of pushing it upstream for long time, and this is IB related patch, so I tried to pull you on that... Yevgeny, could you push that patch any time soon?

Or.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2010-11-18 13:23 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-03 21:58 root owned writeable files under /sys Sumeet Lahorani
     [not found] ` <4C082598.8000809-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2010-06-06  4:59   ` Or Gerlitz
     [not found]     ` <4C0B2B24.6020304-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2010-06-06 16:08       ` Sumeet Lahorani
     [not found]         ` <4C0BC819.1060201-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2010-06-07  4:56           ` Or Gerlitz
2010-06-08  9:10           ` Eli Cohen
     [not found]             ` <AANLkTikpFbgHyXoeQQt5wU4WkpbXQnqXUYRoy718qSuW-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-09  7:20               ` Sumeet Lahorani
2010-07-07  5:42           ` root owned writable " Or Gerlitz
     [not found]             ` <4C3413BD.5030008-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2010-07-07 11:25               ` Tziporet Koren
     [not found]                 ` <E113D394D7C5DB4F8FF691FA7EE9DB443A943033CD-WQlSmcKwN8Te+A/uUDamNg@public.gmane.org>
2010-07-07 11:46                   ` Or Gerlitz
2010-07-18 14:03               ` Jack Morgenstein
     [not found]                 ` <E113D394D7C5DB4F8FF691FA7EE9DB443B38B99C02-WQlSmcKwN8Te+A/uUDamNg@public.gmane.org>
2010-07-18 16:49                   ` Or Gerlitz
     [not found]                     ` <4C43309E.4020001-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2010-11-18  9:55                       ` Or Gerlitz
     [not found]                         ` <4CE4F811.2010006-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2010-11-18 12:59                           ` Jack Morgenstein
     [not found]                             ` <E113D394D7C5DB4F8FF691FA7EE9DB443D1BDCA193-WQlSmcKwN8Te+A/uUDamNg@public.gmane.org>
2010-11-18 13:03                               ` Or Gerlitz
     [not found]                                 ` <4CE5241A.20400-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2010-11-18 13:23                                   ` Tziporet Koren
2010-06-24  6:15       ` sysfs IPoIB root owned writable files Or Gerlitz
2010-07-06 21:24       ` root owned writeable files under /sys Roland Dreier
     [not found]         ` <adaaaq4mhhd.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-07-07 14:48           ` Or Gerlitz
     [not found]             ` <AANLkTimCsfv06uHec5bA-PNJVL2ghdZCycyn1w8HybNe-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-07 15:19               ` Roland Dreier

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.