All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Xenomai] [Xenomai-git] Jan Kiszka : cobalt/posix/syscall: Exclude sc_cobalt_get_current from debug warnings
       [not found] <E1YOpt4-0000oo-4D@sd-51317.xenomai.org>
@ 2015-02-20 16:49 ` Philippe Gerum
  2015-02-20 17:09   ` Jan Kiszka
  0 siblings, 1 reply; 6+ messages in thread
From: Philippe Gerum @ 2015-02-20 16:49 UTC (permalink / raw)
  To: xenomai, xenomai-git

On 02/20/2015 04:53 PM, git repository hosting wrote:
> Module: xenomai-jki
> Branch: for-forge
> Commit: fc2d70475f4f86da30e68a569e7641982f4dd8e1
> URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=fc2d70475f4f86da30e68a569e7641982f4dd8e1
> 
> Author: Jan Kiszka <jan.kiszka@siemens.com>
> Date:   Fri Feb 20 16:50:15 2015 +0100
> 
> cobalt/posix/syscall: Exclude sc_cobalt_get_current from debug warnings
> 
> This syscall is used for probing the context, thus may be triggered by
> non-RT threads as well which we should not report as potential error.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> 

This would mean that sc_cobalt_get_current is considered valid from any
process, including those which did not issue sc_cobalt_bind in the first
place.

Do we depend on this today, or are we granting an extended access with
this patch?

-- 
Philippe.


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

* Re: [Xenomai] [Xenomai-git] Jan Kiszka : cobalt/posix/syscall: Exclude sc_cobalt_get_current from debug warnings
  2015-02-20 16:49 ` [Xenomai] [Xenomai-git] Jan Kiszka : cobalt/posix/syscall: Exclude sc_cobalt_get_current from debug warnings Philippe Gerum
@ 2015-02-20 17:09   ` Jan Kiszka
  2015-02-20 19:56     ` Philippe Gerum
  2015-03-10 14:46     ` Jan Kiszka
  0 siblings, 2 replies; 6+ messages in thread
From: Jan Kiszka @ 2015-02-20 17:09 UTC (permalink / raw)
  To: Philippe Gerum, xenomai, xenomai-git

On 2015-02-20 17:49, Philippe Gerum wrote:
> On 02/20/2015 04:53 PM, git repository hosting wrote:
>> Module: xenomai-jki
>> Branch: for-forge
>> Commit: fc2d70475f4f86da30e68a569e7641982f4dd8e1
>> URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=fc2d70475f4f86da30e68a569e7641982f4dd8e1
>>
>> Author: Jan Kiszka <jan.kiszka@siemens.com>
>> Date:   Fri Feb 20 16:50:15 2015 +0100
>>
>> cobalt/posix/syscall: Exclude sc_cobalt_get_current from debug warnings
>>
>> This syscall is used for probing the context, thus may be triggered by
>> non-RT threads as well which we should not report as potential error.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>
> 
> This would mean that sc_cobalt_get_current is considered valid from any
> process, including those which did not issue sc_cobalt_bind in the first
> place.
> 
> Do we depend on this today, or are we granting an extended access with
> this patch?

This is just to silence a warning you get, e.g., with the smokey fork test.

I don't think it should be illegal to call such a service, even prior to
binding to the interface. It is already robust against it, isn't it?

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux


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

* Re: [Xenomai] [Xenomai-git] Jan Kiszka : cobalt/posix/syscall: Exclude sc_cobalt_get_current from debug warnings
  2015-02-20 17:09   ` Jan Kiszka
@ 2015-02-20 19:56     ` Philippe Gerum
  2015-03-10 15:27       ` Jan Kiszka
  2015-03-10 14:46     ` Jan Kiszka
  1 sibling, 1 reply; 6+ messages in thread
From: Philippe Gerum @ 2015-02-20 19:56 UTC (permalink / raw)
  To: Jan Kiszka, xenomai, xenomai-git

