Re: [systemd-devel] [PATCH] missing: add BPF_XOR

2014-08-30 Thread Kay Sievers
On Tue, Aug 26, 2014 at 7:31 PM, Lennart Poettering
 wrote:

> Actually we try to be compatible with kernels from the last 2y, which
> would mean 3.5 as minimum version. (though we will make an exception
> when we adopt kdbus...)
>
> The README currently even states 3.0 was supported... Maybe we should
> drop that claim though, and update it to 3.5.

I bumped the requirement to 3.7 now, which covers the BPF and the
in-kernel firmware loading.

Kay
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] missing: add BPF_XOR

2014-08-26 Thread Lennart Poettering
On Thu, 21.08.14 12:38, Michael Olbrich (m.olbr...@pengutronix.de) wrote:

> BPF_XOR was introduced in kernel 3.7

Applied. Thanks!

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] missing: add BPF_XOR

2014-08-26 Thread Lennart Poettering
On Tue, 26.08.14 16:03, Michael Olbrich (m.olbr...@pengutronix.de) wrote:

> 
> On Thu, Aug 21, 2014 at 01:51:50PM +0200, Michal Sekletar wrote:
> > On Thu, Aug 21, 2014 at 12:38:08PM +0200, Michael Olbrich wrote:
> > > BPF_XOR was introduced in kernel 3.7
> > > ---
> > > 
> > > This fixes compiling systemd for me. I'm not sure about the implications 
> > > of
> > > this. I'm not sure what happens if the code using it is executed on a 
> > > linux
> > > kernel < 3.7
> > 
> > I don't think that merging this patch makes sense since we don't really 
> > support
> > combination of old kernel and new systemd. Both components are so centric 
> > these
> > days that they should be updated in lockstep. Hence allowing people to 
> > compile
> > against very old kernels shouldn't be possible really.
> 
> In that case, the README should be modified accordingly. That said, I've
> come across this issue in a cross-compile environment: To generate the
> hwdb.bin I need to build systemd for the build system. This failed on
> debian stable. I think that's a reasonable use-case.

Actually we try to be compatible with kernels from the last 2y, which
would mean 3.5 as minimum version. (though we will make an exception
when we adopt kdbus...)

The README currently even states 3.0 was supported... Maybe we should
drop that claim though, and update it to 3.5.

So I think this patch should go in... 

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] missing: add BPF_XOR

2014-08-26 Thread Michael Olbrich
On Thu, Aug 21, 2014 at 01:51:50PM +0200, Michal Sekletar wrote:
> On Thu, Aug 21, 2014 at 12:38:08PM +0200, Michael Olbrich wrote:
> > BPF_XOR was introduced in kernel 3.7
> > ---
> > 
> > This fixes compiling systemd for me. I'm not sure about the implications of
> > this. I'm not sure what happens if the code using it is executed on a linux
> > kernel < 3.7
> 
> I don't think that merging this patch makes sense since we don't really 
> support
> combination of old kernel and new systemd. Both components are so centric 
> these
> days that they should be updated in lockstep. Hence allowing people to compile
> against very old kernels shouldn't be possible really.

In that case, the README should be modified accordingly. That said, I've
come across this issue in a cross-compile environment: To generate the
hwdb.bin I need to build systemd for the build system. This failed on
debian stable. I think that's a reasonable use-case.

Michael

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] missing: add BPF_XOR

2014-08-21 Thread Michal Sekletar
On Thu, Aug 21, 2014 at 12:38:08PM +0200, Michael Olbrich wrote:
> BPF_XOR was introduced in kernel 3.7
> ---
> 
> This fixes compiling systemd for me. I'm not sure about the implications of
> this. I'm not sure what happens if the code using it is executed on a linux
> kernel < 3.7

I don't think that merging this patch makes sense since we don't really support
combination of old kernel and new systemd. Both components are so centric these
days that they should be updated in lockstep. Hence allowing people to compile
against very old kernels shouldn't be possible really.

AFAIK filter using unsupported BPF instruction will be rejected by kernel's
static analyzer for BPF code.

Michal

> 
> Michael
> 
>  src/shared/missing.h | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/shared/missing.h b/src/shared/missing.h
> index 3ff1a21..1321db1 100644
> --- a/src/shared/missing.h
> +++ b/src/shared/missing.h
> @@ -589,3 +589,7 @@ static inline int setns(int fd, int nstype) {
>  #ifndef NET_NAME_RENAMED
>  #  define NET_NAME_RENAMED 4
>  #endif
> +
> +#ifndef BPF_XOR
> +#  define BPF_XOR 0xa0
> +#endif
> -- 
> 2.1.0.rc1
> 
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel