Re: [PATCH] x86/process: ipipe: prevent false positive in testing for preemptible section

2018-10-26 Thread Jan Kiszka
On 25.10.18 14:20, Philippe Gerum wrote: We may call switch_to_bitmap() from the head stage when a co-kernel switches to a new thread context, in which case IRQs are hard disabled, although the root stage might be unstalled. Make sure the preemption debug code in refresh_tss_limit() is aware of

Re: [PULL REQUEST] fixes for GCC 8.x, automatic RTnet interface dismantling - v2

2018-10-26 Thread Jan Kiszka
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

Re: [ipipe 4.14][PATCH] x86: ipipe: Fix trap hooking for userspace routes

2018-10-26 Thread Jan Kiszka
On 26.10.18 13:50, Henning Schild wrote: Hey, looks like this one is for the #PF from the sigdebug smokey test. With this patch applied i do not see the crash anymore, but the test gets stuck. Did it work for you, or did i get the context wrong? Yes, this solved the issue for me, and I was

[PATCH 7/9] net/stack: ignore extraneous interface UP/DOWN calls

2018-10-26 Thread Philippe Gerum
Changing the device flags now implies downing the interface prior to switching it up anew with a different set of flags. Return success upon useless calls (e.g. UP when iface is up, DOWN when iface is down). --- kernel/drivers/net/stack/rtdev.c | 39 ++-- 1 file

[PATCH 6/9] net/stack: export services to switch interface up/down

2018-10-26 Thread Philippe Gerum
We may want to force a rtnet interface up, and more likely down before unloading a driver module. Export the ioctl() code which handles the IOC_RT_IFUP/IFDOWN core ioctl requests as standalone routines. The locking model remains unchanged, with ioctl() requests and direct service calls

[PATCH 8/9] net/igb: down interface upon PCI unregister

2018-10-26 Thread Philippe Gerum
Allow to safely unload the IGB driver module still hosting an active rtnet interface, by forcing this interface down on behalf on the PCI device removal handler. --- kernel/drivers/net/drivers/igb/igb_main.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 9/9] net/igb: igb_ioctl() requires execution in secondary mode

2018-10-26 Thread Philippe Gerum
We may have to call the regular MII layer from this routine. --- kernel/drivers/net/drivers/igb/igb_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/drivers/net/drivers/igb/igb_main.c b/kernel/drivers/net/drivers/igb/igb_main.c index 0a6cd4bd6..c1d1000ea 100644 ---

[PATCH 5/9] boilerplate/compiler: drop __const and __pure shorthands

2018-10-26 Thread Philippe Gerum
We have no in-tree users for these anymore. Besides, __const may be conflicting with different definitions from legacy libc headers. --- include/boilerplate/compiler.h | 8 1 file changed, 8 deletions(-) diff --git a/include/boilerplate/compiler.h b/include/boilerplate/compiler.h index

[PATCH 3/9] boilerplate/ancillaries: prevent false positive with -Wstringop-truncation

2018-10-26 Thread Philippe Gerum
namecpy() is meant to copying NUL terminated strings even if this incurs potential truncation of the source argument if need be, prevent GCC 8.x from detecting a false positive when -Wstringop-truncation is in effect. --- include/boilerplate/ancillaries.h | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 1/9] utils/can: prevent unterminated destination buffer with strncpy()

2018-10-26 Thread Philippe Gerum
GCC 8.x introduced -Wstringop-truncation to help detecting likely unwanted outcomes of strncpy(dst, src, n), such as omitting the NUL character into the destination buffer whenever n < sizeof(src). Fix unsafe strncpy() calls when we do expect a null-terminated destination buffer. ---

[PATCH 4/9] cobalt/ancillaries: prevent false positive with -Wstringop-truncation

2018-10-26 Thread Philippe Gerum
knamecpy() is meant to copying NUL terminated strings even if this incurs potential truncation of the source argument if need be, prevent GCC 8.x from detecting a false positive when -Wstringop-truncation is in effect. --- include/cobalt/kernel/ancillaries.h | 2 +- 1 file changed, 1

[PATCH 2/9] demos/posix: prevent unterminated destination buffer with strncpy()

2018-10-26 Thread Philippe Gerum
GCC 8.x introduced -Wstringop-truncation to help detecting likely unwanted outcomes of strncpy(dst, src, n), such as omitting the NUL character into the destination buffer whenever n < sizeof(src). Fix unsafe strncpy() calls when we do expect a null-terminated destination buffer. ---

Re: [ipipe 4.14][PATCH] x86: ipipe: Fix trap hooking for userspace routes

2018-10-26 Thread Henning Schild
Hey, looks like this one is for the #PF from the sigdebug smokey test. With this patch applied i do not see the crash anymore, but the test gets stuck. Did it work for you, or did i get the context wrong? Henning Am Wed, 10 Oct 2018 13:05:28 +0200 schrieb Jan Kiszka : > Also hook into the trap

Re: improve and provide a header for bootstrapping

2018-10-26 Thread Jan Kiszka
On 23.10.18 16:16, Norbert Lange wrote: Hello, the following patches allow a variety of options additional to the linker magic involved for hijacking the aplications main function. the original method will still continue to work, differences are * the code dealing with retrieving the

Re: [PATCH] x86/process: ipipe: prevent false positive in testing for preemptible section

2018-10-26 Thread Philippe Gerum
On 10/26/18 3:28 PM, Jan Kiszka wrote: > On 25.10.18 14:20, Philippe Gerum wrote: >> We may call switch_to_bitmap() from the head stage when a co-kernel >> switches to a new thread context, in which case IRQs are hard >> disabled, although the root stage might be unstalled. >> >> Make sure the

Re: improve and provide a header for bootstrapping

2018-10-26 Thread Norbert Lange
Am Fr., 26. Okt. 2018 um 15:48 Uhr schrieb Jan Kiszka : > > On 23.10.18 16:16, Norbert Lange wrote: > > Hello, > > > > the following patches allow a variety of options additional > > to the linker magic involved for hijacking the aplications main > > function. > > > > the original method will