mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andre Noll <maan@tuebingen.mpg.de>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Jiri Slaby <jslaby@suse.cz>, Eric Dumazet <edumazet@google.com>,
	Yibin Yang <yibyang@cisco.com>,
	Alexander Duyck <alexander.h.duyck@intel.com>,
	Willem de Bruijn <willemb@google.com>,
	Alexei Starovoitov <ast@kernel.org>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: Linux 4.4.34
Date: Tue, 22 Nov 2016 17:59:12 +0100	[thread overview]
Message-ID: <20161122165912.GA19939@tuebingen.mpg.de> (raw)
In-Reply-To: <20161121092855.GA20976@kroah.com>

[-- Attachment #1: Type: text/plain, Size: 2221 bytes --]

On Mon, Nov 21, 10:28, Greg KH wrote
> I'm announcing the release of the 4.4.34 kernel.
> 
> All users of the 4.4 kernel series must upgrade.

This update broke PXE boot on our 4-way AMD boxes. The kernel panics in
eth_type_trans(), presumably during kernel-level IP autoconfiguration,
see [1]. Bisection points me at 5c67f947 (net: __skb_flow_dissect()
must cap its return value). And indeed, reverting this commit fixes
the problem for me.

Investigation showed that the real problem is not the change in the
above commit per se (i.e., capping ->thoff) but the fact that in the
success case, where we jump to the "out_good" label, ->thoff is now
set *after* ->n_proto and ->ip_proto. I fail to see how order matters
here, but it clearly does, since the crash is 100% reproducible,
and is fixed by the commit below (on top of v4.4.34).

Please consider applying something like the patch below for mainline
and -stable.

Thanks
Andre

[1] http://people.tuebingen.mpg.de/maan/.eth_type_trans_panic.png
---
commit 3494d99764da2b7bbac5d0eed364d03552fefd36
Author: Andre Noll <maan@tuebingen.mpg.de>
Date:   Tue Nov 22 11:34:11 2016 +0100

    net: __skb_flow_dissect() must set ->thoff *after* ->n_proto and ->ip_proto
    
    Without this, PXE boot fails on some AMD Opteron machines.
    
    Signed-off-by: Andre Noll <maan@tuebingen.mpg.de>

diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 9aba9e9..fde26e4 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -491,18 +491,17 @@ ip_proto_again:
 
 out_good:
 	ret = true;
-
-	key_control->thoff = (u16)nhoff;
+	goto out;
+out_bad:
+	ret = false;
 out:
 	key_basic->n_proto = proto;
 	key_basic->ip_proto = ip_proto;
-
+	if (ret)
+		key_control->thoff = (u16)nhoff;
+	else
+		key_control->thoff = min_t(u16, nhoff, skb ? skb->len : hlen);
 	return ret;
-
-out_bad:
-	ret = false;
-	key_control->thoff = min_t(u16, nhoff, skb ? skb->len : hlen);
-	goto out;
 }
 EXPORT_SYMBOL(__skb_flow_dissect);
-- 
Max Planck Institute for Developmental Biology
Spemannstraße 35, 72076 Tübingen, Germany. Phone: (+49) 7071 601 829
http://people.tuebingen.mpg.de/maan/

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  parent reply	other threads:[~2016-11-22 18:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-21  9:28 Greg KH
2016-11-21  9:28 ` Greg KH
2016-11-22 16:59 ` Andre Noll [this message]
2016-11-22 17:06   ` Greg KH
2016-11-22 17:14     ` Eric Dumazet
2016-11-22 17:38       ` Andre Noll
2016-11-22 17:41       ` Duyck, Alexander H
2016-11-22 17:46         ` Eric Dumazet
2016-11-22 17:55           ` Andre Noll
2016-11-22 17:56             ` Eric Dumazet
2016-11-22 18:03               ` Duyck, Alexander H
2016-11-22 18:06               ` Andre Noll
2016-11-22 18:08                 ` Duyck, Alexander H
2016-11-22 18:18                   ` Eric Dumazet
2016-11-22 18:22                   ` Andre Noll
2016-11-22 19:17                     ` [PATCH net] flow_dissect: call init_default_flow_dissectors() earlier Eric Dumazet
2016-11-22 19:44                       ` Andre Noll
2016-11-22 19:44                       ` David Miller
2016-11-22 17:22     ` Linux 4.4.34 Andre Noll
2016-11-22 17:26       ` Eric Dumazet
2016-11-22 17:29       ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161122165912.GA19939@tuebingen.mpg.de \
    --to=maan@tuebingen.mpg.de \
    --cc=alexander.h.duyck@intel.com \
    --cc=ast@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=willemb@google.com \
    --cc=yibyang@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®