All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL REQUEST] fixes for GCC 8.x, automatic RTnet interface dismantling
@ 2018-10-25  9:43 Philippe Gerum
  2018-10-25 15:31 ` [PULL REQUEST] fixes for GCC 8.x, automatic RTnet interface dismantling - v2 Philippe Gerum
  2018-10-31 17:24 ` [PULL REQUEST] fixes for GCC 8.x, automatic RTnet interface dismantling Jan Kiszka
  0 siblings, 2 replies; 6+ messages in thread
From: Philippe Gerum @ 2018-10-25  9:43 UTC (permalink / raw)
  To: Xenomai; +Cc: Kiszka, Jan


This patch set addresses a couple of issues with GCC 8.x, and a current RTnet
limitation too.

Regarding the latter, I'd like a thorough review of 809847c58, to make sure it's
not breaking some assumption wrt interface management in RTnet. The motivation
for the change is to expose the necessary API bits in order to match the common
behavior for regular netdevices, dismantling any open interface prior to unloading
a driver module. The converse rtdev_up() call is there for consistency but has
no user yet.

Rationale: currently, modunloading drivers may leave stale information about
active interfaces, which leads to bad situations. b28741eb6 illustrates the
usage of the new call for the IGB driver. I don't think we could fold the
rtdev_down() call into rt_unregister_rtnetdev() yet, unless the latter could
be called earlier from the uninstall code of most drivers.

---

The following changes since commit 04df93890befa4e5a642ecdef38eebed4660b217:

  rtdm: expose user-side file descriptors to drivers (2018-10-17 13:20:06 +0200)

are available in the Git repository at:

  git://lab.xenomai.org/xenomai-rpm.git for-upstream/next

for you to fetch changes up to 2b819466ecb5d260c81edc32f0f032954df1759b:

  net/igb: igb_ioctl() requires execution in secondary mode (2018-10-25 10:57:22 +0200)

----------------------------------------------------------------
Philippe Gerum (9):
      utils/can: prevent unterminated destination buffer with strncpy()
      demos/posix: prevent unterminated destination buffer with strncpy()
      boilerplate/ancillaries: prevent false positive with -Wstringop-truncation
      cobalt/ancillaries: prevent false positive with -Wstringop-truncation
      boilerplate/compiler: drop __const and __pure shorthands
      net/stack: export services to switch interface up/down
      net/stack: ignore extraneous interface UP/DOWN calls
      net/igb: down interface upon PCI unregister
      net/igb: igb_ioctl() requires execution in secondary mode

 demo/posix/cobalt/can-rtt.c               |   4 ++--
 demo/posix/cobalt/eth_p_all.c             |   3 ++-
 demo/posix/cyclictest/cyclictest.c        |   4 ++--
 include/boilerplate/ancillaries.h         |   2 +-
 include/boilerplate/compiler.h            |   8 --------
 include/cobalt/kernel/ancillaries.h       |   2 +-
 kernel/drivers/net/drivers/igb/igb_main.c |   4 ++++
 kernel/drivers/net/stack/include/rtdev.h  |   4 ++++
 kernel/drivers/net/stack/rtdev.c          | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 kernel/drivers/net/stack/rtnet_chrdev.c   |  85 ++-----------------------------------------------------------------------------------
 utils/can/rtcanconfig.c                   |   7 ++++---
 utils/can/rtcanrecv.c                     |   3 ++-
 utils/can/rtcansend.c                     |   3 ++-
 13 files changed, 128 insertions(+), 103 deletions(-)

-- 
Philippe.


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

* [PULL REQUEST] fixes for GCC 8.x, automatic RTnet interface dismantling - v2
  2018-10-25  9:43 [PULL REQUEST] fixes for GCC 8.x, automatic RTnet interface dismantling Philippe Gerum
