2019-05-19 13:08:20 +01:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2012-05-03 22:55:24 +00:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-02 08:35:14 +01:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-24 17:04:11 +09:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2012-02-13 03:58:52 +00:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2014-11-07 21:22:25 +08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
2016-07-15 03:46:31 -04:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2014-12-16 15:05:10 +02:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
|
|
|
|
|
2015-04-24 14:50:36 +02:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2015-04-24 14:50:36 +02:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2015-04-24 14:50:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2015-04-24 14:50:36 +02:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2015-04-24 14:50:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2015-04-24 14:50:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2015-04-24 14:50:36 +02:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2015-04-24 14:50:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2015-04-24 14:50:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2015-04-24 14:50:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2015-04-24 14:50:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-23 17:24:15 +02:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2015-04-24 14:24:48 +02:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
|
|
|
|
|
2015-04-24 14:24:48 +02:00
|
|
|
|
2014-11-23 17:24:15 +02:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2014-11-23 17:24:15 +02:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2014-11-23 17:24:15 +02:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2014-11-23 17:24:15 +02:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2014-11-23 17:24:15 +02:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:48 -08:00
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
2017-02-10 16:03:48 -08:00
|
|
|
|
|
|
|
|
|
2017-07-10 10:05:50 -07:00
|
|
|
|
2017-02-10 16:03:48 -08:00
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
|
|
|
|
|
2011-10-20 04:29:24 +00:00
|
|
|
|
2011-07-06 12:26:11 +00:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-02-18 05:46:50 +00:00
|
|
|
|
2013-06-25 16:04:21 -04:00
|
|
|
|
2015-10-23 00:57:05 -04:00
|
|
|
|
2013-08-16 15:25:00 -04:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-12-11 13:27:10 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-02-18 05:45:36 +00:00
|
|
|
|
2013-06-25 16:04:19 -04:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-02-18 05:45:36 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2010-02-18 05:45:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-25 16:04:19 -04:00
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-22 16:34:17 -04:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2014-09-22 16:34:17 -04:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
2010-02-18 05:45:36 +00:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
2010-02-18 05:45:36 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
2010-08-04 06:15:59 +00:00
|
|
|
|
2014-09-22 16:34:17 -04:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
2013-06-25 16:04:19 -04:00
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-25 16:04:19 -04:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2010-02-18 05:45:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2013-06-25 16:04:19 -04:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-25 16:04:19 -04:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2013-06-05 23:54:38 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
2010-02-18 05:45:36 +00:00
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2013-06-25 16:04:19 -04:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-04 06:15:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE()
Please do not apply this to mainline directly, instead please re-run the
coccinelle script shown below and apply its output.
For several reasons, it is desirable to use {READ,WRITE}_ONCE() in
preference to ACCESS_ONCE(), and new code is expected to use one of the
former. So far, there's been no reason to change most existing uses of
ACCESS_ONCE(), as these aren't harmful, and changing them results in
churn.
However, for some features, the read/write distinction is critical to
correct operation. To distinguish these cases, separate read/write
accessors must be used. This patch migrates (most) remaining
ACCESS_ONCE() instances to {READ,WRITE}_ONCE(), using the following
coccinelle script:
----
// Convert trivial ACCESS_ONCE() uses to equivalent READ_ONCE() and
// WRITE_ONCE()
// $ make coccicheck COCCI=/home/mark/once.cocci SPFLAGS="--include-headers" MODE=patch
virtual patch
@ depends on patch @
expression E1, E2;
@@
- ACCESS_ONCE(E1) = E2
+ WRITE_ONCE(E1, E2)
@ depends on patch @
expression E;
@@
- ACCESS_ONCE(E)
+ READ_ONCE(E)
----
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: davem@davemloft.net
Cc: linux-arch@vger.kernel.org
Cc: mpe@ellerman.id.au
Cc: shuah@kernel.org
Cc: snitzer@redhat.com
Cc: thor.thayer@linux.intel.com
Cc: tj@kernel.org
Cc: viro@zeniv.linux.org.uk
Cc: will.deacon@arm.com
Link: http://lkml.kernel.org/r/1508792849-3115-19-git-send-email-paulmck@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-10-23 14:07:29 -07:00
|
|
|
|
2010-08-04 06:15:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-15 03:46:30 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-11-23 22:17:14 +00:00
|
|
|
|
2013-12-15 22:12:06 -08:00
|
|
|
|
2011-11-23 22:17:14 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-05 23:54:38 +00:00
|
|
|
|
2011-11-23 22:17:14 +00:00
|
|
|
|
|
|
|
|
|
2010-08-04 06:15:59 +00:00
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2010-08-04 06:15:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-05 23:54:38 +00:00
|
|
|
|
2010-08-04 06:15:59 +00:00
|
|
|
|
|
|
|
|
|
2016-07-15 03:46:30 -04:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2010-08-04 06:15:59 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2010-02-18 05:45:36 +00:00
|
|
|
|
|
|
|
|
|
2010-08-04 06:15:59 +00:00
|
|
|
|
|
|
|
|
|
2010-02-18 05:45:36 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-02-18 05:45:36 +00:00
|
|
|
|
2013-06-25 16:04:19 -04:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
2015-06-19 19:47:53 +05:30
|
|
|
|
2010-02-11 05:55:39 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:51 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2013-12-11 13:27:10 -05:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2013-08-16 15:25:00 -04:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
2013-12-11 13:27:10 -05:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2013-12-11 13:27:10 -05:00
|
|
|
|
2010-07-21 21:44:31 +00:00
|
|
|
|
2013-12-11 13:27:10 -05:00
|
|
|
|
|
|
|
|
|
2013-06-25 16:04:22 -04:00
|
|
|
|
2013-08-16 15:25:02 -04:00
|
|
|
|
|
|
|
|
|
2013-06-25 16:04:22 -04:00
|
|
|
|
2013-08-16 15:25:02 -04:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2015-04-17 15:45:04 +02:00
|
|
|
|
2013-06-25 16:04:22 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-04 11:14:27 +08:00
|
|
|
|
2016-07-15 03:46:31 -04:00
|
|
|
|
2013-06-25 16:04:22 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-06 05:58:21 -07:00
|
|
|
|
2013-06-25 16:04:22 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-04 11:14:27 +08:00
|
|
|
|
2016-07-15 03:46:31 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-25 16:04:22 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-29 10:09:50 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:46 -08:00
|
|
|
|
2014-04-29 10:09:50 -04:00
|
|
|
|
|
|
|
|
|
2015-12-14 11:19:43 -08:00
|
|
|
|
2014-04-29 10:09:50 -04:00
|
|
|
|
|
|
|
|
|
2018-01-04 11:14:27 +08:00
|
|
|
|
2016-07-15 03:46:31 -04:00
|
|
|
|
2013-06-25 16:04:22 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-11 14:34:03 -08:00
|
|
|
|
2013-12-11 13:27:10 -05:00
|
|
|
|
2010-07-21 21:44:31 +00:00
|
|
|
|
|
|
|
|
|
2013-12-11 13:27:10 -05:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
2010-07-21 21:44:31 +00:00
|
|
|
|
2013-12-11 13:27:10 -05:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:51 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-10-20 04:29:24 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-10-20 04:29:24 +00:00
|
|
|
|
2017-07-10 10:05:50 -07:00
|
|
|
|
|
|
|
|
|
2013-02-27 17:04:34 -08:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-02-27 17:04:34 -08:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2011-10-20 04:29:24 +00:00
|
|
|
|
|
|
|
|
|
2017-07-10 10:05:50 -07:00
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-27 17:04:34 -08:00
|
|
|
|
2011-10-20 04:29:24 +00:00
|
|
|
|
2017-02-10 16:03:51 -08:00
|
|
|
|
2011-10-20 04:29:24 +00:00
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
2011-10-20 04:29:24 +00:00
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-10 10:05:50 -07:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2011-10-20 04:29:24 +00:00
|
|
|
|
2017-07-10 10:05:50 -07:00
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-10-20 04:29:24 +00:00
|
|
|
|
2017-02-10 16:03:51 -08:00
|
|
|
|
2011-10-20 04:29:24 +00:00
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
2011-10-20 04:29:24 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
2011-10-20 04:29:24 +00:00
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-10 10:05:50 -07:00
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
2011-10-20 04:29:24 +00:00
|
|
|
|
|
|
|
|
|
2017-07-10 10:05:50 -07:00
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2011-10-20 04:29:24 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2010-04-29 11:01:49 +00:00
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2015-11-29 20:03:10 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2010-04-29 11:01:49 +00:00
|
|
|
|
|
|
|
|
|
2018-02-11 14:34:03 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2011-10-20 04:27:24 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2016-07-15 03:46:31 -04:00
|
|
|
|
2018-01-04 11:14:27 +08:00
|
|
|
|
2011-10-20 04:27:24 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2014-09-22 16:34:17 -04:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2014-09-22 16:34:17 -04:00
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2016-07-15 03:46:31 -04:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2016-07-15 03:46:31 -04:00
|
|
|
|
2018-01-04 11:14:27 +08:00
|
|
|
|
2017-10-25 00:23:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2019-07-05 20:14:16 +01:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2010-02-18 05:46:50 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
|
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
2010-04-29 13:50:48 +03:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2011-07-06 12:26:11 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2011-07-06 12:26:11 +00:00
|
|
|
|
2011-10-20 04:26:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-06 12:26:11 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2011-10-20 04:26:39 +00:00
|
|
|
|
2011-07-06 12:26:11 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2017-10-25 00:23:04 -07:00
|
|
|
|
2018-01-04 11:14:27 +08:00
|
|
|
|
2017-10-25 00:23:04 -07:00
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2016-07-15 03:46:31 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-25 00:23:04 -07:00
|
|
|
|
2016-07-15 03:46:31 -04:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2014-09-22 16:34:17 -04:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-03 06:39:46 -04:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2018-02-11 14:34:03 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-05 20:14:16 +01:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2018-01-04 11:14:27 +08:00
|
|
|
|
2018-02-11 14:34:03 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2015-11-29 20:03:10 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2018-02-11 14:34:03 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
|
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-08 14:38:47 -07:00
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-27 18:35:35 -08:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2015-02-27 18:35:35 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2018-09-12 11:17:06 +08:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2014-06-19 15:36:49 -04:00
|
|
|
|
2011-07-06 12:26:11 +00:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
|
|
|
|
|
2012-05-02 11:42:15 +08:00
|
|
|
|
2015-07-23 16:37:43 +02:00
|
|
|
|
2011-07-06 12:26:11 +00:00
|
|
|
|
2013-07-10 13:43:28 +08:00
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
|
|
|
|
|
2017-02-03 18:20:49 -05:00
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
|
|
|
|
|
2011-03-04 13:49:41 +00:00
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
2011-03-04 13:49:41 +00:00
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
2014-06-19 15:36:49 -04:00
|
|
|
|
2016-11-01 22:09:04 -04:00
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
2014-06-19 15:36:49 -04:00
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2018-09-12 11:17:06 +08:00
|
|
|
|
2014-06-19 15:36:49 -04:00
|
|
|
|
|
|
|
|
|
2014-11-23 17:24:15 +02:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2013-11-13 14:00:40 +08:00
|
|
|
|
|
|
|
|
|
2016-03-08 15:18:54 -05:00
|
|
|
|
|
|
|
|
|
2013-07-10 13:43:28 +08:00
|
|
|
|
2014-06-19 15:36:49 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-18 10:55:16 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-06 12:26:11 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2016-03-08 15:18:54 -05:00
|
|
|
|
2013-11-13 14:00:40 +08:00
|
|
|
|
2016-03-08 15:18:54 -05:00
|
|
|
|
|
|
|
|
|
2013-07-10 13:43:28 +08:00
|
|
|
|
2011-07-06 12:26:11 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
|
|
|
|
|
2010-02-18 05:45:36 +00:00
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2012-05-02 11:42:06 +08:00
|
|
|
|
2014-06-19 15:36:49 -04:00
|
|
|
|
2016-11-30 13:17:52 +08:00
|
|
|
|
2014-06-19 15:36:49 -04:00
|
|
|
|
2013-07-18 10:55:16 +08:00
|
|
|
|
2010-02-18 05:45:36 +00:00
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-08 16:09:19 +03:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
net: Don't set transport offset to invalid value
If the socket was created with socket(AF_PACKET, SOCK_RAW, 0),
skb->protocol will be unset, __skb_flow_dissect() will fail, and
skb_probe_transport_header() will fall back to the offset_hint, making
the resulting skb_transport_offset incorrect.
If, however, there is no transport header in the packet,
transport_header shouldn't be set to an arbitrary value.
Fix it by leaving the transport offset unset if it couldn't be found, to
be explicit rather than to fill it with some wrong value. It changes the
behavior, but if some code relied on the old behavior, it would be
broken anyway, as the old one is incorrect.
Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-21 12:39:57 +00:00
|
|
|
|
2013-03-25 20:19:55 +00:00
|
|
|
|
2015-07-23 16:37:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-25 16:04:20 -04:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2011-07-06 12:26:11 +00:00
|
|
|
|
2012-05-02 11:42:06 +08:00
|
|
|
|
2018-09-12 11:17:06 +08:00
|
|
|
|
2012-05-02 11:42:06 +08:00
|
|
|
|
2013-02-11 09:27:41 +00:00
|
|
|
|
2018-09-12 11:17:06 +08:00
|
|
|
|
|
|
|
|
|
2016-11-30 13:17:52 +08:00
|
|
|
|
2012-05-02 11:42:06 +08:00
|
|
|
|
2016-11-30 13:17:52 +08:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
2013-12-11 13:27:10 -05:00
|
|
|
|
2013-08-08 08:06:14 -07:00
|
|
|
|
2010-02-18 05:45:36 +00:00
|
|
|
|
2013-08-08 08:06:14 -07:00
|
|
|
|
2013-06-25 16:04:20 -04:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2011-07-06 12:26:11 +00:00
|
|
|
|
2010-02-18 05:45:36 +00:00
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-18 05:45:36 +00:00
|
|
|
|
2013-06-25 16:04:20 -04:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-25 16:04:20 -04:00
|
|
|
|
2010-02-18 05:45:36 +00:00
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
2012-05-03 22:55:24 +00:00
|
|
|
|
2014-11-07 21:22:25 +08:00
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
|
|
|
|
|
2018-06-06 11:23:01 -04:00
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
2018-06-06 11:23:01 -04:00
|
|
|
|
2017-02-03 18:20:49 -05:00
|
|
|
|
2014-11-07 21:22:25 +08:00
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
|
|
|
|
|
2016-11-18 15:40:38 -08:00
|
|
|
|
2018-06-06 11:23:01 -04:00
|
|
|
|
|
|
|
|
|
2016-06-08 16:09:19 +03:00
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
2014-11-07 21:22:25 +08:00
|
|
|
|
|
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
2014-11-20 16:31:05 +08:00
|
|
|
|
|
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
2014-11-07 21:22:25 +08:00
|
|
|
|
2013-12-11 13:08:34 +08:00
|
|
|
|
2012-05-03 22:55:24 +00:00
|
|
|
|
2015-01-13 17:13:44 +01:00
|
|
|
|
2012-05-03 22:55:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-16 13:36:34 +08:00
|
|
|
|
2015-01-13 17:13:44 +01:00
|
|
|
|
2012-05-03 22:55:24 +00:00
|
|
|
|
|
|
|
|
|
2013-12-11 13:08:34 +08:00
|
|
|
|
2012-05-03 22:55:24 +00:00
|
|
|
|
2014-11-07 21:22:25 +08:00
|
|
|
|
|
|
|
|
|
2012-05-03 22:55:24 +00:00
|
|
|
|
|
|
|
|
|
2014-11-07 21:22:25 +08:00
|
|
|
|
|
|
|
|
|
2012-05-03 22:55:24 +00:00
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2014-11-07 21:22:25 +08:00
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2012-05-03 22:55:24 +00:00
|
|
|
|
2013-12-11 13:08:34 +08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
|
|
|
|
|
2017-05-17 12:14:44 +08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2012-06-06 22:36:27 +00:00
|
|
|
|
2010-02-18 05:46:50 +00:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-12-01 05:10:38 -05:00
|
|
|
|
2018-09-20 17:37:41 +08:00
|
|
|
|
2014-11-07 14:13:53 -05:00
|
|
|
|
2017-12-01 05:10:38 -05:00
|
|
|
|
2014-11-07 14:13:53 -05:00
|
|
|
|
2017-05-17 12:14:44 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-07 14:13:53 -05:00
|
|
|
|
2013-06-05 23:54:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2018-01-04 11:14:27 +08:00
|
|
|
|
2014-11-07 14:13:53 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2014-11-07 14:13:53 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-09 09:14:17 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-17 12:14:44 +08:00
|
|
|
|
2014-11-07 14:13:53 -05:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2014-12-01 16:53:15 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2010-02-18 05:46:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-02-18 05:46:50 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2014-11-07 14:13:53 -05:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-05-17 12:14:44 +08:00
|
|
|
|
2013-12-11 13:08:34 +08:00
|
|
|
|
2013-12-06 14:16:50 +08:00
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-05 23:54:36 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-05 23:54:36 +00:00
|
|
|
|
2013-06-25 16:04:19 -04:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-05 23:54:36 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-05 23:54:36 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-05 23:54:36 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-05 23:54:36 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2013-06-13 14:23:36 +08:00
|
|
|
|
|
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2013-06-25 16:04:21 -04:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-25 16:04:21 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
2013-06-25 16:04:21 -04:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-25 16:04:21 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2013-06-25 16:04:21 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-03 06:35:32 -07:00
|
|
|
|
2013-06-25 16:04:21 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-25 16:04:21 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-16 15:04:56 +02:00
|
|
|
|
2010-04-29 13:50:48 +03:00
|
|
|
|
2015-05-13 19:19:02 +01:00
|
|
|
|
2010-04-29 13:50:48 +03:00
|
|
|
|
2010-02-18 05:45:36 +00:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-02-18 05:48:17 +00:00
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2013-06-25 16:04:19 -04:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
2013-06-25 16:04:19 -04:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2013-06-25 16:04:19 -04:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2010-02-18 05:45:36 +00:00
|
|
|
|
2014-12-16 15:04:56 +02:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2014-12-16 15:04:56 +02:00
|
|
|
|
2010-02-18 05:45:36 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2013-06-25 16:04:19 -04:00
|
|
|
|
2010-02-18 05:45:36 +00:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-25 16:04:19 -04:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2013-06-25 16:04:19 -04:00
|
|
|
|
2013-07-16 13:36:33 +08:00
|
|
|
|
2013-06-05 23:54:39 +00:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-18 13:41:09 +03:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-10-30 18:50:11 -04:00
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2015-09-18 13:41:09 +03:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2010-04-29 13:50:48 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-16 15:05:10 +02:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2014-12-16 15:05:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2014-12-16 15:05:10 +02:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2014-12-16 15:05:10 +02:00
|
|
|
|
|
|
|
|
|
2015-04-24 14:50:36 +02:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2015-04-24 14:50:36 +02:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2015-04-24 14:50:36 +02:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
net: accept UFO datagrams from tuntap and packet
Tuntap and similar devices can inject GSO packets. Accept type
VIRTIO_NET_HDR_GSO_UDP, even though not generating UFO natively.
Processes are expected to use feature negotiation such as TUNSETOFFLOAD
to detect supported offload types and refrain from injecting other
packets. This process breaks down with live migration: guest kernels
do not renegotiate flags, so destination hosts need to expose all
features that the source host does.
Partially revert the UFO removal from 182e0b6b5846~1..d9d30adf5677.
This patch introduces nearly(*) no new code to simplify verification.
It brings back verbatim tuntap UFO negotiation, VIRTIO_NET_HDR_GSO_UDP
insertion and software UFO segmentation.
It does not reinstate protocol stack support, hardware offload
(NETIF_F_UFO), SKB_GSO_UDP tunneling in SKB_GSO_SOFTWARE or reception
of VIRTIO_NET_HDR_GSO_UDP packets in tuntap.
To support SKB_GSO_UDP reappearing in the stack, also reinstate
logic in act_csum and openvswitch. Achieve equivalence with v4.13 HEAD
by squashing in commit 939912216fa8 ("net: skb_needs_check() removes
CHECKSUM_UNNECESSARY check for tx.") and reverting commit 8d63bee643f1
("net: avoid skb_warn_bad_offload false positives on UFO").
(*) To avoid having to bring back skb_shinfo(skb)->ip6_frag_id,
ipv6_proxy_select_ident is changed to return a __be32 and this is
assigned directly to the frag_hdr. Also, SKB_GSO_UDP is inserted
at the end of the enum to minimize code churn.
Tested
Booted a v4.13 guest kernel with QEMU. On a host kernel before this
patch `ethtool -k eth0` shows UFO disabled. After the patch, it is
enabled, same as on a v4.13 host kernel.
A UFO packet sent from the guest appears on the tap device:
host:
nc -l -p -u 8000 &
tcpdump -n -i tap0
guest:
dd if=/dev/zero of=payload.txt bs=1 count=2000
nc -u 192.16.1.1 8000 < payload.txt
Direct tap to tap transmission of VIRTIO_NET_HDR_GSO_UDP succeeds,
packets arriving fragmented:
./with_tap_pair.sh ./tap_send_ufo tap0 tap1
(from https://github.com/wdebruij/kerneltools/tree/master/tests)
Changes
v1 -> v2
- simplified set_offload change (review comment)
- documented test procedure
Link: http://lkml.kernel.org/r/<CAF=yD-LuUeDuL9YWPJD9ykOZ0QCjNeznPDr6whqZ9NGMNF12Mw@mail.gmail.com>
Fixes: fb652fdfe837 ("macvlan/macvtap: Remove NETIF_F_UFO advertisement.")
Reported-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-21 10:22:25 -05:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2013-06-25 16:04:21 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2015-05-11 20:00:10 +01:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
2015-05-11 20:00:10 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-11 20:00:10 +01:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2015-05-11 20:00:10 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-13 19:19:02 +01:00
|
|
|
|
|
|
|
|
|
2015-05-11 20:00:10 +01:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
|
|
|
|
|
2015-05-11 20:00:10 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-13 11:54:30 +00:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2015-05-11 20:00:10 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-12 22:52:31 +01:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2018-09-11 17:23:00 +02:00
|
|
|
|
2010-01-30 12:24:26 +00:00
|
|
|
|
|
|
|
|
|
2018-09-12 11:17:08 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
net: Don't set transport offset to invalid value
If the socket was created with socket(AF_PACKET, SOCK_RAW, 0),
skb->protocol will be unset, __skb_flow_dissect() will fail, and
skb_probe_transport_header() will fall back to the offset_hint, making
the resulting skb_transport_offset incorrect.
If, however, there is no transport header in the packet,
transport_header shouldn't be set to an arbitrary value.
Fix it by leaving the transport offset unset if it couldn't be found, to
be explicit rather than to fill it with some wrong value. It changes the
behavior, but if some code relied on the old behavior, it would be
broken anyway, as the old one is incorrect.
Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-21 12:39:57 +00:00
|
|
|
|
2018-09-12 11:17:08 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-27 10:40:39 +01:00
|
|
|
|
2018-09-12 11:17:08 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
|
|
|
|
|
2010-02-18 05:46:50 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2018-09-12 11:17:06 +08:00
|
|
|
|
2018-09-12 11:17:08 +08:00
|
|
|
|
|
|
|
|
|
2018-09-12 11:17:06 +08:00
|
|
|
|
2018-09-12 11:17:08 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-12 11:17:06 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-18 05:46:50 +00:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
|
|
|
|
|
2010-02-18 05:46:50 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2017-12-01 05:10:38 -05:00
|
|
|
|
2010-02-18 05:46:50 +00:00
|
|
|
|
2017-12-01 05:10:38 -05:00
|
|
|
|
2018-09-20 17:37:41 +08:00
|
|
|
|
2010-02-18 05:46:50 +00:00
|
|
|
|
2017-12-01 05:10:38 -05:00
|
|
|
|
|
|
|
|
|
2013-12-10 22:06:18 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-18 05:46:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2016-07-15 03:46:31 -04:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2016-07-15 03:46:31 -04:00
|
|
|
|
2018-01-04 11:14:27 +08:00
|
|
|
|
2016-07-15 03:46:31 -04:00
|
|
|
|
|
|
|
|
|
2010-02-18 05:46:50 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-18 05:46:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-02-18 05:46:50 +00:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
|
|
|
|
|
2010-02-18 05:46:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2010-02-18 05:46:50 +00:00
|
|
|
|
2018-01-04 11:14:27 +08:00
|
|
|
|
2017-05-17 12:14:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-04 11:14:27 +08:00
|
|
|
|
2017-05-17 12:14:42 +08:00
|
|
|
|
2018-01-04 11:14:27 +08:00
|
|
|
|
2017-05-17 12:14:42 +08:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2016-07-15 03:46:31 -04:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2017-02-10 16:03:47 -08:00
|
|
|
|
2018-01-04 11:14:27 +08:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2016-07-15 03:46:31 -04:00
|
|
|
|
|
|
|
|
|
2018-01-04 11:14:27 +08:00
|
|
|
|
|
|
|
|
|
2016-07-15 03:46:31 -04:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2018-01-04 11:14:27 +08:00
|
|
|
|
2016-07-15 03:46:31 -04:00
|
|
|
|
2018-01-04 11:14:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-15 03:46:31 -04:00
|
|
|
|
2018-01-04 11:14:27 +08:00
|
|
|
|
2016-07-15 03:46:31 -04:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:51 -08:00
|
|
|
|
2017-02-10 16:03:48 -08:00
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-10 10:05:50 -07:00
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-27 00:00:16 -07:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:48 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-27 00:00:16 -07:00
|
|
|
|
2017-02-10 16:03:48 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:48 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:48 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:51 -08:00
|
|
|
|
2017-02-10 16:03:48 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:48 -08:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:03:48 -08:00
|
|
|
|
2017-02-10 16:03:51 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|