diff options
| author | Greg Kroah-Hartman <gregkh@google.com> | 2018-07-31 20:11:21 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@google.com> | 2018-07-31 20:11:21 +0200 |
| commit | 7bbfac190345ca532ea790c9d9ccb15682d7b99b (patch) | |
| tree | 783947e7aeaded9bcaba976b6d2ad590fdb3bae1 /net/ipv4/sysctl_net_ipv4.c | |
| parent | 8ec9fd8936b20ca2d18160f8b18acb4b732c2771 (diff) | |
| parent | a8ea6276d00555387deaaa5eaeb380cd5c17bdc9 (diff) | |
Merge 4.4.143 into android-4.4
Changes in 4.4.143
compiler, clang: suppress warning for unused static inline functions
compiler, clang: properly override 'inline' for clang
compiler, clang: always inline when CONFIG_OPTIMIZE_INLINING is disabled
compiler-gcc.h: Add __attribute__((gnu_inline)) to all inline declarations
x86/asm: Add _ASM_ARG* constants for argument registers to <asm/asm.h>
Revert "sit: reload iphdr in ipip6_rcv"
ocfs2: subsystem.su_mutex is required while accessing the item->ci_parent
bcm63xx_enet: correct clock usage
bcm63xx_enet: do not write to random DMA channel on BCM6345
crypto: crypto4xx - remove bad list_del
crypto: crypto4xx - fix crypto4xx_build_pdr, crypto4xx_build_sdr leak
atm: zatm: Fix potential Spectre v1
net: dccp: avoid crash in ccid3_hc_rx_send_feedback()
net: dccp: switch rx_tstamp_last_feedback to monotonic clock
net/mlx5: Fix incorrect raw command length parsing
net: sungem: fix rx checksum support
qed: Limit msix vectors in kdump kernel to the minimum required count.
r8152: napi hangup fix after disconnect
tcp: fix Fast Open key endianness
tcp: prevent bogus FRTO undos with non-SACK flows
vhost_net: validate sock before trying to put its fd
net_sched: blackhole: tell upper qdisc about dropped packets
net/mlx5: Fix command interface race in polling mode
net: cxgb3_main: fix potential Spectre v1
rtlwifi: rtl8821ae: fix firmware is not ready to run
MIPS: Call dump_stack() from show_regs()
MIPS: Use async IPIs for arch_trigger_cpumask_backtrace()
netfilter: ebtables: reject non-bridge targets
KEYS: DNS: fix parsing multiple options
rds: avoid unenecessary cong_update in loop transport
net/nfc: Avoid stalls when nfc_alloc_send_skb() returned NULL.
Linux 4.4.143
Change-Id: Icacfd188cbb6075bf82a48ec1066e8653eb73ae4
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'net/ipv4/sysctl_net_ipv4.c')
| -rw-r--r-- | net/ipv4/sysctl_net_ipv4.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index 46123369144f..a7fde12784d3 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c @@ -228,8 +228,9 @@ static int proc_tcp_fastopen_key(struct ctl_table *ctl, int write, { struct ctl_table tbl = { .maxlen = (TCP_FASTOPEN_KEY_LENGTH * 2 + 10) }; struct tcp_fastopen_context *ctxt; - int ret; u32 user_key[4]; /* 16 bytes, matching TCP_FASTOPEN_KEY_LENGTH */ + __le32 key[4]; + int ret, i; tbl.data = kmalloc(tbl.maxlen, GFP_KERNEL); if (!tbl.data) @@ -238,11 +239,14 @@ static int proc_tcp_fastopen_key(struct ctl_table *ctl, int write, rcu_read_lock(); ctxt = rcu_dereference(tcp_fastopen_ctx); if (ctxt) - memcpy(user_key, ctxt->key, TCP_FASTOPEN_KEY_LENGTH); + memcpy(key, ctxt->key, TCP_FASTOPEN_KEY_LENGTH); else - memset(user_key, 0, sizeof(user_key)); + memset(key, 0, sizeof(key)); rcu_read_unlock(); + for (i = 0; i < ARRAY_SIZE(key); i++) + user_key[i] = le32_to_cpu(key[i]); + snprintf(tbl.data, tbl.maxlen, "%08x-%08x-%08x-%08x", user_key[0], user_key[1], user_key[2], user_key[3]); ret = proc_dostring(&tbl, write, buffer, lenp, ppos); @@ -258,12 +262,16 @@ static int proc_tcp_fastopen_key(struct ctl_table *ctl, int write, * first invocation of tcp_fastopen_cookie_gen */ tcp_fastopen_init_key_once(false); - tcp_fastopen_reset_cipher(user_key, TCP_FASTOPEN_KEY_LENGTH); + + for (i = 0; i < ARRAY_SIZE(user_key); i++) + key[i] = cpu_to_le32(user_key[i]); + + tcp_fastopen_reset_cipher(key, TCP_FASTOPEN_KEY_LENGTH); } bad_key: pr_debug("proc FO key set 0x%x-%x-%x-%x <- 0x%s: %u\n", - user_key[0], user_key[1], user_key[2], user_key[3], + user_key[0], user_key[1], user_key[2], user_key[3], (char *)tbl.data, ret); kfree(tbl.data); return ret; |