@ 2018-10-25 15:31 ` Philippe Gerum
  2018-10-26 13:28   ` Jan Kiszka
  2018-10-31 17:24 ` [PULL REQUEST] fixes for GCC 8.x, automatic RTnet interface dismantling Jan Kiszka
  1 sibling, 1 reply; 6+ messages in thread
From: Philippe Gerum @ 2018-10-25 15:31 UTC (permalink / raw)
  To: Xenomai; +Cc: Kiszka, Jan


Fixed a locking imbalance in the commit dealing with extraneous UP/DOWN interface requests.

----

The following changes since commit 04df93890befa4e5a642ecdef38eebed4660b217:

  rtdm: expose user-side file descriptors to drivers (2018-10-17 13:20:06 +0200)

are available in the Git repository at:

  git://lab.xenomai.org/xenomai-rpm.git for-upstream/next

for you to fetch changes up to 8af7351efdfb75fff0066a75f4e57d3734f1b220:

  net/igb: igb_ioctl() requires execution in secondary mode (2018-10-25 17:28:31 +0200)

----------------------------------------------------------------
Philippe Gerum (9):
      utils/can: prevent unterminated destination buffer with strncpy()
      demos/posix: prevent unterminated destination buffer with strncpy()
      boilerplate/ancillaries: prevent false positive with -Wstringop-truncation
      cobalt/ancillaries: prevent false positive with -Wstringop-truncation
      boilerplate/compiler: drop __const and __pure shorthands
      net/stack: export services to switch interface up/down
      net/stack: ignore extraneous interface UP/DOWN calls
      net/igb: down interface upon PCI unregister
      net/igb: igb_ioctl() requires execution in secondary mode

 demo/posix/cobalt/can-rtt.c               |   4 ++--
 demo/posix/cobalt/eth_p_all.c             |   3 ++-
 demo/posix/cyclictest/cyclictest.c        |   4 ++--
 include/boilerplate/ancillaries.h         |   2 +-
 include/boilerplate/compiler.h            |   8 --------
 include/cobalt/kernel/ancillaries.h       |   2 +-
 kernel/drivers/net/drivers/igb/igb_main.c |   4 ++++
 kernel/drivers/net/stack/include/rtdev.h  |   4 ++++
 kernel/drivers/net/stack/rtdev.c          | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 kernel/drivers/net/stack/rtnet_chrdev.c   |  85 ++-----------------------------------------------------------------------------------
 utils/can/rtcanconfig.c                   |   7 ++++---
 utils/can/rtcanrecv.c                     |   3 ++-
 utils/can/rtcansend.c                     |   3 ++-
 13 files changed, 129 insertions(+), 103 deletions(-)

-- 
Philippe.


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

* Re: [PULL REQUEST] fixes for GCC 8.x, automatic RTnet interface dismantling - v2
  2018-10-25 15:31 ` [PULL REQUEST] fixes for GCC 8.x, automatic RTnet interface dismantling - v2 Philippe Gerum
@ 2018-10-26 13:28   ` Jan Kiszka
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Kiszka @ 2018-10-26 13:28 UTC (permalink / raw)
  To: Philippe Gerum, Xenomai

On 25.10.18 16:31, Philippe Gerum wrote:
> 
> Fixed a locking imbalance in the commit dealing with extraneous UP/DOWN interface requests.
> 
> ----
> 
> The following changes since commit 04df93890befa4e5a642ecdef38eebed4660b217:
> 
>    rtdm: expose user-side file descriptors to drivers (2018-10-17 13:20:06 +0200)
> 
> are available in the Git repository at:
> 
>    git://lab.xenomai.org/xenomai-rpm.git for-upstream/next
> 
> for you to fetch changes up to 8af7351efdfb75fff0066a75f4e57d3734f1b220:
> 
>    net/igb: igb_ioctl() requires execution in secondary mode (2018-10-25 17:28:31 +0200)
> 
> ----------------------------------------------------------------
> Philippe Gerum (9):
>        utils/can: prevent unterminated destination buffer with strncpy()
>        demos/posix: prevent unterminated destination buffer with strncpy()
>        boilerplate/ancillaries: prevent false positive with -Wstringop-truncation
>        cobalt/ancillaries: prevent false positive with -Wstringop-truncation
>        boilerplate/compiler: drop __const and __pure shorthands
>        net/stack: export services to switch interface up/down
>        net/stack: ignore extraneous interface UP/DOWN calls
>        net/igb: down interface upon PCI unregister
>        net/igb: igb_ioctl() requires execution in secondary mode
> 
>   demo/posix/cobalt/can-rtt.c               |   4 ++--
>   demo/posix/cobalt/eth_p_all.c             |   3 ++-
>   demo/posix/cyclictest/cyclictest.c        |   4 ++--
>   include/boilerplate/ancillaries.h         |   2 +-
>   include/boilerplate/compiler.h            |   8 --------
>   include/cobalt/kernel/ancillaries.h       |   2 +-
>   kernel/drivers/net/drivers/igb/igb_main.c |   4 ++++
>   kernel/drivers/net/stack/include/rtdev.h  |   4 ++++
>   kernel/drivers/net/stack/rtdev.c          | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>   kernel/drivers/net/stack/rtnet_chrdev.c   |  85 ++-----------------------------------------------------------------------------------
>   utils/can/rtcanconfig.c                   |   7 ++++---
>   utils/can/rtcanrecv.c                     |   3 ++-
>   utils/can/rtcansend.c                     |   3 ++-
>   13 files changed, 129 insertions(+), 103 deletions(-)
> 

Could you post the patches to the list as well (or did I missed that?)? Would 
allow in-line review for everyone without having to go to git first.

Thanks,
Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


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

* Re: [PULL REQUEST] fixes for GCC 8.x, automatic RTnet interface dismantling
  2018-10-25  9:43 [PULL REQUEST] fixes for GCC 8.x, automatic RTnet interface dismantling Philippe Gerum
  2018-10-25 15:31 ` [PULL REQUEST] fixes for GCC 8.x, automatic RTnet interface dismantling - v2 Philippe Gerum
