twx-linux/include
Paul Moore 04f81f0154 cipso: don't use IPCB() to locate the CIPSO IP option
Using the IPCB() macro to get the IPv4 options is convenient, but
unfortunately NetLabel often needs to examine the CIPSO option outside
of the scope of the IP layer in the stack.  While historically IPCB()
worked above the IP layer, due to the inclusion of the inet_skb_param
struct at the head of the {tcp,udp}_skb_cb structs, recent commit
971f10ec ("tcp: better TCP_SKB_CB layout to reduce cache line misses")
reordered the tcp_skb_cb struct and invalidated this IPCB() trick.

This patch fixes the problem by creating a new function,
cipso_v4_optptr(), which locates the CIPSO option inside the IP header
without calling IPCB().  Unfortunately, this isn't as fast as a simple
lookup so some additional tweaks were made to limit the use of this
new function.

Cc: <stable@vger.kernel.org> # 3.18
Reported-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Tested-by: Casey Schaufler <casey@schaufler-ca.com>
2015-02-11 14:46:37 -05:00
..
acpi
asm-generic mm: mmu_gather: use tlb->end != 0 only for TLB invalidation 2015-01-13 15:20:40 +13:00
clocksource
crypto
drm
dt-bindings
keys
kvm
linux tpm/tpm_i2c_stm_st33: Change tpm_i2c_stm_st33.h to tpm_stm_st33.h 2015-01-17 15:04:04 +01:00
math-emu
media
memory
misc
net cipso: don't use IPCB() to locate the CIPSO IP option 2015-02-11 14:46:37 -05:00
pcmcia
ras
rdma
rxrpc
scsi
soc
sound
target target: Drop left-over fabric_max_sectors attribute 2015-01-09 15:22:05 -08:00
trace
uapi Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-01-15 11:17:37 +13:00
video
xen x86/xen: properly retrieve NMI reason 2015-01-13 09:39:50 +00:00
Kbuild