[Feature][ZXW-65]merged P49 base code
Change-Id: I3e09c0c3d47483bc645f02310380ecb7fc6f4041
diff --git a/ap/os/linux/linux-3.4.x/include/linux/ipc.h b/ap/os/linux/linux-3.4.x/include/linux/ipc.h
index 30e8161..6042f8f 100644
--- a/ap/os/linux/linux-3.4.x/include/linux/ipc.h
+++ b/ap/os/linux/linux-3.4.x/include/linux/ipc.h
@@ -96,6 +96,9 @@
umode_t mode;
unsigned long seq;
void *security;
+#ifdef CONFIG_SYSVIPC_CROSS_SHM
+ bool rpmflag; /*shm remote flag*/
+#endif
};
#endif /* __KERNEL__ */
diff --git a/ap/os/linux/linux-3.4.x/include/linux/module.h b/ap/os/linux/linux-3.4.x/include/linux/module.h
index 04380b0..de4f6c9 100755
--- a/ap/os/linux/linux-3.4.x/include/linux/module.h
+++ b/ap/os/linux/linux-3.4.x/include/linux/module.h
@@ -733,6 +733,7 @@
int (*zDrvVp_GetPath_Wrap)(void);
int (*zDrvVp_Loop)(int);
+ int (*zDrvVp_GetVpLoop_Wrap)(void);
int (*zDrvVp_Soft_Dtmf_Loop)(int);
void (*zDrvDtmf_Detect_RegCallbacks)(T_DrvDtmf_Detect_Opt);
int (*zDrvVp_SetPath_Wrap)(int);
diff --git a/ap/os/linux/linux-3.4.x/include/linux/mtd/nand.h b/ap/os/linux/linux-3.4.x/include/linux/mtd/nand.h
index ec38761..24d11fc 100755
--- a/ap/os/linux/linux-3.4.x/include/linux/mtd/nand.h
+++ b/ap/os/linux/linux-3.4.x/include/linux/mtd/nand.h
@@ -570,6 +570,7 @@
#define NAND_MFR_HOSIN 0xD6
#define NAND_MFR_EMST 0xC8
#define NAND_MFR_FORESEE 0xCD
+#define NAND_MFR_XTX 0x0B
#define NAND_DEVID_EMST_F50D1G41LB_1G 0x11
diff --git a/ap/os/linux/linux-3.4.x/include/net/net_namespace.h b/ap/os/linux/linux-3.4.x/include/net/net_namespace.h
index ee547c1..2079a39 100644
--- a/ap/os/linux/linux-3.4.x/include/net/net_namespace.h
+++ b/ap/os/linux/linux-3.4.x/include/net/net_namespace.h
@@ -47,7 +47,9 @@
*/
#endif
spinlock_t rules_mod_lock;
-
+ //BDSA-2019-2065
+ u32 hash_mix;
+
struct list_head list; /* list of network namespaces */
struct list_head cleanup_list; /* namespaces on death row */
struct list_head exit_list; /* Use only net_mutex */
diff --git a/ap/os/linux/linux-3.4.x/include/net/netns/hash.h b/ap/os/linux/linux-3.4.x/include/net/netns/hash.h
index 548d78f..0f3152d 100644
--- a/ap/os/linux/linux-3.4.x/include/net/netns/hash.h
+++ b/ap/os/linux/linux-3.4.x/include/net/netns/hash.h
@@ -1,21 +1,10 @@
#ifndef __NET_NS_HASH_H__
#define __NET_NS_HASH_H__
+//BDSA-2019-2065
+#include <net/net_namespace.h>
-#include <asm/cache.h>
-
-struct net;
-
-static inline unsigned net_hash_mix(struct net *net)
+static inline u32 net_hash_mix(const struct net *net)
{
-#ifdef CONFIG_NET_NS
- /*
- * shift this right to eliminate bits, that are
- * always zeroed
- */
-
- return (unsigned)(((unsigned long)net) >> L1_CACHE_SHIFT);
-#else
- return 0;
-#endif
+ return net->hash_mix;
}
#endif
diff --git a/ap/os/linux/linux-3.4.x/include/net/tcp.h b/ap/os/linux/linux-3.4.x/include/net/tcp.h
index b5d2d14..a118f21 100755
--- a/ap/os/linux/linux-3.4.x/include/net/tcp.h
+++ b/ap/os/linux/linux-3.4.x/include/net/tcp.h
@@ -1300,6 +1300,8 @@
{
if (sk->sk_send_head == skb_unlinked)
sk->sk_send_head = NULL;
+ if (tcp_sk(sk)->highest_sack == skb_unlinked) //CVE-2016-6828
+ tcp_sk(sk)->highest_sack = NULL;
}
static inline void tcp_init_send_head(struct sock *sk)