#
bbe83731 |
| 17-Sep-2015 |
David S. Miller <davem@davemloft.net> |
Merge branch 'nf_hook_netns'
Eric W. Biederman says:
==================== Passing net through the netfilter hooks
My primary goal with this patchset and it's follow ups is to cleanup the network r
Merge branch 'nf_hook_netns'
Eric W. Biederman says:
==================== Passing net through the netfilter hooks
My primary goal with this patchset and it's follow ups is to cleanup the network routing paths so that we do not look at the output device to derive the network namespace. My plan is to pass the network namespace of the transmitting socket through the output path, to replace code that looks at the output network device today. Once that is done we can have routes with output devices outside of the current network namespace. Which should allow reception and transmission of packets in network namespaces to be as fast as normal packet reception and transmission with early demux disabled, because it will same code path.
Once skb_dst(skb)->dev is a little better under control I think it will also be possible to use rcu to cleanup the ancient hack that sets dst->dev to loopback_dev when a network device is removed.
The work to get there is a series of code cleanups. I am starting with passing net into the netfilter hooks and into the functions that are called after the netfilter hooks. This removes from netfilter the need to guess which network namespace it is working on.
To get there I perform a series of minor prep patches so the big changes at the end are possible to audit without getting lost in the noise. In particular I have a lot of patches computing net into a local variable and then using it through out the function.
So this patchset encompases removing dead code, sorting out the _sk functions that were added last time someone pushed a prototype change through the post netfilter functions. Cleaning up individual functions use of the network namespace. Passing net into the netfilter hooks. Passing net into the post netfilter functions. Using state->net in the netfilter code where it is available and trivially usable.
Pablo, Dave I don't know whose tree this makes more sense to go through. I am assuming at least initially Pablos as netfilter is involved. From what I have seen there will be a lot of back and forth between the netfilter code paths and the routing code paths.
The patches are also available (against 4.3-rc1) at: git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/net-next.git master ====================
Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
be10de0a |
| 17-Sep-2015 |
Eric W. Biederman <ebiederm@xmission.com> |
netfilter: Add blank lines in callers of netfilter hooks
In code review it was noticed that I had failed to add some blank lines in places where they are customarily used. Taking a second look at t
netfilter: Add blank lines in callers of netfilter hooks
In code review it was noticed that I had failed to add some blank lines in places where they are customarily used. Taking a second look at the code I have to agree blank lines would be nice so I have added them here.
Reported-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
0c4b51f0 |
| 15-Sep-2015 |
Eric W. Biederman <ebiederm@xmission.com> |
netfilter: Pass net into okfn
This is immediately motivated by the bridge code that chains functions that call into netfilter. Without passing net into the okfns the bridge code would need to guess
netfilter: Pass net into okfn
This is immediately motivated by the bridge code that chains functions that call into netfilter. Without passing net into the okfns the bridge code would need to guess about the best expression for the network namespace to process packets in.
As net is frequently one of the first things computed in continuation functions after netfilter has done it's job passing in the desired network namespace is in many cases a code simplification.
To support this change the function dst_output_okfn is introduced to simplify passing dst_output as an okfn. For the moment dst_output_okfn just silently drops the struct net.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
29a26a56 |
| 15-Sep-2015 |
Eric W. Biederman <ebiederm@xmission.com> |
netfilter: Pass struct net into the netfilter hooks
Pass a network namespace parameter into the netfilter hooks. At the call site of the netfilter hooks the path a packet is taking through the netw
netfilter: Pass struct net into the netfilter hooks
Pass a network namespace parameter into the netfilter hooks. At the call site of the netfilter hooks the path a packet is taking through the network stack is well known which allows the network namespace to be easily and reliabily.
This allows the replacement of magic code like "dev_net(state->in?:state->out)" that appears at the start of most netfilter hooks with "state->net".
In almost all cases the network namespace passed in is derived from the first network device passed in, guaranteeing those paths will not see any changes in practice.
The exceptions are: xfrm/xfrm_output.c:xfrm_output_resume() xs_net(skb_dst(skb)->xfrm) ipvs/ip_vs_xmit.c:ip_vs_nat_send_or_cont() ip_vs_conn_net(cp) ipvs/ip_vs_xmit.c:ip_vs_send_or_cont() ip_vs_conn_net(cp) ipv4/raw.c:raw_send_hdrinc() sock_net(sk) ipv6/ip6_output.c:ip6_xmit() sock_net(sk) ipv6/ndisc.c:ndisc_send_skb() dev_net(skb->dev) not dev_net(dst->dev) ipv6/raw.c:raw6_send_hdrinc() sock_net(sk) br_netfilter_hooks.c:br_nf_pre_routing_finish() dev_net(skb->dev) before skb->dev is set to nf_bridge->physindev
In all cases these exceptions seem to be a better expression for the network namespace the packet is being processed in then the historic "dev_net(in?in:out)". I am documenting them in case something odd pops up and someone starts trying to track down what happened.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
5a70649e |
| 15-Sep-2015 |
Eric W. Biederman <ebiederm@xmission.com> |
net: Merge dst_output and dst_output_sk
Add a sock paramter to dst_output making dst_output_sk superfluous. Add a skb->sk parameter to all of the callers of dst_output Have the callers of dst_output
net: Merge dst_output and dst_output_sk
Add a sock paramter to dst_output making dst_output_sk superfluous. Add a skb->sk parameter to all of the callers of dst_output Have the callers of dst_output_sk call dst_output.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v4.3-rc1 |
|
#
01b944fe |
| 03-Sep-2015 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Merge branch 'next' into for-linus
Prepare first round of input updates for 4.3 merge window.
|
Revision tags: v4.2, v4.2-rc8, v4.2-rc7, v4.2-rc6, v4.2-rc5, v4.2-rc4 |
|
#
c57d5621 |
| 20-Jul-2015 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Merge tag 'v4.2-rc3' into next
Sync up with Linux 4.2-rc3 to bring in infrastructure (OF) pieces.
|
Revision tags: v4.2-rc3, v4.2-rc2, v4.2-rc1 |
|
#
ec3b34e1 |
| 22-Jun-2015 |
Jiri Kosina <jkosina@suse.cz> |
Merge branches 'for-4.2/i2c-hid', 'for-4.2/lenovo', 'for-4.2/plantronics', 'for-4.2/rmi', 'for-4.2/sensor-hub', 'for-4.2/sjoy', 'for-4.2/sony' and 'for-4.2/wacom' into for-linus
Conflicts: drivers/
Merge branches 'for-4.2/i2c-hid', 'for-4.2/lenovo', 'for-4.2/plantronics', 'for-4.2/rmi', 'for-4.2/sensor-hub', 'for-4.2/sjoy', 'for-4.2/sony' and 'for-4.2/wacom' into for-linus
Conflicts: drivers/hid/wacom_wac.c
show more ...
|
Revision tags: v4.1, v4.1-rc8 |
|
#
6724af48 |
| 09-Jun-2015 |
Mark Brown <broonie@kernel.org> |
Merge branch 'fix/fsl-dspi' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-fsl-dspi
|
Revision tags: v4.1-rc7, v4.1-rc6, v4.1-rc5, v4.1-rc4, v4.1-rc3 |
|
#
7ae383be |
| 08-May-2015 |
Ingo Molnar <mingo@kernel.org> |
Merge branch 'linus' into x86/asm, before applying dependent patch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
|
Revision tags: v4.1-rc2 |
|
#
b3e5ced6 |
| 27-Apr-2015 |
Mauro Carvalho Chehab <mchehab@osg.samsung.com> |
Merge tag 'v4.1-rc1' into patchwork
Linux 4.1-rc1
* tag 'v4.1-rc1': (11651 commits) Linux 4.1-rc1 x86_64, asm: Work around AMD SYSRET SS descriptor attribute issue v4l: xilinx: fix for includ
Merge tag 'v4.1-rc1' into patchwork
Linux 4.1-rc1
* tag 'v4.1-rc1': (11651 commits) Linux 4.1-rc1 x86_64, asm: Work around AMD SYSRET SS descriptor attribute issue v4l: xilinx: fix for include file movement platform/chrome: chromeos_laptop - instantiate Atmel at primary address RCU pathwalk breakage when running into a symlink overmounting something fix I_DIO_WAKEUP definition direct-io: only inc/dec inode->i_dio_count for file systems fs/9p: fix readdir() Btrfs: prevent list corruption during free space cache processing toshiba_acpi: Do not register vendor backlight when acpi_video bl is available x86: fix special __probe_kernel_write() tail zeroing case crypto: img-hash - CRYPTO_DEV_IMGTEC_HASH should depend on HAS_DMA crypto: x86/sha512_ssse3 - fixup for asm function prototype change nios2: rework cache nios2: Add types.h header required for __u32 type ALSA: hda - fix headset mic detection problem for one more machine eth: bf609 eth clock: add pclk clock for stmmac driver probe blackfin: Wire up missing syscalls Btrfs: fix inode cache writeout ACPI / scan: Add a scan handler for PRP0001 ...
show more ...
|
Revision tags: v4.1-rc1 |
|
#
f139b6c6 |
| 23-Apr-2015 |
Trond Myklebust <trond.myklebust@primarydata.com> |
Merge tag 'nfs-rdma-for-4.1-1' of git://git.linux-nfs.org/projects/anna/nfs-rdma
NFS: NFSoRDMA Client Changes
This patch series creates an operation vector for each of the different memory registra
Merge tag 'nfs-rdma-for-4.1-1' of git://git.linux-nfs.org/projects/anna/nfs-rdma
NFS: NFSoRDMA Client Changes
This patch series creates an operation vector for each of the different memory registration modes. This should make it easier to one day increase credit limit, rsize, and wsize.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
show more ...
|
#
64131a87 |
| 21-Apr-2015 |
Mauro Carvalho Chehab <mchehab@osg.samsung.com> |
Merge branch 'drm-next-merged' of git://people.freedesktop.org/~airlied/linux into v4l_for_linus
* 'drm-next-merged' of git://people.freedesktop.org/~airlied/linux: (9717 commits) media-bus: Fixup
Merge branch 'drm-next-merged' of git://people.freedesktop.org/~airlied/linux into v4l_for_linus
* 'drm-next-merged' of git://people.freedesktop.org/~airlied/linux: (9717 commits) media-bus: Fixup RGB444_1X12, RGB565_1X16, and YUV8_1X24 media bus format hexdump: avoid warning in test function fs: take i_mutex during prepare_binprm for set[ug]id executables smp: Fix error case handling in smp_call_function_*() iommu-common: Fix PARISC compile-time warnings sparc: Make LDC use common iommu poll management functions sparc: Make sparc64 use scalable lib/iommu-common.c functions Break up monolithic iommu table/lock into finer graularity pools and lock sparc: Revert generic IOMMU allocator. tools/power turbostat: correct dumped pkg-cstate-limit value tools/power turbostat: calculate TSC frequency from CPUID(0x15) on SKL tools/power turbostat: correct DRAM RAPL units on recent Xeon processors tools/power turbostat: Initial Skylake support tools/power turbostat: Use $(CURDIR) instead of $(PWD) and add support for O= option in Makefile tools/power turbostat: modprobe msr, if needed tools/power turbostat: dump MSR_TURBO_RATIO_LIMIT2 tools/power turbostat: use new MSR_TURBO_RATIO_LIMIT names Bluetooth: hidp: Fix regression with older userspace and flags validation config: Enable NEED_DMA_MAP_STATE by default when SWIOTLB is selected perf/x86/intel/pt: Fix and clean up error handling in pt_event_add() ...
That solves several merge conflicts: Documentation/DocBook/media/v4l/subdev-formats.xml Documentation/devicetree/bindings/vendor-prefixes.txt drivers/staging/media/mn88473/mn88473.c include/linux/kconfig.h include/uapi/linux/media-bus-format.h
The ones at subdev-formats.xml and media-bus-format.h are not trivial. That's why we opted to merge from DRM.
show more ...
|
#
2c33ce00 |
| 19-Apr-2015 |
Dave Airlie <airlied@redhat.com> |
Merge Linus master into drm-next
The merge is clean, but the arm build fails afterwards, due to API changes in the regulator tree.
I've included the patch into the merge to fix the build.
Signed-o
Merge Linus master into drm-next
The merge is clean, but the arm build fails afterwards, due to API changes in the regulator tree.
I've included the patch into the merge to fix the build.
Signed-off-by: Dave Airlie <airlied@redhat.com>
show more ...
|
#
6c373ca8 |
| 15-Apr-2015 |
Linus Torvalds <torvalds@linux-foundation.org> |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller:
1) Add BQL support to via-rhine, from Tino Reichardt.
2) Integrate SWITCHDEV layer s
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller:
1) Add BQL support to via-rhine, from Tino Reichardt.
2) Integrate SWITCHDEV layer support into the DSA layer, so DSA drivers can support hw switch offloading. From Floria Fainelli.
3) Allow 'ip address' commands to initiate multicast group join/leave, from Madhu Challa.
4) Many ipv4 FIB lookup optimizations from Alexander Duyck.
5) Support EBPF in cls_bpf classifier and act_bpf action, from Daniel Borkmann.
6) Remove the ugly compat support in ARP for ugly layers like ax25, rose, etc. And use this to clean up the neigh layer, then use it to implement MPLS support. All from Eric Biederman.
7) Support L3 forwarding offloading in switches, from Scott Feldman.
8) Collapse the LOCAL and MAIN ipv4 FIB tables when possible, to speed up route lookups even further. From Alexander Duyck.
9) Many improvements and bug fixes to the rhashtable implementation, from Herbert Xu and Thomas Graf. In particular, in the case where an rhashtable user bulk adds a large number of items into an empty table, we expand the table much more sanely.
10) Don't make the tcp_metrics hash table per-namespace, from Eric Biederman.
11) Extend EBPF to access SKB fields, from Alexei Starovoitov.
12) Split out new connection request sockets so that they can be established in the main hash table. Much less false sharing since hash lookups go direct to the request sockets instead of having to go first to the listener then to the request socks hashed underneath. From Eric Dumazet.
13) Add async I/O support for crytpo AF_ALG sockets, from Tadeusz Struk.
14) Support stable privacy address generation for RFC7217 in IPV6. From Hannes Frederic Sowa.
15) Hash network namespace into IP frag IDs, also from Hannes Frederic Sowa.
16) Convert PTP get/set methods to use 64-bit time, from Richard Cochran.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1816 commits) fm10k: Bump driver version to 0.15.2 fm10k: corrected VF multicast update fm10k: mbx_update_max_size does not drop all oversized messages fm10k: reset head instead of calling update_max_size fm10k: renamed mbx_tx_dropped to mbx_tx_oversized fm10k: update xcast mode before synchronizing multicast addresses fm10k: start service timer on probe fm10k: fix function header comment fm10k: comment next_vf_mbx flow fm10k: don't handle mailbox events in iov_event path and always process mailbox fm10k: use separate workqueue for fm10k driver fm10k: Set PF queues to unlimited bandwidth during virtualization fm10k: expose tx_timeout_count as an ethtool stat fm10k: only increment tx_timeout_count in Tx hang path fm10k: remove extraneous "Reset interface" message fm10k: separate PF only stats so that VF does not display them fm10k: use hw->mac.max_queues for stats fm10k: only show actual queues, not the maximum in hardware fm10k: allow creation of VLAN on default vid fm10k: fix unused warnings ...
show more ...
|
#
85a36858 |
| 14-Apr-2015 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Merge branch 'next' into for-linus
Prepare first round of input updates for 4.1 merge window.
|
#
7ead5b7e |
| 13-Apr-2015 |
Chris Zankel <chris@zankel.net> |
Merge tag 'v4.0' into for_next
Linux 4.0
|
Revision tags: v4.0 |
|
#
95a9ca74 |
| 09-Apr-2015 |
Mark Brown <broonie@kernel.org> |
Merge tag 'v4.0-rc7' into asoc-core
Linux 4.0-rc7
|
#
462b69b1 |
| 08-Apr-2015 |
Thomas Gleixner <tglx@linutronix.de> |
Merge branch 'linus' into irq/core to get the GIC updates which conflict with pending GIC changes.
Conflicts: drivers/usb/isp1760/isp1760-core.c
|
#
89cda06d |
| 08-Apr-2015 |
Mark Brown <broonie@kernel.org> |
Merge tag 'v4.0-rc7' into spi-img-spfi
Linux 4.0-rc7
|
#
aadd51aa |
| 08-Apr-2015 |
Pablo Neira Ayuso <pablo@netfilter.org> |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Resolve conflicts between 5888b93 ("Merge branch 'nf-hook-compress'") and Florian Westphal br_netfilter works.
Conflicts:
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Resolve conflicts between 5888b93 ("Merge branch 'nf-hook-compress'") and Florian Westphal br_netfilter works.
Conflicts: net/bridge/br_netfilter.c
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
show more ...
|
#
e0e8db2f |
| 07-Apr-2015 |
David S. Miller <davem@davemloft.net> |
Merge branch 'udp_tunnel_sk'
Prevent UDP tunnels from operating on garbage socket
So this should do the rest of the work such that when we encapsulate into a UDP tunnel, the output path works on th
Merge branch 'udp_tunnel_sk'
Prevent UDP tunnels from operating on garbage socket
So this should do the rest of the work such that when we encapsulate into a UDP tunnel, the output path works on the UDP tunnel's socket rather than skb->sk.
Part of this work is based upon changes done by Jiri Pirko some time ago.
Basically the first step is to pass the socket through the nf_hook okfn(), and then next we do the same for the UDP tunnel xmit routines.
Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v4.0-rc7 |
|
#
7026b1dd |
| 05-Apr-2015 |
David Miller <davem@davemloft.net> |
netfilter: Pass socket pointer down through okfn().
On the output paths in particular, we have to sometimes deal with two socket contexts. First, and usually skb->sk, is the local socket that gener
netfilter: Pass socket pointer down through okfn().
On the output paths in particular, we have to sometimes deal with two socket contexts. First, and usually skb->sk, is the local socket that generated the frame.
And second, is potentially the socket used to control a tunneling socket, such as one the encapsulates using UDP.
We do not want to disassociate skb->sk when encapsulating in order to fix this, because that would break socket memory accounting.
The most extreme case where this can cause huge problems is an AF_PACKET socket transmitting over a vxlan device. We hit code paths doing checks that assume they are dealing with an ipv4 socket, but are actually operating upon the AF_PACKET one.
Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
9e87e48f |
| 31-Mar-2015 |
Dave Airlie <airlied@redhat.com> |
Merge tag 'drm-intel-next-2015-03-27-merge' of git://anongit.freedesktop.org/drm-intel into drm-next
This backmerges 4.0-rc6 due to the recent fixes in rc5/6
- DP link rate refactoring from Ville -
Merge tag 'drm-intel-next-2015-03-27-merge' of git://anongit.freedesktop.org/drm-intel into drm-next
This backmerges 4.0-rc6 due to the recent fixes in rc5/6
- DP link rate refactoring from Ville - byt/bsw rps tuning from Chris - kerneldoc for the shrinker code - more dynamic ppgtt pte work (Michel, Ben, ...) - vlv dpll code refactoring to prep fro bxt (Imre) - refactoring the sprite colorkey code (Ville) - rotated ggtt view support from Tvrtko - roll out struct drm_atomic_state to prep for atomic update (Ander)
* tag 'drm-intel-next-2015-03-27-merge' of git://anongit.freedesktop.org/drm-intel: (473 commits) Linux 4.0-rc6 arm64: juno: Fix misleading name of UART reference clock drm/i915: Update DRIVER_DATE to 20150327 drm/i915: Skip allocating shadow batch for 0-length batches drm/i915: Handle error to get connector state when staging config drm/i915: Compare GGTT view structs instead of types drm/i915: fix simple_return.cocci warnings drm/i915: Add module param to test the load detect code drm/i915: Remove usage of encoder->new_crtc from clock computations drm/i915: Don't look at staged config crtc when changing DRRS state drm/i915: Convert intel_pipe_will_have_type() to using atomic state drm/i915: Pass an atomic state to modeset_global_resources() functions drm/i915: Add dynamic page trace events drm/i915: Finish gen6/7 dynamic page table allocation drm/i915: Remove unnecessary gen6_ppgtt_unmap_pages drm/i915: Fix i915_dma_map_single positive error code drm/i915: Prevent out of range pt in gen6_for_each_pde drm/i915: fix definition of the DRM_IOCTL_I915_GET_SPRITE_COLORKEY ioctl drm/i915: Rip out GET_SPRITE_COLORKEY ioctl watchdog: imgpdc: Fix default heartbeat ...
show more ...
|
#
c5e77f52 |
| 31-Mar-2015 |
Ingo Molnar <mingo@kernel.org> |
Merge tag 'v4.0-rc6' into timers/core, before applying new patches
Signed-off-by: Ingo Molnar <mingo@kernel.org>
|