On 02/20/2015 06:09 PM, Jan Kiszka wrote:
> On 2015-02-20 17:49, Philippe Gerum wrote:
>> On 02/20/2015 04:53 PM, git repository hosting wrote:
>>> Module: xenomai-jki
>>> Branch: for-forge
>>> Commit: fc2d70475f4f86da30e68a569e7641982f4dd8e1
>>> URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=fc2d70475f4f86da30e68a569e7641982f4dd8e1
>>>
>>> Author: Jan Kiszka <jan.kiszka@siemens.com>
>>> Date:   Fri Feb 20 16:50:15 2015 +0100
>>>
>>> cobalt/posix/syscall: Exclude sc_cobalt_get_current from debug warnings
>>>
>>> This syscall is used for probing the context, thus may be triggered by
>>> non-RT threads as well which we should not report as potential error.
>>>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>
>>
>> This would mean that sc_cobalt_get_current is considered valid from any
>> process, including those which did not issue sc_cobalt_bind in the first
>> place.
>>
>> Do we depend on this today, or are we granting an extended access with
>> this patch?
> 
> This is just to silence a warning you get, e.g., with the smokey fork test.
> 
> I don't think it should be illegal to call such a service, even prior to
> binding to the interface. It is already robust against it, isn't it?
> 

Illegal maybe not, but definitely unexpected. I mean that this is a
Cobalt service, so I would expect the userland code not to issue any
Cobalt syscall until the initial binding took place.

The fork sequence seems to depart from this assumption due to some code
running on behalf of the atfork handlers in libcobalt, right?

-- 
Philippe.


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

* Re: [Xenomai] [Xenomai-git] Jan Kiszka : cobalt/posix/syscall: Exclude sc_cobalt_get_current from debug warnings
  2015-02-20 17:09   ` Jan Kiszka
  2015-02-20 19:56     ` Philippe Gerum
@ 2015-03-10 14:46     ` Jan Kiszka
  1 sibling, 0 replies; 6+ messages in thread
From: Jan Kiszka @ 2015-03-10 14:46 UTC (permalink / raw)
  To: Philippe Gerum, xenomai

On 2015-02-20 18:09, Jan Kiszka wrote:
> On 2015-02-20 17:49, Philippe Gerum wrote:
>> On 02/20/2015 04:53 PM, git repository hosting wrote:
>>> Module: xenomai-jki
>>> Branch: for-forge
>>> Commit: fc2d70475f4f86da30e68a569e7641982f4dd8e1
>>> URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=fc2d70475f4f86da30e68a569e7641982f4dd8e1
>>>
>>> Author: Jan Kiszka <jan.kiszka@siemens.com>
>>> Date:   Fri Feb 20 16:50:15 2015 +0100
>>>
>>> cobalt/posix/syscall: Exclude sc_cobalt_get_current from debug warnings
>>>
>>> This syscall is used for probing the context, thus may be triggered by
>>> non-RT threads as well which we should not report as potential error.
>>>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>
>>
>> This would mean that sc_cobalt_get_current is considered valid from any
>> process, including those which did not issue sc_cobalt_bind in the first
>> place.
>>
>> Do we depend on this today, or are we granting an extended access with
>> this patch?
> 
> This is just to silence a warning you get, e.g., with the smokey fork test.
> 
> I don't think it should be illegal to call such a service, even prior to
> binding to the interface. It is already robust against it, isn't it?
> 

Just noticed this patch in my queue while rebasing over next. Did you
come to a conclusion?

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux


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

* Re: [Xenomai] [Xenomai-git] Jan Kiszka : cobalt/posix/syscall: Exclude sc_cobalt_get_current from debug warnings
  2015-02-20 19:56     ` Philippe Gerum
@ 2015-03-10 15:27       ` Jan Kiszka
  2015-03-15 16:17         ` Philippe Gerum
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2015-03-10 15:27 UTC (permalink / raw)
  To: Philippe Gerum, xenomai

