* Re: [PATCH v4 net-next 01/13] bpf/verifier: rework value tracking
From: Daniel Borkmann @ 2017-08-06 23:35 UTC (permalink / raw)
To: Edward Cree, davem, Alexei Starovoitov, Alexei Starovoitov
Cc: netdev, linux-kernel, iovisor-dev
In-Reply-To: <8a5e37eb-2397-c986-79c5-02908fbbdee0@solarflare.com>
On 08/03/2017 06:11 PM, Edward Cree wrote:
> Unifies adjusted and unadjusted register value types (e.g. FRAME_POINTER is
> now just a PTR_TO_STACK with zero offset).
> Tracks value alignment by means of tracking known & unknown bits. This
> also replaces the 'reg->imm' (leading zero bits) calculations for (what
> were) UNKNOWN_VALUEs.
> If pointer leaks are allowed, and adjust_ptr_min_max_vals returns -EACCES,
> treat the pointer as an unknown scalar and try again, because we might be
> able to conclude something about the result (e.g. pointer & 0x40 is either
> 0 or 0x40).
>
> Signed-off-by: Edward Cree <ecree@solarflare.com>
[...]
> +static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env,
> + struct bpf_insn *insn,
> + struct bpf_reg_state *dst_reg,
> + struct bpf_reg_state *src_reg)
> {
> struct bpf_reg_state *regs = env->cur_state.regs;
[...]
> - } else if (insn->imm < BPF_REGISTER_MAX_RANGE &&
> - (s64)insn->imm > BPF_REGISTER_MIN_RANGE) {
> - min_val = max_val = insn->imm;
> - src_align = calc_align(insn->imm);
> + if (BPF_CLASS(insn->code) != BPF_ALU64) {
> + /* 32-bit ALU ops are (32,32)->64 */
> + coerce_reg_to_32(dst_reg);
> + coerce_reg_to_32(src_reg);
> }
> -
[...]
> - dst_reg->max_value = BPF_REGISTER_MAX_RANGE;
> + if (BPF_CLASS(insn->code) != BPF_ALU64) {
> + /* 32-bit ALU ops are (32,32)->64 */
> + coerce_reg_to_32(dst_reg);
> + coerce_reg_to_32(src_reg);
> }
Looks like the same check was added twice here right after
the first one? Shouldn't we just temporarily coerce the src
reg to 32 bit here given in the actual op the src reg is not
being modified?
Thanks,
Daniel
> + min_val = src_reg->min_value;
> + max_val = src_reg->max_value;
> + src_known = tnum_is_const(src_reg->var_off);
> + dst_known = tnum_is_const(dst_reg->var_off);
>
> switch (opcode) {
^ permalink raw reply
* Re: [PATCH v06 18/36] uapi linux/errqueue.h: include linux/time.h in user space
From: Willem de Bruijn @ 2017-08-06 22:03 UTC (permalink / raw)
To: Mikko Rapeli
Cc: LKML, Linux API, Willem de Bruijn, Soheil Hassas Yeganeh,
Network Development
In-Reply-To: <20170806215244.GB31101-dqH1CgrzRhOk/eJAJmRu5A@public.gmane.org>
On Sun, Aug 6, 2017 at 5:52 PM, Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org> wrote:
> On Sun, Aug 06, 2017 at 05:42:13PM -0400, Willem de Bruijn wrote:
>> On Sun, Aug 6, 2017 at 5:33 PM, Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org> wrote:
>> > On Sun, Aug 06, 2017 at 05:24:20PM -0400, Willem de Bruijn wrote:
>> >> >> > +#ifdef __KERNEL__
>> >> >> > +#include <linux/time.h>
>> >> >> > +#else
>> >> >> > +#include <time.h>
>> >> >> > +#endif /* __KERNEL__ */
>> >> >>
>> >> >> This will break applications that include <linux/time.h> manually.
>> >> >> I previously sent a patch to use libc-compat to make compilation succeed
>> >> >> when both are included in the case where <linux/time.h> is included after
>> >> >> <time.h>.
>> >> >>
>> >> >> https://lkml.org/lkml/2016/9/12/872
>> >> >>
>> >> >> The inverse will require changes to the libc header to avoid redefining
>> >> >> symbols already defined by <linux/time.h>
>> >> >>
>> >> >> The second patch in that 2-patch set included <linux/time.h>
>> >> >> unconditionally after the fix. This broke builds that also included
>> >> >> <time.h> in the wrong order. I did not resubmit the first patch as a
>> >> >> stand-alone, as it is not sufficient to avoid breakage.
>> >> >
>> >> > I wasn't aware of your change, but I was about to send this to fix the
>> >> > case when glibc <time.h> is included before <linux/time.h>:
>> >> >
>> >> > https://github.com/mcfrisk/linux/commit/f3952a27b8a21c6478d26e6246055383483f6a66
>> >>
>> >> There are a few differences between the two. Including <time.h> does not
>> >> unconditionally define all the symbols. Some are conditional on additional
>> >> state, such as __timespec_defined.
>> >
>> > Yep, your patch seems better for libc-compat.h. Could you send it again?
>>
>> Okay. Or feel free to include it in the patchset if that helps resolve
>> dependencies.
>
> If you don't have the time, I will send tomorrow a new version of this
> patch which fixes the commit topic and before that your libc-compat.h change
> so both could be applied together.
Please do. Thanks!
^ permalink raw reply
* [PATCH] qed: Fix a memory allocation failure test in 'qed_mcp_cmd_init()'
From: Christophe JAILLET @ 2017-08-06 22:00 UTC (permalink / raw)
To: Yuval.Mintz, Ariel.Elior, everest-linux-l2
Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET
We allocate 'p_info->mfw_mb_cur' and 'p_info->mfw_mb_shadow' but we check
'p_info->mfw_mb_addr' instead of 'p_info->mfw_mb_cur'.
'p_info->mfw_mb_addr' is never 0, because it is initiliazed a few lines
above in 'qed_load_mcp_offsets()'.
Update the test and check the result of the 2 'kzalloc()' instead.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/net/ethernet/qlogic/qed/qed_mcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_mcp.c b/drivers/net/ethernet/qlogic/qed/qed_mcp.c
index c1ecce6b9141..376485d99357 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_mcp.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_mcp.c
@@ -253,7 +253,7 @@ int qed_mcp_cmd_init(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
size = MFW_DRV_MSG_MAX_DWORDS(p_info->mfw_mb_length) * sizeof(u32);
p_info->mfw_mb_cur = kzalloc(size, GFP_KERNEL);
p_info->mfw_mb_shadow = kzalloc(size, GFP_KERNEL);
- if (!p_info->mfw_mb_shadow || !p_info->mfw_mb_addr)
+ if (!p_info->mfw_mb_cur || !p_info->mfw_mb_shadow)
goto err;
return 0;
--
2.11.0
^ permalink raw reply related
* Re: [PATCH v06 18/36] uapi linux/errqueue.h: include linux/time.h in user space
From: Mikko Rapeli @ 2017-08-06 21:52 UTC (permalink / raw)
To: Willem de Bruijn
Cc: LKML, Linux API, Willem de Bruijn, Soheil Hassas Yeganeh,
Network Development
In-Reply-To: <CAF=yD-LN9b9q6sY38eCBM3VyfErQ8sqpQ_7fwkJzMxgjeRFtFg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Sun, Aug 06, 2017 at 05:42:13PM -0400, Willem de Bruijn wrote:
> On Sun, Aug 6, 2017 at 5:33 PM, Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org> wrote:
> > On Sun, Aug 06, 2017 at 05:24:20PM -0400, Willem de Bruijn wrote:
> >> >> > +#ifdef __KERNEL__
> >> >> > +#include <linux/time.h>
> >> >> > +#else
> >> >> > +#include <time.h>
> >> >> > +#endif /* __KERNEL__ */
> >> >>
> >> >> This will break applications that include <linux/time.h> manually.
> >> >> I previously sent a patch to use libc-compat to make compilation succeed
> >> >> when both are included in the case where <linux/time.h> is included after
> >> >> <time.h>.
> >> >>
> >> >> https://lkml.org/lkml/2016/9/12/872
> >> >>
> >> >> The inverse will require changes to the libc header to avoid redefining
> >> >> symbols already defined by <linux/time.h>
> >> >>
> >> >> The second patch in that 2-patch set included <linux/time.h>
> >> >> unconditionally after the fix. This broke builds that also included
> >> >> <time.h> in the wrong order. I did not resubmit the first patch as a
> >> >> stand-alone, as it is not sufficient to avoid breakage.
> >> >
> >> > I wasn't aware of your change, but I was about to send this to fix the
> >> > case when glibc <time.h> is included before <linux/time.h>:
> >> >
> >> > https://github.com/mcfrisk/linux/commit/f3952a27b8a21c6478d26e6246055383483f6a66
> >>
> >> There are a few differences between the two. Including <time.h> does not
> >> unconditionally define all the symbols. Some are conditional on additional
> >> state, such as __timespec_defined.
> >
> > Yep, your patch seems better for libc-compat.h. Could you send it again?
>
> Okay. Or feel free to include it in the patchset if that helps resolve
> dependencies.
If you don't have the time, I will send tomorrow a new version of this
patch which fixes the commit topic and before that your libc-compat.h change
so both could be applied together.
Feel free to be faster :)
> >> > I don't like leaving a few dozen non-compiling header files into uapi.
> >>
> >> I agree, but I do not see a simple solution.
> >>
> >> Unless libc has the analogous change, including either <time.h> or
> >> <linux/time.h> in userspace can unfortunately cause breakage.
> >>
> >> The added include if __KERNEL__ is defined should be safe, though.
> >
> > Yes, for the kernel side, but your libc-compat change would nice for
> > userspace, where something will break for sure, but providing source
> > API compatibility is sometimes impossible.
> >
> > To summarize, this change from me, and your libc-compat.c for time.h, or?
>
> I'm still afraid that this patch as is will break builds that include
> <linux/time.h> first.
I agree, but I also want uapi headers to cleanly compile. I know this might
break stuff on userspace side which rely on these broken header file
dependencies, but if the fix to just re-order include
statements I'm fine with it, also when the complaints hit my inbox.
If I had the CPU time, memory and disk space, I'd do a full yocto distro
build to see how badly userspace could break but I don't at home.
-Mikko
^ permalink raw reply
* Re: [PATCH v06 18/36] uapi linux/errqueue.h: include linux/time.h in user space
From: Willem de Bruijn @ 2017-08-06 21:42 UTC (permalink / raw)
To: Mikko Rapeli
Cc: LKML, Linux API, Willem de Bruijn, Soheil Hassas Yeganeh,
Network Development
In-Reply-To: <20170806213330.GA31101@lakka.kapsi.fi>
On Sun, Aug 6, 2017 at 5:33 PM, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> On Sun, Aug 06, 2017 at 05:24:20PM -0400, Willem de Bruijn wrote:
>> >> > +#ifdef __KERNEL__
>> >> > +#include <linux/time.h>
>> >> > +#else
>> >> > +#include <time.h>
>> >> > +#endif /* __KERNEL__ */
>> >>
>> >> This will break applications that include <linux/time.h> manually.
>> >> I previously sent a patch to use libc-compat to make compilation succeed
>> >> when both are included in the case where <linux/time.h> is included after
>> >> <time.h>.
>> >>
>> >> https://lkml.org/lkml/2016/9/12/872
>> >>
>> >> The inverse will require changes to the libc header to avoid redefining
>> >> symbols already defined by <linux/time.h>
>> >>
>> >> The second patch in that 2-patch set included <linux/time.h>
>> >> unconditionally after the fix. This broke builds that also included
>> >> <time.h> in the wrong order. I did not resubmit the first patch as a
>> >> stand-alone, as it is not sufficient to avoid breakage.
>> >
>> > I wasn't aware of your change, but I was about to send this to fix the
>> > case when glibc <time.h> is included before <linux/time.h>:
>> >
>> > https://github.com/mcfrisk/linux/commit/f3952a27b8a21c6478d26e6246055383483f6a66
>>
>> There are a few differences between the two. Including <time.h> does not
>> unconditionally define all the symbols. Some are conditional on additional
>> state, such as __timespec_defined.
>
> Yep, your patch seems better for libc-compat.h. Could you send it again?
Okay. Or feel free to include it in the patchset if that helps resolve
dependencies.
>> > I don't like leaving a few dozen non-compiling header files into uapi.
>>
>> I agree, but I do not see a simple solution.
>>
>> Unless libc has the analogous change, including either <time.h> or
>> <linux/time.h> in userspace can unfortunately cause breakage.
>>
>> The added include if __KERNEL__ is defined should be safe, though.
>
> Yes, for the kernel side, but your libc-compat change would nice for
> userspace, where something will break for sure, but providing source
> API compatibility is sometimes impossible.
>
> To summarize, this change from me, and your libc-compat.c for time.h, or?
I'm still afraid that this patch as is will break builds that include
<linux/time.h> first.
^ permalink raw reply
* [PATCH] i40e: Fix a potential NULL pointer dereference
From: Christophe JAILLET @ 2017-08-06 21:37 UTC (permalink / raw)
To: jeffrey.t.kirsher
Cc: intel-wired-lan, netdev, linux-kernel, kernel-janitors,
Christophe JAILLET
If 'kzalloc()' fails, a NULL pointer will be dereferenced.
Return an error code (-ENOMEM) instead.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 979110d59f67..facd48fc15d4 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -423,6 +423,9 @@ static int i40e_config_iwarp_qvlist(struct i40e_vf *vf,
(sizeof(struct virtchnl_iwarp_qv_info) *
(qvlist_info->num_vectors - 1));
vf->qvlist_info = kzalloc(size, GFP_KERNEL);
+ if (!vf->qvlist_info)
+ return -ENOMEM;
+
vf->qvlist_info->num_vectors = qvlist_info->num_vectors;
msix_vf = pf->hw.func_caps.num_msix_vectors_vf;
--
2.11.0
^ permalink raw reply related
* Re: [PATCH v06 18/36] uapi linux/errqueue.h: include linux/time.h in user space
From: Mikko Rapeli @ 2017-08-06 21:33 UTC (permalink / raw)
To: Willem de Bruijn
Cc: LKML, Linux API, Willem de Bruijn, Soheil Hassas Yeganeh,
Network Development
In-Reply-To: <CAF=yD-+w2sboybyUZ-6nKQy1s=Oi1S4Z5yZgksM-CzQjDRG+Vw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Sun, Aug 06, 2017 at 05:24:20PM -0400, Willem de Bruijn wrote:
> >> > +#ifdef __KERNEL__
> >> > +#include <linux/time.h>
> >> > +#else
> >> > +#include <time.h>
> >> > +#endif /* __KERNEL__ */
> >>
> >> This will break applications that include <linux/time.h> manually.
> >> I previously sent a patch to use libc-compat to make compilation succeed
> >> when both are included in the case where <linux/time.h> is included after
> >> <time.h>.
> >>
> >> https://lkml.org/lkml/2016/9/12/872
> >>
> >> The inverse will require changes to the libc header to avoid redefining
> >> symbols already defined by <linux/time.h>
> >>
> >> The second patch in that 2-patch set included <linux/time.h>
> >> unconditionally after the fix. This broke builds that also included
> >> <time.h> in the wrong order. I did not resubmit the first patch as a
> >> stand-alone, as it is not sufficient to avoid breakage.
> >
> > I wasn't aware of your change, but I was about to send this to fix the
> > case when glibc <time.h> is included before <linux/time.h>:
> >
> > https://github.com/mcfrisk/linux/commit/f3952a27b8a21c6478d26e6246055383483f6a66
>
> There are a few differences between the two. Including <time.h> does not
> unconditionally define all the symbols. Some are conditional on additional
> state, such as __timespec_defined.
Yep, your patch seems better for libc-compat.h. Could you send it again?
> > but you also ran into problems where <linux/time.h> is included before
> > <time.h> which need fixes in libc header side.
> >
> > So how to proceed with these?
>
> The libc-compat change is a good fix that can be submitted on its own.
Yes, please do so.
> > I don't like leaving a few dozen non-compiling header files into uapi.
>
> I agree, but I do not see a simple solution.
>
> Unless libc has the analogous change, including either <time.h> or
> <linux/time.h> in userspace can unfortunately cause breakage.
>
> The added include if __KERNEL__ is defined should be safe, though.
Yes, for the kernel side, but your libc-compat change would nice for
userspace, where something will break for sure, but providing source
API compatibility is sometimes impossible.
To summarize, this change from me, and your libc-compat.c for time.h, or?
-Mikko
^ permalink raw reply
* Re: [PATCH v06 18/36] uapi linux/errqueue.h: include linux/time.h in user space
From: Willem de Bruijn @ 2017-08-06 21:24 UTC (permalink / raw)
To: Mikko Rapeli
Cc: LKML, Linux API, Willem de Bruijn, Soheil Hassas Yeganeh,
Network Development
In-Reply-To: <20170806205654.GF28459-dqH1CgrzRhOk/eJAJmRu5A@public.gmane.org>
>> > +#ifdef __KERNEL__
>> > +#include <linux/time.h>
>> > +#else
>> > +#include <time.h>
>> > +#endif /* __KERNEL__ */
>>
>> This will break applications that include <linux/time.h> manually.
>> I previously sent a patch to use libc-compat to make compilation succeed
>> when both are included in the case where <linux/time.h> is included after
>> <time.h>.
>>
>> https://lkml.org/lkml/2016/9/12/872
>>
>> The inverse will require changes to the libc header to avoid redefining
>> symbols already defined by <linux/time.h>
>>
>> The second patch in that 2-patch set included <linux/time.h>
>> unconditionally after the fix. This broke builds that also included
>> <time.h> in the wrong order. I did not resubmit the first patch as a
>> stand-alone, as it is not sufficient to avoid breakage.
>
> I wasn't aware of your change, but I was about to send this to fix the
> case when glibc <time.h> is included before <linux/time.h>:
>
> https://github.com/mcfrisk/linux/commit/f3952a27b8a21c6478d26e6246055383483f6a66
There are a few differences between the two. Including <time.h> does not
unconditionally define all the symbols. Some are conditional on additional
state, such as __timespec_defined.
> but you also ran into problems where <linux/time.h> is included before
> <time.h> which need fixes in libc header side.
>
> So how to proceed with these?
The libc-compat change is a good fix that can be submitted on its own.
> I don't like leaving a few dozen non-compiling header files into uapi.
I agree, but I do not see a simple solution.
Unless libc has the analogous change, including either <time.h> or
<linux/time.h> in userspace can unfortunately cause breakage.
The added include if __KERNEL__ is defined should be safe, though.
^ permalink raw reply
* Re: [PATCH v06 18/36] uapi linux/errqueue.h: include linux/time.h in user space
From: Mikko Rapeli @ 2017-08-06 20:58 UTC (permalink / raw)
To: Willem de Bruijn
Cc: LKML, Linux API, Willem de Bruijn, Soheil Hassas Yeganeh,
Network Development
In-Reply-To: <CAF=yD-LDo7_8k5rMtBkj-PASqTqz7Toub0qXBdGUR3Kqb4p4Tg@mail.gmail.com>
On Sun, Aug 06, 2017 at 04:26:50PM -0400, Willem de Bruijn wrote:
> On Sun, Aug 6, 2017 at 4:23 PM, Willem de Bruijn
> <willemdebruijn.kernel@gmail.com> wrote:
> > On Sun, Aug 6, 2017 at 12:44 PM, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> >> linux/time.h conflicts with user space header time.h. Try to be compatible
> >> with both.
> >>
> >> Fixes userspace compilation error:
> >>
> >> error: array type has incomplete element type
> >> struct timespec ts[3];
> >>
> >> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> >> Cc: Willem de Bruijn <willemb@google.com>
> >> Cc: Soheil Hassas Yeganeh <soheil@google.com>
> >> Cc: netdev@vger.kernel.org
> >> ---
> >> include/uapi/linux/errqueue.h | 6 ++++++
> >> 1 file changed, 6 insertions(+)
> >>
> >> diff --git a/include/uapi/linux/errqueue.h b/include/uapi/linux/errqueue.h
> >> index 07bdce1f444a..b310b2c6d94f 100644
> >> --- a/include/uapi/linux/errqueue.h
> >> +++ b/include/uapi/linux/errqueue.h
> >> @@ -3,6 +3,12 @@
> >>
> >> #include <linux/types.h>
> >>
> >> +#ifdef __KERNEL__
> >> +#include <linux/time.h>
> >> +#else
> >> +#include <time.h>
> >> +#endif /* __KERNEL__ */
> >
> > This will break applications that include <linux/time.h> manually.
>
> Also, the patch title reads "include <linux/time.h> in user space",
> but it includes <time.h> in that environment.
Oops, missed while squashing some commits. Will fix. Thanks!
-Mikko
^ permalink raw reply
* Re: [PATCH v06 18/36] uapi linux/errqueue.h: include linux/time.h in user space
From: Mikko Rapeli @ 2017-08-06 20:56 UTC (permalink / raw)
To: Willem de Bruijn
Cc: LKML, Linux API, Willem de Bruijn, Soheil Hassas Yeganeh,
Network Development
In-Reply-To: <CAF=yD-L2ntuH54J_SwN9WcpBMgkV_v0e-Q2Pu2mrQ3+1RozGFQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Sun, Aug 06, 2017 at 04:23:16PM -0400, Willem de Bruijn wrote:
> On Sun, Aug 6, 2017 at 12:44 PM, Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org> wrote:
> > linux/time.h conflicts with user space header time.h. Try to be compatible
> > with both.
> >
> > Fixes userspace compilation error:
> >
> > error: array type has incomplete element type
> > struct timespec ts[3];
> >
> > Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
> > Cc: Willem de Bruijn <willemb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
> > Cc: Soheil Hassas Yeganeh <soheil-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
> > Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > ---
> > include/uapi/linux/errqueue.h | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/include/uapi/linux/errqueue.h b/include/uapi/linux/errqueue.h
> > index 07bdce1f444a..b310b2c6d94f 100644
> > --- a/include/uapi/linux/errqueue.h
> > +++ b/include/uapi/linux/errqueue.h
> > @@ -3,6 +3,12 @@
> >
> > #include <linux/types.h>
> >
> > +#ifdef __KERNEL__
> > +#include <linux/time.h>
> > +#else
> > +#include <time.h>
> > +#endif /* __KERNEL__ */
>
> This will break applications that include <linux/time.h> manually.
> I previously sent a patch to use libc-compat to make compilation succeed
> when both are included in the case where <linux/time.h> is included after
> <time.h>.
>
> https://lkml.org/lkml/2016/9/12/872
>
> The inverse will require changes to the libc header to avoid redefining
> symbols already defined by <linux/time.h>
>
> The second patch in that 2-patch set included <linux/time.h>
> unconditionally after the fix. This broke builds that also included
> <time.h> in the wrong order. I did not resubmit the first patch as a
> stand-alone, as it is not sufficient to avoid breakage.
I wasn't aware of your change, but I was about to send this to fix the
case when glibc <time.h> is included before <linux/time.h>:
https://github.com/mcfrisk/linux/commit/f3952a27b8a21c6478d26e6246055383483f6a66
but you also ran into problems where <linux/time.h> is included before
<time.h> which need fixes in libc header side.
So how to proceed with these?
I don't like leaving a few dozen non-compiling header files into uapi.
-Mikko
^ permalink raw reply
* Re: NULL pointer deref bring up interfaces
From: Stephen Hemminger @ 2017-08-06 20:54 UTC (permalink / raw)
To: Rafael Cepeda; +Cc: netdev
In-Reply-To: <CAEMnpcuw8Ow37_amPQtm66EkLwEpTDHWQFoe5UmFXzczYeQ-1w@mail.gmail.com>
On Sun, 6 Aug 2017 12:29:13 -0500
Rafael Cepeda <rcepeda1993@gmail.com> wrote:
> Just upgraded to 4.13rc2, rebooted, and my system crashed at my
> netmount init script; says RIP is NULL, I am guessing a bad func call.
> I immediately thought missing firmware in kernel, my kernel builds
> firmware in it, so I upgraded my firmware to latest on git.kernel and
> made sure I had no warnings in dmesg about missing firmware. Still, I
> receive this NULL pointer in the IP. If I disable my netmount on boot,
> I can login, but can not bring up my interfaces, still get a RIP err
> in kernel logs and cpu load sky-rockets...the issue still exists on
> rc3.
>
> Linux-Regression-ID: lr#084be9
>
> I am willing to help and provide as much info as possible, thank you.
You need to post:
1. Kernel config -- since you are building your own kernel.
2. Hardware -- lspci output
3. Kernel log if possible (use serial console).
Ideally, you can bisect it down to the commit that causes the problem.
^ permalink raw reply
* Re: [PATCH v06 18/36] uapi linux/errqueue.h: include linux/time.h in user space
From: Willem de Bruijn @ 2017-08-06 20:26 UTC (permalink / raw)
To: Mikko Rapeli
Cc: LKML, Linux API, Willem de Bruijn, Soheil Hassas Yeganeh,
Network Development
In-Reply-To: <CAF=yD-L2ntuH54J_SwN9WcpBMgkV_v0e-Q2Pu2mrQ3+1RozGFQ@mail.gmail.com>
On Sun, Aug 6, 2017 at 4:23 PM, Willem de Bruijn
<willemdebruijn.kernel@gmail.com> wrote:
> On Sun, Aug 6, 2017 at 12:44 PM, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
>> linux/time.h conflicts with user space header time.h. Try to be compatible
>> with both.
>>
>> Fixes userspace compilation error:
>>
>> error: array type has incomplete element type
>> struct timespec ts[3];
>>
>> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
>> Cc: Willem de Bruijn <willemb@google.com>
>> Cc: Soheil Hassas Yeganeh <soheil@google.com>
>> Cc: netdev@vger.kernel.org
>> ---
>> include/uapi/linux/errqueue.h | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/include/uapi/linux/errqueue.h b/include/uapi/linux/errqueue.h
>> index 07bdce1f444a..b310b2c6d94f 100644
>> --- a/include/uapi/linux/errqueue.h
>> +++ b/include/uapi/linux/errqueue.h
>> @@ -3,6 +3,12 @@
>>
>> #include <linux/types.h>
>>
>> +#ifdef __KERNEL__
>> +#include <linux/time.h>
>> +#else
>> +#include <time.h>
>> +#endif /* __KERNEL__ */
>
> This will break applications that include <linux/time.h> manually.
Also, the patch title reads "include <linux/time.h> in user space",
but it includes <time.h> in that environment.
^ permalink raw reply
* Re: [PATCH v06 18/36] uapi linux/errqueue.h: include linux/time.h in user space
From: Willem de Bruijn @ 2017-08-06 20:23 UTC (permalink / raw)
To: Mikko Rapeli
Cc: LKML, Linux API, Willem de Bruijn, Soheil Hassas Yeganeh,
Network Development
In-Reply-To: <20170806164428.2273-19-mikko.rapeli@iki.fi>
On Sun, Aug 6, 2017 at 12:44 PM, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> linux/time.h conflicts with user space header time.h. Try to be compatible
> with both.
>
> Fixes userspace compilation error:
>
> error: array type has incomplete element type
> struct timespec ts[3];
>
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> Cc: Willem de Bruijn <willemb@google.com>
> Cc: Soheil Hassas Yeganeh <soheil@google.com>
> Cc: netdev@vger.kernel.org
> ---
> include/uapi/linux/errqueue.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/include/uapi/linux/errqueue.h b/include/uapi/linux/errqueue.h
> index 07bdce1f444a..b310b2c6d94f 100644
> --- a/include/uapi/linux/errqueue.h
> +++ b/include/uapi/linux/errqueue.h
> @@ -3,6 +3,12 @@
>
> #include <linux/types.h>
>
> +#ifdef __KERNEL__
> +#include <linux/time.h>
> +#else
> +#include <time.h>
> +#endif /* __KERNEL__ */
This will break applications that include <linux/time.h> manually.
I previously sent a patch to use libc-compat to make compilation succeed
when both are included in the case where <linux/time.h> is included after
<time.h>.
https://lkml.org/lkml/2016/9/12/872
The inverse will require changes to the libc header to avoid redefining
symbols already defined by <linux/time.h>
The second patch in that 2-patch set included <linux/time.h>
unconditionally after the fix. This broke builds that also included
<time.h> in the wrong order. I did not resubmit the first patch as a
stand-alone, as it is not sufficient to avoid breakage.
^ permalink raw reply
* Re: [patch net-next 06/15] mlx5e: push cls_flower and mqprio setup_tc processing into separate functions
From: Saeed Mahameed @ 2017-08-06 20:08 UTC (permalink / raw)
To: Jiri Pirko
Cc: Linux Netdev List, David S. Miller, Jamal Hadi Salim,
xiyou.wangcong, Daniel Borkmann, mlxsw, Andrew Lunn,
vivien.didelot, f.fainelli, simon.horman, pieter.jansenvanvuuren,
dirk.vandermerwe, Alexander Duyck, amritha.nambiar, oss-drivers
In-Reply-To: <20170805145337.17728-7-jiri@resnulli.us>
On Sat, Aug 5, 2017 at 5:53 PM, Jiri Pirko <jiri@resnulli.us> wrote:
> From: Jiri Pirko <jiri@mellanox.com>
>
> Let mlx5e_setup_tc (former mlx5e_ndo_setup_tc) be a splitter for specific
> setup_tc types and push out cls_flower and mqprio specific codes into
> separate functions. Also change the return values so they are the same
> as in the rest of the drivers.
>
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 56 +++++++++++++----------
> 1 file changed, 31 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> index 4052e225f..adf35da 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> @@ -2998,12 +2998,16 @@ static int mlx5e_modify_channels_vsd(struct mlx5e_channels *chs, bool vsd)
> return 0;
> }
>
> -static int mlx5e_setup_tc(struct net_device *netdev, u8 tc)
> +static int mlx5e_setup_tc_mqprio(struct net_device *netdev,
> + struct tc_mqprio_qopt *mqprio)
> {
> struct mlx5e_priv *priv = netdev_priv(netdev);
> struct mlx5e_channels new_channels = {};
> + u8 tc = mqprio->num_tc;
> int err = 0;
>
> + mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
> +
> if (tc && tc != MLX5E_MAX_NUM_TC)
> return -EINVAL;
>
> @@ -3027,39 +3031,41 @@ static int mlx5e_setup_tc(struct net_device *netdev, u8 tc)
> return err;
> }
>
Hi Jiri,
Great change, looks very good.
I am going to post a pull request tomorrow based on 4.13-rc4
"for-next" to both net-next and rdma,
it [1] will most certainly conflict with your change, so to avoid
inconvenience, can we hold this change a bit and rebase it on top of
my pull request ?
[1] https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git/diff/drivers/net/ethernet/mellanox/mlx5/core/en_main.c?h=mlx5-shared-4.13&id=b90d9bba17e2c9bee5b2e3f7bd46b77bd6f43c91
Thanks,
Saeed.
[...]
^ permalink raw reply
* Re: [PATCH 2/4] atm: idt77252: Delete an error message for a failed memory allocation in seven functions
From: kbuild test robot @ 2017-08-06 19:06 UTC (permalink / raw)
To: SF Markus Elfring
Cc: kbuild-all, linux-atm-general, netdev, Chas Williams, LKML,
kernel-janitors
In-Reply-To: <845a4e7c-fccc-a81b-cff5-3962e3cac155@users.sourceforge.net>
[-- Attachment #1: Type: text/plain, Size: 2450 bytes --]
Hi Markus,
[auto build test WARNING on linus/master]
[also build test WARNING on v4.13-rc3 next-20170804]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/SF-Markus-Elfring/atm-idt77252-Adjust-four-function-calls-together-with-a-variable-assignment/20170806-081417
config: x86_64-randconfig-b0-08070032 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
drivers//atm/idt77252.c: In function 'idt77252_send_oam':
>> drivers//atm/idt77252.c:2003: warning: unused variable 'card'
vim +/card +2003 drivers//atm/idt77252.c
^1da177e Linus Torvalds 2005-04-16 1998
^1da177e Linus Torvalds 2005-04-16 1999 static int
^1da177e Linus Torvalds 2005-04-16 2000 idt77252_send_oam(struct atm_vcc *vcc, void *cell, int flags)
^1da177e Linus Torvalds 2005-04-16 2001 {
^1da177e Linus Torvalds 2005-04-16 2002 struct atm_dev *dev = vcc->dev;
^1da177e Linus Torvalds 2005-04-16 @2003 struct idt77252_dev *card = dev->dev_data;
^1da177e Linus Torvalds 2005-04-16 2004 struct sk_buff *skb;
^1da177e Linus Torvalds 2005-04-16 2005
^1da177e Linus Torvalds 2005-04-16 2006 skb = dev_alloc_skb(64);
^1da177e Linus Torvalds 2005-04-16 2007 if (!skb) {
^1da177e Linus Torvalds 2005-04-16 2008 atomic_inc(&vcc->stats->tx_err);
^1da177e Linus Torvalds 2005-04-16 2009 return -ENOMEM;
^1da177e Linus Torvalds 2005-04-16 2010 }
14afee4b Reshetova, Elena 2017-06-30 2011 refcount_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
^1da177e Linus Torvalds 2005-04-16 2012
59ae1d12 Johannes Berg 2017-06-16 2013 skb_put_data(skb, cell, 52);
^1da177e Linus Torvalds 2005-04-16 2014
^1da177e Linus Torvalds 2005-04-16 2015 return idt77252_send_skb(vcc, skb, 1);
^1da177e Linus Torvalds 2005-04-16 2016 }
^1da177e Linus Torvalds 2005-04-16 2017
:::::: The code at line 2003 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34611 bytes --]
^ permalink raw reply
* Re: [PATCH RFC 00/13] phylink and sfp support
From: Andrew Lunn @ 2017-08-06 18:26 UTC (permalink / raw)
To: Russell King - ARM Linux; +Cc: Florian Fainelli, netdev
In-Reply-To: <20170725140138.GK31807@n2100.armlinux.org.uk>
On Tue, Jul 25, 2017 at 03:01:39PM +0100, Russell King - ARM Linux wrote:
> Hi,
>
> This patch series introduces generic support for SFP sockets found on
> various Marvell based platforms. The idea here is to provide common
> SFP socket support which can be re-used by network drivers as
> appropriate, rather than each network driver having to re-implement
> SFP socket support.
Hi Russell
Please could you repost with all the Reviewed-By added and RFC
removed. The code should get merged then.
Thanks
Andrew
^ permalink raw reply
* Re: [PATCH] tcp_input: move out condition check from tcp_data_queue()
From: Ilya Matveychikov @ 2017-08-06 17:57 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev
In-Reply-To: <1502039247.25002.53.camel@edumazet-glaptop3.roam.corp.google.com>
> On Aug 6, 2017, at 9:07 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
> On Sun, 2017-08-06 at 13:51 +0400, Ilya Matveychikov wrote:
>> As tcp_data_queue() function is used just only twice it's better
>> to move out the first check and wrap it with inline. It saves a
>> single call in case the condition evaluated as true.
>>
>> Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com>
>> ---
>> net/ipv4/tcp_input.c | 14 +++++++++-----
>> 1 file changed, 9 insertions(+), 5 deletions(-)
>>
>> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
>> index 2920e0c..141a722 100644
>> --- a/net/ipv4/tcp_input.c
>> +++ b/net/ipv4/tcp_input.c
>> @@ -4585,16 +4585,12 @@ int tcp_send_rcvq(struct sock *sk, struct msghdr *msg, size_t size)
>>
>> }
>>
>> -static void tcp_data_queue(struct sock *sk, struct sk_buff *skb)
>> +static void __tcp_data_queue(struct sock *sk, struct sk_buff *skb)
>> {
>> struct tcp_sock *tp = tcp_sk(sk);
>> bool fragstolen = false;
>> int eaten = -1;
>>
>> - if (TCP_SKB_CB(skb)->seq == TCP_SKB_CB(skb)->end_seq) {
>> - __kfree_skb(skb);
>> - return;
>> - }
>> skb_dst_drop(skb);
>> __skb_pull(skb, tcp_hdr(skb)->doff * 4);
>>
>> @@ -4703,6 +4699,14 @@ static void tcp_data_queue(struct sock *sk, struct sk_buff *skb)
>> tcp_data_queue_ofo(sk, skb);
>> }
>>
>> +static inline void tcp_data_queue(struct sock *sk, struct sk_buff *skb)
>> +{
>> + if (TCP_SKB_CB(skb)->seq == TCP_SKB_CB(skb)->end_seq)
>> + __kfree_skb(skb);
>> + else
>> + __tcp_data_queue(sk, skb);
>> +}
>> +
>
> We wont accept such a change, because this code does not need to be
> inlined in the callers, ( and btw inline in .c files are discouraged
> these days )
Not sure that I understand you point. What’s the reason for that code
not need to be inlined in the callers?
^ permalink raw reply
* Re: [patch net-next 10/15] dsa: push cls_matchall setup_tc processing into a separate function
From: Florian Fainelli @ 2017-08-06 17:55 UTC (permalink / raw)
To: Jiri Pirko, netdev
Cc: davem, jhs, xiyou.wangcong, daniel, mlxsw, andrew, vivien.didelot,
simon.horman, pieter.jansenvanvuuren, dirk.vandermerwe,
alexander.h.duyck, amritha.nambiar, oss-drivers
In-Reply-To: <20170805145337.17728-11-jiri@resnulli.us>
On 08/05/2017 07:53 AM, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@mellanox.com>
>
> Let dsa_slave_setup_tc be a splitter for specific setup_tc types and
> push out cls_matchall specific code into a separate function.
>
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply
* Re: [PATCH net-next v2 3/3] net: dsa: remove useless args of dsa_slave_create
From: Florian Fainelli @ 2017-08-06 17:46 UTC (permalink / raw)
To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170805202019.1679-4-vivien.didelot@savoirfairelinux.com>
On 08/05/2017 01:20 PM, Vivien Didelot wrote:
> dsa_slave_create currently takes 4 arguments while it only needs the
> related dsa_port and its name. Remove all other arguments.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply
* Re: [PATCH net-next v2 2/3] net: dsa: remove useless args of dsa_cpu_dsa_setup
From: Florian Fainelli @ 2017-08-06 17:45 UTC (permalink / raw)
To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170805202019.1679-3-vivien.didelot@savoirfairelinux.com>
On 08/05/2017 01:20 PM, Vivien Didelot wrote:
> dsa_cpu_dsa_setup currently takes 4 arguments but they are all available
> from the dsa_port argument. Remove all others.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply
* Re: [PATCH net-next v2 1/3] net: dsa: remove useless argument in legacy setup
From: Florian Fainelli @ 2017-08-06 17:44 UTC (permalink / raw)
To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170805202019.1679-2-vivien.didelot@savoirfairelinux.com>
On 08/05/2017 01:20 PM, Vivien Didelot wrote:
> dsa_switch_alloc() already assigns ds-dev, which can be used in
> dsa_switch_setup_one and dsa_cpu_dsa_setups instead of requiring an
> additional struct device argument.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply
* NULL pointer deref bring up interfaces
From: Rafael Cepeda @ 2017-08-06 17:29 UTC (permalink / raw)
To: netdev
Just upgraded to 4.13rc2, rebooted, and my system crashed at my
netmount init script; says RIP is NULL, I am guessing a bad func call.
I immediately thought missing firmware in kernel, my kernel builds
firmware in it, so I upgraded my firmware to latest on git.kernel and
made sure I had no warnings in dmesg about missing firmware. Still, I
receive this NULL pointer in the IP. If I disable my netmount on boot,
I can login, but can not bring up my interfaces, still get a RIP err
in kernel logs and cpu load sky-rockets...the issue still exists on
rc3.
Linux-Regression-ID: lr#084be9
I am willing to help and provide as much info as possible, thank you.
^ permalink raw reply
* [PATCH] isdn: kcapi: make capi_version const
From: Bhumika Goyal @ 2017-08-06 17:09 UTC (permalink / raw)
To: julia.lawall, isdn, netdev, linux-kernel; +Cc: Bhumika Goyal
Declare this structure as const as it is only used during a copy
operation.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
drivers/isdn/capi/kcapi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c
index 9ca691d..46c189a 100644
--- a/drivers/isdn/capi/kcapi.c
+++ b/drivers/isdn/capi/kcapi.c
@@ -55,7 +55,7 @@ struct capictr_event {
/* ------------------------------------------------------------- */
-static struct capi_version driver_version = {2, 0, 1, 1 << 4};
+static const struct capi_version driver_version = {2, 0, 1, 1 << 4};
static char driver_serial[CAPI_SERIAL_LEN] = "0004711";
static char capi_manufakturer[64] = "AVM Berlin";
--
1.9.1
^ permalink raw reply related
* Re: [PATCH] tcp_input: move out condition check from tcp_data_queue()
From: Eric Dumazet @ 2017-08-06 17:07 UTC (permalink / raw)
To: Ilya Matveychikov; +Cc: netdev
In-Reply-To: <674DB789-9B28-4A9C-A0BF-D91023CB86F3@gmail.com>
On Sun, 2017-08-06 at 13:51 +0400, Ilya Matveychikov wrote:
> As tcp_data_queue() function is used just only twice it's better
> to move out the first check and wrap it with inline. It saves a
> single call in case the condition evaluated as true.
>
> Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com>
> ---
> net/ipv4/tcp_input.c | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 2920e0c..141a722 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -4585,16 +4585,12 @@ int tcp_send_rcvq(struct sock *sk, struct msghdr *msg, size_t size)
>
> }
>
> -static void tcp_data_queue(struct sock *sk, struct sk_buff *skb)
> +static void __tcp_data_queue(struct sock *sk, struct sk_buff *skb)
> {
> struct tcp_sock *tp = tcp_sk(sk);
> bool fragstolen = false;
> int eaten = -1;
>
> - if (TCP_SKB_CB(skb)->seq == TCP_SKB_CB(skb)->end_seq) {
> - __kfree_skb(skb);
> - return;
> - }
> skb_dst_drop(skb);
> __skb_pull(skb, tcp_hdr(skb)->doff * 4);
>
> @@ -4703,6 +4699,14 @@ static void tcp_data_queue(struct sock *sk, struct sk_buff *skb)
> tcp_data_queue_ofo(sk, skb);
> }
>
> +static inline void tcp_data_queue(struct sock *sk, struct sk_buff *skb)
> +{
> + if (TCP_SKB_CB(skb)->seq == TCP_SKB_CB(skb)->end_seq)
> + __kfree_skb(skb);
> + else
> + __tcp_data_queue(sk, skb);
> +}
> +
We wont accept such a change, because this code does not need to be
inlined in the callers, ( and btw inline in .c files are discouraged
these days )
^ permalink raw reply
* [PATCH v06 35/36] uapi linux/tls.h: don't include <net/tcp.h> in user space
From: Mikko Rapeli @ 2017-08-06 16:44 UTC (permalink / raw)
To: linux-kernel, linux-api
Cc: Mikko Rapeli, Dave Watson, Ilya Lesokhin, Aviad Yehezkel, netdev
In-Reply-To: <20170806164428.2273-1-mikko.rapeli@iki.fi>
It is not needed and not part of uapi headers, but causes
user space compilation error:
fatal error: net/tcp.h: No such file or directory
#include <net/tcp.h>
^
Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Cc: Dave Watson <davejwatson@fb.com>
Cc: Ilya Lesokhin <ilyal@mellanox.com>
Cc: Aviad Yehezkel <aviadye@mellanox.com>
---
include/uapi/linux/tls.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/uapi/linux/tls.h b/include/uapi/linux/tls.h
index cc1d21db35d8..d87c698623f2 100644
--- a/include/uapi/linux/tls.h
+++ b/include/uapi/linux/tls.h
@@ -37,7 +37,9 @@
#include <asm/byteorder.h>
#include <linux/socket.h>
#include <linux/tcp.h>
+#ifdef __KERNEL__
#include <net/tcp.h>
+#endif
/* TLS socket options */
#define TLS_TX 1 /* Set transmit parameters */
--
2.13.3
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox