Re: [systemd-devel] Moving systemd-bootchart to a standalone repository

2016-02-19 Thread Alexander Sverdlin
Hello Daniel, On 17/02/16 17:51, Daniel Mack wrote: > As part of our spring cleaning, we've been thinking about giving > systemd-bootchart a new home, in a new repository of its own. I've been > working on this and put the result here: > > https://github.com/systemd/systemd-bootchart > > This

Re: [systemd-devel] [PATCH v2] network: Implement fallback DHCPv6 prefix handling for older kernels

2015-04-10 Thread Alexander Sverdlin
Hello Patrik! On 10/04/15 13:03, Patrik Flykt wrote: > When setting IPv6 addresses acquired by DHCPv6, systemd-networkd sets > the IFA_F_NOPREFIXROUTE flag in the IFA_FLAGS netlink attribute. As > the flag and the attribute are present starting with Linux 3.14, older > kernels will need systemd-ne

Re: [systemd-devel] [PATCH] network: Implement fallback DHCPv6 prefix handling for older kernels

2015-04-09 Thread Alexander Sverdlin
Hi! On 09/04/15 12:45, Patrik Flykt wrote: >> Hmm, in general, we really should try to create the same binaries, >> > regardless if we are built on an old or new kernel. And the binaries >> > should work as good as possible, regardless which kernel version they >> > are running on. But with the ch

Re: [systemd-devel] [PATCH 1/2] Update IFA_MAX adding IFA_FLAGS

2015-04-08 Thread Alexander Sverdlin
Hello Lennart, On 08/04/15 12:57, Lennart Poettering wrote: >> Fixes the following compilation problem: >> > src/libsystemd/sd-rtnl/rtnl-types.c:361:9: error: array index in >> > initializer exceeds array bounds >> > [IFA_FLAGS] = { .type = NLA_U32 }, >> > ^ >> > src

[systemd-devel] [PATCH 2/2] missing.h: Define IFA_F_NOPREFIXROUTE

2015-04-07 Thread Alexander Sverdlin
IFA_F_NOPREFIXROUTE is a usual #define appeared in Linux 3.14, so AC_CHECK_DECLS is not necessary --- Fixes second systemd compilation problem against Linux 3.12 uapi headers. src/shared/missing.h | 4 1 file changed, 4 insertions(+) diff --git a/src/shared/missing.h b/src/shared/missing.h

[systemd-devel] [PATCH 1/2] Update IFA_MAX adding IFA_FLAGS