@ 2018-10-31 17:24 ` Jan Kiszka
  2018-10-31 17:26   ` Jan Kiszka
  1 sibling, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2018-10-31 17:24 UTC (permalink / raw)
  To: Philippe Gerum, Xenomai

On 25.10.18 11:43, Philippe Gerum wrote:
> 
> This patch set addresses a couple of issues with GCC 8.x, and a current RTnet
> limitation too.
> 
> Regarding the latter, I'd like a thorough review of 809847c58, to make sure it's
> not breaking some assumption wrt interface management in RTnet. The motivation
> for the change is to expose the necessary API bits in order to match the common
> behavior for regular netdevices, dismantling any open interface prior to unloading
> a driver module. The converse rtdev_up() call is there for consistency but has
> no user yet.
> 
> Rationale: currently, modunloading drivers may leave stale information about
> active interfaces, which leads to bad situations. b28741eb6 illustrates the
> usage of the new call for the IGB driver. I don't think we could fold the
> rtdev_down() call into rt_unregister_rtnetdev() yet, unless the latter could
> be called earlier from the uninstall code of most drivers.
> 
> ---
> 
> The following changes since commit 04df93890befa4e5a642ecdef38eebed4660b217:
> 
>    rtdm: expose user-side file descriptors to drivers (2018-10-17 13:20:06 +0200)
> 
> are available in the Git repository at:
> 
>    git://lab.xenomai.org/xenomai-rpm.git for-upstream/next
> 
> for you to fetch changes up to 2b819466ecb5d260c81edc32f0f032954df1759b:
> 
>    net/igb: igb_ioctl() requires execution in secondary mode (2018-10-25 10:57:22 +0200)
> 
> ----------------------------------------------------------------
> Philippe Gerum (9):
>        utils/can: prevent unterminated destination buffer with strncpy()
>        demos/posix: prevent unterminated destination buffer with strncpy()
>        boilerplate/ancillaries: prevent false positive with -Wstringop-truncation
>        cobalt/ancillaries: prevent false positive with -Wstringop-truncation
>        boilerplate/compiler: drop __const and __pure shorthands
>        net/stack: export services to switch interface up/down
>        net/stack: ignore extraneous interface UP/DOWN calls
>        net/igb: down interface upon PCI unregister
>        net/igb: igb_ioctl() requires execution in secondary mode
> 
>   demo/posix/cobalt/can-rtt.c               |   4 ++--
>   demo/posix/cobalt/eth_p_all.c             |   3 ++-
>   demo/posix/cyclictest/cyclictest.c        |   4 ++--
>   include/boilerplate/ancillaries.h         |   2 +-
>   include/boilerplate/compiler.h            |   8 --------
>   include/cobalt/kernel/ancillaries.h       |   2 +-
>   kernel/drivers/net/drivers/igb/igb_main.c |   4 ++++
>   kernel/drivers/net/stack/include/rtdev.h  |   4 ++++
>   kernel/drivers/net/stack/rtdev.c          | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>   kernel/drivers/net/stack/rtnet_chrdev.c   |  85 ++-----------------------------------------------------------------------------------
>   utils/can/rtcanconfig.c                   |   7 ++++---
>   utils/can/rtcanrecv.c                     |   3 ++-
>   utils/can/rtcansend.c                     |   3 ++-
>   13 files changed, 128 insertions(+), 103 deletions(-)
> 

Thanks, merged to next.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


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

* Re: [PULL REQUEST] fixes for GCC 8.x, automatic RTnet interface dismantling
  2018-10-31 17:24 ` [PULL REQUEST] fixes for GCC 8.x, automatic RTnet interface dismantling Jan Kiszka
@ 2018-10-31 17:26   ` Jan Kiszka
  2018-10-31 17:32     ` Philippe Gerum
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2018-10-31 17:26 UTC (permalink / raw)
  To: Philippe Gerum, Xenomai

On 31.10.18 18:24, Jan Kiszka wrote:
> On 25.10.18 11:43, Philippe Gerum wrote:
>>
>> This patch set addresses a couple of issues with GCC 8.x, and a current RTnet
>> limitation too.
>>
>> Regarding the latter, I'd like a thorough review of 809847c58, to make sure it's
>> not breaking some assumption wrt interface management in RTnet. The motivation
>> for the change is to expose the necessary API bits in order to match the common
>> behavior for regular netdevices, dismantling any open interface prior to 
>> unloading
>> a driver module. The converse rtdev_up() call is there for consistency but has
>> no user yet.
>>
>> Rationale: currently, modunloading drivers may leave stale information about
>> active interfaces, which leads to bad situations. b28741eb6 illustrates the
>> usage of the new call for the IGB driver. I don't think we could fold the
>> rtdev_down() call into rt_unregister_rtnetdev() yet, unless the latter could
>> be called earlier from the uninstall code of most drivers.
>>
>> ---
>>
>> The following changes since commit 04df93890befa4e5a642ecdef38eebed4660b217:
>>
>>    rtdm: expose user-side file descriptors to drivers (2018-10-17 13:20:06 +0200)
>>
>> are available in the Git repository at:
>>
>>    git://lab.xenomai.org/xenomai-rpm.git for-upstream/next
>>
>> for you to fetch changes up to 2b819466ecb5d260c81edc32f0f032954df1759b:
>>
>>    net/igb: igb_ioctl() requires execution in secondary mode (2018-10-25 
>> 10:57:22 +0200)
>>
>> ----------------------------------------------------------------
>> Philippe Gerum (9):
>>        utils/can: prevent unterminated destination buffer with strncpy()
>>        demos/posix: prevent unterminated destination buffer with strncpy()
>>        boilerplate/ancillaries: prevent false positive with -Wstringop-truncation
>>        cobalt/ancillaries: prevent false positive with -Wstringop-truncation
>>        boilerplate/compiler: drop __const and __pure shorthands
>>        net/stack: export services to switch interface up/down
>>        net/stack: ignore extraneous interface UP/DOWN calls
>>        net/igb: down interface upon PCI unregister
>>        net/igb: igb_ioctl() requires execution in secondary mode
>>
>>   demo/posix/cobalt/can-rtt.c               |   4 ++--
>>   demo/posix/cobalt/eth_p_all.c             |   3 ++-
>>   demo/posix/cyclictest/cyclictest.c        |   4 ++--
>>   include/boilerplate/ancillaries.h         |   2 +-
>>   include/boilerplate/compiler.h            |   8 --------
>>   include/cobalt/kernel/ancillaries.h       |   2 +-
>>   kernel/drivers/net/drivers/igb/igb_main.c |   4 ++++
>>   kernel/drivers/net/stack/include/rtdev.h  |   4 ++++
>>   kernel/drivers/net/stack/rtdev.c          | 102 
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
>>
>>   kernel/drivers/net/stack/rtnet_chrdev.c   |  85 
>> ++----------------------------------------------------------------------------------- 
>>
>>   utils/can/rtcanconfig.c                   |   7 ++++---
>>   utils/can/rtcanrecv.c                     |   3 ++-
>>   utils/can/rtcansend.c                     |   3 ++-
>>   13 files changed, 128 insertions(+), 103 deletions(-)
>>
> 
> Thanks, merged to next.
> 

Err, actually the later version, v2+ or so, i.e. 
3258438ae3a4c85182b4540477948a5e12613d8b.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


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

* Re: [PULL REQUEST] fixes for GCC 8.x, automatic RTnet interface dismantling
  2018-10-31 17:26   ` Jan Kiszka
@ 2018-10-31 17:32     ` Philippe Gerum
  0 siblings, 0 replies; 6+ messages in thread
From: Philippe Gerum @ 2018-10-31 17:32 UTC (permalink / raw)
  To: Jan Kiszka, Xenomai

On 10/31/18 6:26 PM, Jan Kiszka wrote:
> On 31.10.18 18:24, Jan Kiszka wrote:
>> On 25.10.18 11:43, Philippe Gerum wrote:
>>>
>>> This patch set addresses a couple of issues with GCC 8.x, and a
>>> current RTnet
>>> limitation too.
>>>
>>> Regarding the latter, I'd like a thorough review of 809847c58, to
>>> make sure it's
>>> not breaking some assumption wrt interface management in RTnet. The
>>> motivation
>>> for the change is to expose the necessary API bits in order to match
>>> the common
>>> behavior for regular netdevices, dismantling any open interface prior
>>> to unloading
>>> a driver module. The converse rtdev_up() call is there for
>>> consistency but has
>>> no user yet.
>>>
>>> Rationale: currently, modunloading drivers may leave stale
>>> information about
>>> active interfaces, which leads to bad situations. b28741eb6
>>> illustrates the
>>> usage of the new call for the IGB driver. I don't think we could fold
>>> the
>>> rtdev_down() call into rt_unregister_rtnetdev() yet, unless the
>>> latter could
>>> be called earlier from the uninstall code of most drivers.
>>>
>>> ---
>>>
>>> The following changes since commit
>>> 04df93890befa4e5a642ecdef38eebed4660b217:
>>>
>>>    rtdm: expose user-side file descriptors to drivers (2018-10-17
>>> 13:20:06 +0200)
>>>
>>> are available in the Git repository at:
>>>
>>>    git://lab.xenomai.org/xenomai-rpm.git for-upstream/next
>>>
>>> for you to fetch changes up to 2b819466ecb5d260c81edc32f0f032954df1759b:
>>>
>>>    net/igb: igb_ioctl() requires execution in secondary mode
>>> (2018-10-25 10:57:22 +0200)
>>>
>>> ----------------------------------------------------------------
>>> Philippe Gerum (9):
>>>        utils/can: prevent unterminated destination buffer with strncpy()
>>>        demos/posix: prevent unterminated destination buffer with
>>> strncpy()
>>>        boilerplate/ancillaries: prevent false positive with
>>> -Wstringop-truncation
>>>        cobalt/ancillaries: prevent false positive with
>>> -Wstringop-truncation
>>>        boilerplate/compiler: drop __const and __pure shorthands
>>>        net/stack: export services to switch interface up/down
>>>        net/stack: ignore extraneous interface UP/DOWN calls
>>>        net/igb: down interface upon PCI unregister
>>>        net/igb: igb_ioctl() requires execution in secondary mode
>>>
>>>   demo/posix/cobalt/can-rtt.c               |   4 ++--
>>>   demo/posix/cobalt/eth_p_all.c             |   3 ++-
>>>   demo/posix/cyclictest/cyclictest.c        |   4 ++--
>>>   include/boilerplate/ancillaries.h         |   2 +-
>>>   include/boilerplate/compiler.h            |   8 --------
>>>   include/cobalt/kernel/ancillaries.h       |   2 +-
>>>   kernel/drivers/net/drivers/igb/igb_main.c |   4 ++++
>>>   kernel/drivers/net/stack/include/rtdev.h  |   4 ++++
>>>   kernel/drivers/net/stack/rtdev.c          | 102
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>
>>>   kernel/drivers/net/stack/rtnet_chrdev.c   |  85
>>> ++-----------------------------------------------------------------------------------
>>>
>>>   utils/can/rtcanconfig.c                   |   7 ++++---
>>>   utils/can/rtcanrecv.c                     |   3 ++-
>>>   utils/can/rtcansend.c                     |   3 ++-
>>>   13 files changed, 128 insertions(+), 103 deletions(-)
>>>
>>
>> Thanks, merged to next.
>>
> 
> Err, actually the later version, v2+ or so, i.e.
> 3258438ae3a4c85182b4540477948a5e12613d8b.
> 

Correct, that is the one.

-- 
Philippe.


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

end of thread, other threads:[~2018-10-31 17:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-25  9:43 [PULL REQUEST] fixes for GCC 8.x, automatic RTnet interface dismantling Philippe Gerum
2018-10-25 15:31 ` [PULL REQUEST] fixes for GCC 8.x, automatic RTnet interface dismantling - v2 Philippe Gerum
2018-10-26 13:28   ` Jan Kiszka
2018-10-31 17:24 ` [PULL REQUEST] fixes for GCC 8.x, automatic RTnet interface dismantling Jan Kiszka
2018-10-31 17:26   ` Jan Kiszka
2018-10-31 17:32     ` Philippe Gerum

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.