Am 2015-02-20 um 20:56 schrieb Philippe Gerum:
> On 02/20/2015 06:09 PM, Jan Kiszka wrote:
>> On 2015-02-20 17:49, Philippe Gerum wrote:
>>> On 02/20/2015 04:53 PM, git repository hosting wrote:
>>>> Module: xenomai-jki
>>>> Branch: for-forge
>>>> Commit: fc2d70475f4f86da30e68a569e7641982f4dd8e1
>>>> URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=fc2d70475f4f86da30e68a569e7641982f4dd8e1
>>>>
>>>> Author: Jan Kiszka <jan.kiszka@siemens.com>
>>>> Date:   Fri Feb 20 16:50:15 2015 +0100
>>>>
>>>> cobalt/posix/syscall: Exclude sc_cobalt_get_current from debug warnings
>>>>
>>>> This syscall is used for probing the context, thus may be triggered by
>>>> non-RT threads as well which we should not report as potential error.
>>>>
>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>>
>>>
>>> This would mean that sc_cobalt_get_current is considered valid from any
>>> process, including those which did not issue sc_cobalt_bind in the first
>>> place.
>>>
>>> Do we depend on this today, or are we granting an extended access with
>>> this patch?
>>
>> This is just to silence a warning you get, e.g., with the smokey fork test.
>>
>> I don't think it should be illegal to call such a service, even prior to
>> binding to the interface. It is already robust against it, isn't it?
>>
> 
> Illegal maybe not, but definitely unexpected. I mean that this is a
> Cobalt service, so I would expect the userland code not to issue any
> Cobalt syscall until the initial binding took place.
> 
> The fork sequence seems to depart from this assumption due to some code
> running on behalf of the atfork handlers in libcobalt, right?

[ah, was me who forgot to follow up]

Right. The path that triggers the issue is along
cobalt_print_init_atfork -> cleanup_buffer -> assert_nrt.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux


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

* Re: [Xenomai] [Xenomai-git] Jan Kiszka : cobalt/posix/syscall: Exclude sc_cobalt_get_current from debug warnings
  2015-03-10 15:27       ` Jan Kiszka
@ 2015-03-15 16:17         ` Philippe Gerum
  0 siblings, 0 replies; 6+ messages in thread
From: Philippe Gerum @ 2015-03-15 16:17 UTC (permalink / raw)
  To: Jan Kiszka, xenomai

On 03/10/2015 04:27 PM, Jan Kiszka wrote:
> Am 2015-02-20 um 20:56 schrieb Philippe Gerum:
>> On 02/20/2015 06:09 PM, Jan Kiszka wrote:
>>> On 2015-02-20 17:49, Philippe Gerum wrote:
>>>> On 02/20/2015 04:53 PM, git repository hosting wrote:
>>>>> Module: xenomai-jki
>>>>> Branch: for-forge
>>>>> Commit: fc2d70475f4f86da30e68a569e7641982f4dd8e1
>>>>> URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=fc2d70475f4f86da30e68a569e7641982f4dd8e1
>>>>>
>>>>> Author: Jan Kiszka <jan.kiszka@siemens.com>
>>>>> Date:   Fri Feb 20 16:50:15 2015 +0100
>>>>>
>>>>> cobalt/posix/syscall: Exclude sc_cobalt_get_current from debug warnings
>>>>>
>>>>> This syscall is used for probing the context, thus may be triggered by
>>>>> non-RT threads as well which we should not report as potential error.
>>>>>
>>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>>>
>>>>
>>>> This would mean that sc_cobalt_get_current is considered valid from any
>>>> process, including those which did not issue sc_cobalt_bind in the first
>>>> place.
>>>>
>>>> Do we depend on this today, or are we granting an extended access with
>>>> this patch?
>>>
>>> This is just to silence a warning you get, e.g., with the smokey fork test.
>>>
>>> I don't think it should be illegal to call such a service, even prior to
>>> binding to the interface. It is already robust against it, isn't it?
>>>
>>
>> Illegal maybe not, but definitely unexpected. I mean that this is a
>> Cobalt service, so I would expect the userland code not to issue any
>> Cobalt syscall until the initial binding took place.
>>
>> The fork sequence seems to depart from this assumption due to some code
>> running on behalf of the atfork handlers in libcobalt, right?
> 
> [ah, was me who forgot to follow up]
> 
> Right. The path that triggers the issue is along
> cobalt_print_init_atfork -> cleanup_buffer -> assert_nrt.
> 

Ok. I'll merge this change, which enables sc_cobalt_get_current for any
context.

-- 
Philippe.


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

end of thread, other threads:[~2015-03-15 16:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1YOpt4-0000oo-4D@sd-51317.xenomai.org>
2015-02-20 16:49 ` [Xenomai] [Xenomai-git] Jan Kiszka : cobalt/posix/syscall: Exclude sc_cobalt_get_current from debug warnings Philippe Gerum
2015-02-20 17:09   ` Jan Kiszka
2015-02-20 19:56     ` Philippe Gerum
2015-03-10 15:27       ` Jan Kiszka
2015-03-15 16:17         ` Philippe Gerum
2015-03-10 14:46     ` Jan Kiszka

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.