2015-04-07 Thread Alexander Sverdlin
Fixes the following compilation problem: src/libsystemd/sd-rtnl/rtnl-types.c:361:9: error: array index in initializer exceeds array bounds [IFA_FLAGS] = { .type = NLA_U32 }, ^ src/libsystemd/sd-rtnl/rtnl-types.c:361:9: error: (near initialization for 'rtnl_address_ty

Re: [systemd-devel] [PATCH 1/3] sd-rtnl: Always enable IFA_FLAGS

2015-04-07 Thread Alexander Sverdlin
Hi Lennart, On 07/04/15 21:09, Lennart Poettering wrote: >>> IFA_FLAGS seems to appear in kernel ~3.13 and the kernel requirements >> > >> > [...] >> > > > >> > Oh, sorry, the headers are from 3.12, but that's still newer than > > >> > 3.8 in the doc... > > >> > > > >>>

Re: [systemd-devel] [PATCH 1/3] sd-rtnl: Always enable IFA_FLAGS

2015-04-07 Thread Alexander Sverdlin
Hi! On 07/04/15 20:49, Lennart Poettering wrote: >> IFA_FLAGS seems to appear in kernel ~3.13 and the kernel requirements > > >> > from README state 3.8/3.7 at the moment. > > >> > > > >> > One could let the sd_rtnl_message_append_u32 for > > >>

Re: [systemd-devel] [PATCH 1/3] sd-rtnl: Always enable IFA_FLAGS

2015-04-07 Thread Alexander Sverdlin
Hi! On 07/04/15 19:24, Alexander Sverdlin wrote: >>>>> IFA_FLAGS seems to appear in kernel ~3.13 and the kernel requirements [...] >> > Oh, sorry, the headers are from 3.12, but that's still newer than 3.8 in >> > the doc... >> > >>&

Re: [systemd-devel] [PATCH 1/3] sd-rtnl: Always enable IFA_FLAGS

2015-04-07 Thread Alexander Sverdlin
Hi! On 07/04/15 19:09, Alexander Sverdlin wrote: >>>> IFA_FLAGS seems to appear in kernel ~3.13 and the kernel requirements >>>> >> > from README state 3.8/3.7 at the moment. >>>> >> > >>>> >> > One could let the sd_r

Re: [systemd-devel] [PATCH 1/3] sd-rtnl: Always enable IFA_FLAGS

2015-04-07 Thread Alexander Sverdlin
Hi! On 07/04/15 19:06, Alexander Sverdlin wrote: > On 07/04/15 15:55, Patrik Flykt wrote: >> > IFA_FLAGS seems to appear in kernel ~3.13 and the kernel requirements >> > from README state 3.8/3.7 at the moment. >> > >> > One could let the sd_rtnl_message

Re: [systemd-devel] [PATCH 1/3] sd-rtnl: Always enable IFA_FLAGS

2015-04-07 Thread Alexander Sverdlin
Hi! On 07/04/15 15:55, Patrik Flykt wrote: > IFA_FLAGS seems to appear in kernel ~3.13 and the kernel requirements > from README state 3.8/3.7 at the moment. > > One could let the sd_rtnl_message_append_u32 for IFA_FLAGS fail in patch > 2/3, but then user space has to play tricks with IPv6 DHCPv6

Re: [systemd-devel] [PATCH 1/3] sd-rtnl: Always enable IFA_FLAGS

2015-04-02 Thread Alexander Sverdlin
Hi! On 25/03/15 14:36, Patrik Flykt wrote: > IFA_FLAGS is a discrete value and has no preprocessor #define defined for > it. Fix this by always using the value. Seems that fix was not a real fix: CC src/libsystemd/sd-id128/libsystemd_internal_la-sd-id128.lo src/libsystemd/sd-rtnl/rtnl-ty

[systemd-devel] [PATCH] systemd-bootchart: Repair Entropy Graph

2015-03-29 Thread Alexander Sverdlin
Entropy Graph code doesn't handle the error condition if open() of /proc entry fails. Moreover, the file is only opened once and only first sample will contain the correct value because the return value of pread() is also not handled properly and file is not re-opened. Fix both problems. --- src/b

[systemd-devel] [PATCH] systemd-bootchart: Prevent leaking file descriptors in open-fdopen combination

2015-03-29 Thread Alexander Sverdlin
Correctly handle the potential failure of fdopen() (because of OOM, for instance) after potentially successful open(). Prevent leaking open fd in such case. --- src/bootchart/store.c | 12 ++-- src/bootchart/svg.c | 9 + 2 files changed, 19 insertions(+), 2 deletions(-) diff -

[systemd-devel] [PATCH v2] systemd-bootchart: Prevent closing random file descriptors

2015-03-29 Thread Alexander Sverdlin
If the kernel has no CONFIG_SCHED_DEBUG option set, systemd-bootchart produces empty .svg file. The reason for this is very fragile file descriptor logic in log_sample() and main() (/* do some cleanup, close fd's */ block). There are many places where file descriptors are closed on failure (missing

Re: [systemd-devel] [PATCH] systemd-bootchart: Prevent closing random file descriptors

2015-03-29 Thread Alexander Sverdlin
Hello Daniel, On 29/03/15 13:44, Daniel Mack wrote: @@ -184,6 +185,7 @@ vmstat_next: > n = pread(schedstat, buf, sizeof(buf) - 1, 0); > if (n <= 0) { > close(schedstat); >+schedstat = 0; Note that 0 is a valid file descriptor number. You sho

[systemd-devel] [PATCH] systemd-bootchart: Prevent closing random file descriptors

2015-03-28 Thread Alexander Sverdlin
If the kernel has no CONFIG_SCHED_DEBUG option set, systemd-bootchart produces empty .svg file. The reason for this is very fragile file descriptor logic in log_sample() and main() (/* do some cleanup, close fd's */ block). There are many places where file descriptors are closed on failure (missin