[linux-yocto] [PATCH] x86_64: expand kernel stack to 16K

2014-07-17 Thread zhe.he
From: Minchan Kim commit 6538b8ea886e472f4431db8ca1d60478f838d14b upstream While I play inhouse patches with much memory pressure on qemu-kvm, 3.14 kernel was randomly crashed. The reason was kernel stack overflow. When I investigated the problem, the callstack was a little bit deeper by involv

[linux-yocto] [PATCH] [RFC] cgroups: Resource controller for open files

2014-07-31 Thread zhe.he
From: He Zhe Add a resource controller for limiting the number of open file handles. This allows us to catch misbehaving processes and return EMFILE instead of ENOMEM for kernel memory limits. Signed-off-by: Binder Makin Port from lkml: https://lkml.org/lkml/2014/7/2/640 Correct wrong handlin

[linux-yocto] [PATCH] cgroups: enable file handles resource controller

2014-07-31 Thread zhe.he
From: He Zhe Enable file handles resource controller for convenience Signed-off-by: He Zhe --- meta/cfg/kernel-cache/features/cgroups/cgroups.cfg |1 + 1 file changed, 1 insertion(+) diff --git a/meta/cfg/kernel-cache/features/cgroups/cgroups.cfg b/meta/cfg/kernel-cache/features/cgroups/

[linux-yocto] [PATCH 1/2] [RFC]cgroups: Resource controller for open files.

2014-07-31 Thread zhe.he
From: Binder Makin lkml https://lkml.org/lkml/2014/7/2/640 upstream Add a resource controller for limiting the number of open file handles. This allows us to catch misbehaving processes and return EMFILE instead of ENOMEM for kernel memory limits. Signed-off-by: Binder Makin Signed-off-by: He

[linux-yocto] [PATCH 2/2] Fix [RFC] cgroups: Resource controller for open files.

2014-07-31 Thread zhe.he
From: He Zhe The original patch is based on: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fad01e866afdbe01a1f3ec06a39c3a8b9e197014 3.15-rc8 Modify variable and macro in fs/filescontrol.c and include/linux/cgroup_subsys.h according to target version. Correct wrong handling whi

[linux-yocto] [PATCH 1/2] [RFC]cgroups: Resource controller for open files.

2014-07-31 Thread zhe.he
From: Binder Makin Add a resource controller for limiting the number of open file handles. This allows us to catch misbehaving processes and return EMFILE instead of ENOMEM for kernel memory limits. Signed-off-by: Binder Makin --- fs/Makefile |1 + fs/file.c

[linux-yocto] [PATCH 2/2] Fix [RFC] cgroups: Resource controller for open files.

2014-07-31 Thread zhe.he
From: He Zhe The original patch is based on: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fad01e866afdbe01a1f3ec06a39c3a8b9e197014 3.15-rc8 Modify variable and macro in fs/filescontrol.c and include/linux/cgroup_subsys.h according to target version. Correct wrong handling whi

[linux-yocto] [PATCH 06/29] openvswitch: flow_netlink: Use pr_fmt to OVS_NLERR output

2014-08-20 Thread zhe.he
From: Joe Perches commit 2235ad1c3ac545bd8fc2c026be5be16d98b9a891 upstream Add "openvswitch: " prefix to OVS_NLERR output to match the other OVS_NLERR output of datapath.c Signed-off-by: Joe Perches Signed-off-by: Jesse Gross Signed-off-by: He Zhe --- net/openvswitch/flow_netlink.c | 2 ++

[linux-yocto] [PATCH 01/29] openvswitch: use const in some local vars and casts

2014-08-20 Thread zhe.he
From: Daniele Di Proietto commit 7085130bab2f9c5b8d61bff73b01dc8195d0f974 upstream In few functions, const formal parameters are assigned or cast to non-const. These changes suppress warnings if compiled with -Wcast-qual. Signed-off-by: Daniele Di Proietto Signed-off-by: Jesse Gross Signed-of

[linux-yocto] [PATCH 02/29] openvswitch: avoid warnings in vport_from_priv

2014-08-20 Thread zhe.he
From: Daniele Di Proietto commit d0b4da137508db3d38998eae7f62c0f9699ee08c upstream This change, firstly, avoids declaring the formal parameter const, since it is treated as non const. (to avoid -Wcast-qual) Secondly, it cast the pointer from void* to u8*, since it is used in arithmetic (to avoid

[linux-yocto] [PATCH 04/29] openvswitch: Added (unsigned long long) cast in printf

2014-08-20 Thread zhe.he
From: Daniele Di Proietto commit cc23ebf3bb4348fb022c0d25494307459bb2e539 upstream This is necessary, since u64 is not unsigned long long in all architectures: u64 could be also uint64_t. Signed-off-by: Daniele Di Proietto Signed-off-by: Jesse Gross Signed-off-by: He Zhe --- net/openvswitch

[linux-yocto] [PATCH 03/29] openvswitch: avoid cast-qual warning in vport_priv

2014-08-20 Thread zhe.he
From: Daniele Di Proietto commit 07dc0602c5976cfc36ccffe5c6d73234f204d585 upstream This function must cast a const value to a non const value. By adding an uintptr_t cast the warning is suppressed. To avoid the cast (proper solution) several function signatures must be changed. Signed-off-by: D

[linux-yocto] [PATCH 07/29] openvswitch: Use ether_addr_copy

2014-08-20 Thread zhe.he
From: Joe Perches commit 8c63ff09bddf944ab0033fea97aacfadfffa76de upstream It's slightly smaller/faster for some architectures. Signed-off-by: Joe Perches Signed-off-by: Jesse Gross Signed-off-by: He Zhe --- net/openvswitch/actions.c | 4 ++-- net/openvswitch/flow.c | 16 +

[linux-yocto] [PATCH 05/29] openvswitch: Use net_ratelimit in OVS_NLERR

2014-08-20 Thread zhe.he
From: Joe Perches commit 1815a8831fb04c60d73627816cb0b596266e9bee upstream Each use of pr__once has a per-site flag. Some of the OVS_NLERR messages look as if seeing them multiple times could be useful, so use net_ratelimit() instead of pr_info_once. Signed-off-by: Joe Perches Signed-off-by:

[linux-yocto] [PATCH 08/29] openvswitch: Remove 5-tuple optimization.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme commit 23dabf88abb48a866fdb19ee08ebcf1ddd9b1840 upstream The 5-tuple optimization becomes unnecessary with a later per-NUMA node stats patch. Remove it first to make the changes easier to grasp. Signed-off-by: Jarno Rajahalme Signed-off-by: Jesse Gross Signed-off-by: He

[linux-yocto] [PATCH 09/29] openvswitch: Per NUMA node flow stats.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme commit 63e7959c4b9bd6f791061c460a22d9ee32ae2240 upstream Keep kernel flow stats for each NUMA node rather than each (logical) CPU. This avoids using the per-CPU allocator and removes most of the kernel-side OVS locking overhead otherwise on the top of perf reports and allo

[linux-yocto] [PATCH 11/29] openvswitch: Use TCP flags in the flow key for stats.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme commit 88d73f6c411ac2f057829b93b3cf202ee551f6cb upstream We already extract the TCP flags for the key, might as well use that for stats. Signed-off-by: Jarno Rajahalme Acked-by: Pravin B Shelar Signed-off-by: Jesse Gross Signed-off-by: He Zhe --- net/openvswitch/flow.

[linux-yocto] [PATCH 12/29] net/openvswitch: Use with RCU_INIT_POINTER(x, NULL) in vport-gre.c

2014-08-20 Thread zhe.he
From: Monam Agarwal commit 944df8ae84d88f5e8eb027990dad2cfa4fbe4be5 upstream This patch replaces rcu_assign_pointer(x, NULL) with RCU_INIT_POINTER(x, NULL) The rcu_assign_pointer() ensures that the initialization of a structure is carried out before storing a pointer to that structure. And in t

[linux-yocto] [PATCH 18/29] openvswitch: Minimize dp and vport critical sections.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme commit 6093ae9abac18871afd0bbc5cf093dff53112fcb upstream Move most memory allocations away from the ovs_mutex critical sections. vport allocations still happen while the lock is taken, as changing that would require major refactoring. Also, vports are created very rarely s

[linux-yocto] [PATCH 16/29] openvswitch: Build flow cmd netlink reply only if needed.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme commit fb5d1e9e127ad1542e5db20cd8620a1509baef69 upstream Use netlink_has_listeners() and NLM_F_ECHO flag to determine if a reply is needed or not for OVS_FLOW_CMD_NEW, OVS_FLOW_CMD_SET, or OVS_FLOW_CMD_DEL. Currently, OVS userspace does not request a reply for OVS_FLOW_CMD

[linux-yocto] [PATCH 17/29] openvswitch: Make flow mask removal symmetric.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme commit 56c19868e115fcf8d62d843e1b9616bb9837d0db upstream Masks are inserted when flows are inserted to the table, so it is logical to correspondingly remove masks when flows are removed from the table, in ovs_flow_table_remove(). This allows ovs_flow_free() to be called wi

[linux-yocto] [PATCH 10/29] openvswitch: Fix output of SCTP mask.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme commit d92ab13558599cf73bbc269ce257fe16575d327a upstream The 'output' argument of the ovs_nla_put_flow() is the one from which the bits are written to the netlink attributes. For SCTP we accidentally used the bits from the 'swkey' instead. This caused the mask attributes

[linux-yocto] [PATCH 15/29] openvswitch: Clarify locking.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme commit bb6f9a708d4067713afae2e9eb2637f6b4c01ecb upstream Remove unnecessary locking from functions that are always called with appropriate locking. Signed-off-by: Jarno Rajahalme Signed-off-by: Thomas Graf Signed-off-by: Pravin B Shelar Signed-off-by: He Zhe --- net/o

[linux-yocto] [PATCH 14/29] openvswitch: Avoid assigning a NULL pointer to flow actions.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme commit be52c9e96a6657d117bb0ec6e11438fb246af5c7 upstream Flow SET can accept an empty set of actions, with the intended semantics of leaving existing actions unmodified. This seems to have been brokin after OVS 1.7, as we have assigned the flow's actions pointer to NULL in

[linux-yocto] [PATCH 13/29] openvswitch: Compact sw_flow_key.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme commit 1139e241ec436b9e9610c7a33ac5c6657f87fda1 upstream Minimize padding in sw_flow_key and move 'tp' top the main struct. These changes simplify code when accessing the transport port numbers and the tcp flags, and makes the sw_flow_key 8 bytes smaller on 64-bit systems (

[linux-yocto] [PATCH 19/29] openvswitch: Fix typo.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme commit eb07265904d6ee95497aba0f3cbd2ae6d9c39a97 upstream Incorrect struct name was confusing, even though otherwise inconsequental. Signed-off-by: Jarno Rajahalme Signed-off-by: Pravin B Shelar Signed-off-by: He Zhe --- net/openvswitch/flow_table.c | 2 +- 1 file chang

[linux-yocto] [PATCH 28/29] openvswitch: Fix tracking of flags seen in TCP flows.

2014-08-20 Thread zhe.he
From: Ben Pfaff commit ad55200734c65a3ec5d0c39d6ea904008baea536 upstream Flow statistics need to take into account the TCP flags from the packet currently being processed (in 'key'), not the TCP flags matched by the flow found in the kernel flow table (in 'flow'). This bug made the Open vSwitch

[linux-yocto] [PATCH 21/29] openvswitch: Reduce locking requirements.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme commit 0e9796b4af9ef490e203158cb738a5a4986eb75c upstream Reduce and clarify locking requirements for ovs_flow_cmd_alloc_info(), ovs_flow_cmd_fill_info() and ovs_flow_cmd_build_info(). A datapath pointer is available only when holding a lock. Change ovs_flow_cmd_fill_info(

[linux-yocto] [PATCH 23/29] openvswitch: Split ovs_flow_cmd_new_or_set().

2014-08-20 Thread zhe.he
From: Jarno Rajahalme commit 37bdc87ba00dadd0156db77ba48224d042202435 upstream Following patch will be easier to reason about with separate ovs_flow_cmd_new() and ovs_flow_cmd_set() functions. Signed-off-by: Jarno Rajahalme Signed-off-by: Pravin B Shelar Signed-off-by: He Zhe --- net/openvs

[linux-yocto] [PATCH 26/29] openvswitch: Fix a double free bug for the sample action

2014-08-20 Thread zhe.he
From: Andy Zhou commit fe984c08e20f0fc2b4666bf8eeeb02605568387b upstream When sample action returns with an error, the skb has already been freed. This patch fix a bug to make sure we don't free it again. This bug introduced by commit ccb1352e76cff05 (net: Add Open vSwitch kernel components.) S

[linux-yocto] [PATCH 25/29] openvswitch: Simplify genetlink code.

2014-08-20 Thread zhe.he
From: Pravin B Shelar commit 0c200ef94c9492205e18a18c25650cf27939889c upstream Following patch get rid of struct genl_family_and_ops which is redundant due to changes to struct genl_family. Signed-off-by: Kyle Mestery Acked-by: Kyle Mestery Signed-off-by: Pravin B Shelar Signed-off-by: He Zh

[linux-yocto] [PATCH 24/29] openvswitch: Minimize ovs_flow_cmd_new|set critical sections.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme commit 893f139b9a6c00c097b9082a90f3041cfb3a0d20 upstream Signed-off-by: Jarno Rajahalme Signed-off-by: Pravin B Shelar Signed-off-by: He Zhe --- net/openvswitch/datapath.c | 192 +++-- 1 file changed, 116 insertions(+), 76 deletio

[linux-yocto] [PATCH 20/29] openvswitch: Fix ovs_flow_stats_get/clear RCU dereference.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme commit 86ec8dbae27e5fa2b5d54f10f77286d9ef55732a upstream For ovs_flow_stats_get() using ovsl_dereference() was wrong, since flow dumps call this with RCU read lock. ovs_flow_stats_clear() is always called with ovs_mutex, so can use ovsl_dereference(). Also, make the ovs_f

[linux-yocto] [PATCH 22/29] openvswitch: Minimize ovs_flow_cmd_del critical section.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme commit aed067783e505bf66dcafa8647d08619eb5b1c55 upstream ovs_flow_cmd_del() now allocates reply (if needed) after the flow has already been removed from the flow table. If the reply allocation fails, a netlink error is signaled with netlink_set_err(), as is already done in

[linux-yocto] [PATCH 27/29] openvswitch: supply a dummy err_handler of gre_cisco_protocol to prevent kernel crash

2014-08-20 Thread zhe.he
From: Wei Zhang commit e0bb8c44ed5cfcc56b571758ed966ee48779024c upstream When use gre vport, openvswitch register a gre_cisco_protocol but does not supply a err_handler with it. The gre_cisco_err() in net/ipv4/gre_demux.c expect err_handler be provided with the gre_cisco_protocol implementation,

[linux-yocto] [PATCH 29/29] openvswitch: Use exact lookup for flow_get and flow_del.

2014-08-20 Thread zhe.he
From: Alex Wang commit 4a46b24e147dfa9b858026da02cad0bdd4e149d2 upstream Due to the race condition in userspace, there is chance that two overlapping megaflows could be installed in datapath. And this causes userspace unable to delete the less inclusive megaflow flow even after it timeout, sinc

[linux-yocto] [PATCH 01/10] vhost: don't open-code sockfd_put()

2014-08-20 Thread zhe.he
From: Al Viro commit 09aaacf02a3e88870ed5cad038a5bc822c947904 upstream Signed-off-by: Al Viro Signed-off-by: He Zhe --- drivers/vhost/net.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index e1e22e0..be414d2 10064

[linux-yocto] [PATCH 03/10] vhost/scsi: Add preallocation of protection SGLs

2014-08-20 Thread zhe.he
From: Nicholas Bellinger commit b1935f687bb93b207ef690f7debc0e9921fc484f upstream This patch updates tcm_vhost_make_nexus() to pre-allocate per descriptor tcm_vhost_cmd->tvc_prot_sgl[] used to expose protection SGLs from within virtio-scsi guest memory to vhost-scsi. Cc: Michael S. Tsirkin Cc:

[linux-yocto] [PATCH 02/10] vhost/scsi: Move sanity check into vhost_scsi_map_iov_to_sgl

2014-08-20 Thread zhe.he
From: Nicholas Bellinger commit 5a01d08217e39f3d36d3ca160361c7b019ff1598 upstream Move the overflow check for sgl_count > TCM_VHOST_PREALLOC_SGLS into vhost_scsi_map_iov_to_sgl() so that it's based on the total number of SGLs for all IOVs, instead of single IOVs. Also, rename TCM_VHOST_PREALLOC

[linux-yocto] [PATCH 08/10] vhost: move acked_features to VQs

2014-08-20 Thread zhe.he
From: "Michael S. Tsirkin" commit ea16c51433510f7f758382dec5b933fc0797f244 upstream Refactor code to make sure features are only accessed under VQ mutex. This makes everything simpler, no need for RCU here anymore. Signed-off-by: Michael S. Tsirkin Signed-off-by: He Zhe --- drivers/vhost/net

[linux-yocto] [PATCH 05/10] vhost/scsi: Enable T10 PI IOV -> SGL memory mapping

2014-08-20 Thread zhe.he
From: Nicholas Bellinger commit 95e7c4341b8e28dae5204378087c1e2a115abc82 upstream This patch updates vhost_scsi_handle_vq() to check for the existance of virtio_scsi_cmd_req_pi comparing vq->iov[0].iov_len in order to calculate seperate data + protection SGLs from data_num. Also update tcm_vhos

[linux-yocto] [PATCH 09/10] vhost: move memory pointer to VQs

2014-08-20 Thread zhe.he
From: "Michael S. Tsirkin" commit 47283bef7ed356629467d1fac61687756e48f254 upstream commit 2ae76693b8bcabf370b981cd00c36cd41d33fabc vhost: replace rcu with mutex replaced rcu sync for memory accesses with VQ mutex locl/unlock. This is correct since all accesses are under VQ mutex, but incomp

[linux-yocto] [PATCH 06/10] vhost-net: extend device allocation to vmalloc

2014-08-20 Thread zhe.he
From: "Michael S. Tsirkin" commit 23cc5a991c7a9fb7e6d6550e65cee4f4173111c5 upstream Michael Mueller provided a patch to reduce the size of vhost-net structure as some allocations could fail under memory pressure/fragmentation. We are still left with high order allocations though. This patch is

[linux-yocto] [PATCH 07/10] vhost: replace rcu with mutex

2014-08-20 Thread zhe.he
From: "Michael S. Tsirkin" commit 98f9ca0a3faa99b7388578d55eccecf272be4038 upstream All memory accesses are done under some VQ mutex. So lock/unlock all VQs is a faster equivalent of synchronize_rcu() for memory access changes. Some guests cause a lot of these changes, so it's helpful to make th

[linux-yocto] [PATCH 04/10] vhost/scsi: Add T10 PI IOV -> SGL memory mapping logic

2014-08-20 Thread zhe.he
From: Nicholas Bellinger commit e31885dd901e80d5bd528c1cbedde07ebbf051b2 upstream This patch adds vhost_scsi_map_iov_to_prot() to perform the mapping of T10 data integrity memory between virtio iov + struct scatterlist using get_user_pages_fast() following existing code. As with vhost_scsi_map_

[linux-yocto] [PATCH 10/10] vhost-scsi: Include prot_bytes into expected data transfer length

2014-08-20 Thread zhe.he
From: Nicholas Bellinger commit 9f977ef7b671f6169eca78bf40f230fe84b7c7e5 upstream This patch updates vhost_scsi_get_tag() to accept the combined expected data transfer length + T10 PI bytes as the value passed into target_submit_cmd(). This is required now that target-core logic in commit 14ef9

[linux-yocto] [PATCH 3/26] net: filter: add jited flag to indicate jit compiled filters

2014-08-28 Thread zhe.he
From: Daniel Borkmann commit f8bbbfc3b97f4c7a6c7c23185e520b22bfc3a21d upstream This patch adds a jited flag into sk_filter struct in order to indicate whether a filter is currently jited or not. The size of sk_filter is not being expanded as the 32 bit 'len' member allows upper bits to be reused

[linux-yocto] [PATCH 5/26] net: filter: move filter accounting to filter core

2014-08-28 Thread zhe.he
From: Daniel Borkmann commit fbc907f0b1386c02e00516aa78a0fa6b0454fd0b upstream This patch basically does two things, i) removes the extern keyword from the include/linux/filter.h file to be more consistent with the rest of Joe's changes, and ii) moves filter accounting into the filter core frame

[linux-yocto] [PATCH 2/26] net: Rename skb->rxhash to skb->hash

2014-08-28 Thread zhe.he
From: Tom Herbert commit 61b905da33ae25edb6b9d2a5de21e34c3a77efe3 upstream The packet hash can be considered a property of the packet, not just on RX path. This patch changes name of rxhash and l4_rxhash skbuff fields to be hash and l4_hash respectively. This includes changing uses of the field

[linux-yocto] [PATCH 1/26] tools: bpf_dbg: various misc code cleanups

2014-08-28 Thread zhe.he
From: Daniel Borkmann commit 7debf7806e0e984ea7e43cc271dc9400b0dffc14 upstream Lets clean up bpf_dbg a bit and improve its code slightly in various areas: i) Get rid of some macros as there's no good reason for keeping them, ii) remove one unused variable and reduce scope of various variables fo

[linux-yocto] [PATCH 4/26] net: filter: keep original BPF program around

2014-08-28 Thread zhe.he
From: Daniel Borkmann commit a3ea269b8bcdbb0c5fa2fd449a436e7987446975 upstream In order to open up the possibility to internally transform a BPF program into an alternative and possibly non-trivial reversible representation, we need to keep the original BPF program around, so that it can be pass

[linux-yocto] [PATCH 6/26] net: filter: rework/optimize internal BPF interpreter's instruction set

2014-08-28 Thread zhe.he
From: Alexei Starovoitov commit bd4cf0ed331a275e9bf5a49e6d0fd55dffc551b8 upstream This patch replaces/reworks the kernel-internal BPF interpreter with an optimized BPF instruction set format that is modelled closer to mimic native instruction sets and is designed to be JITed with one to one mapp

[linux-yocto] [PATCH 10/26] net: filter: seccomp: fix wrong decoding of BPF_S_ANC_SECCOMP_LD_W

2014-08-28 Thread zhe.he
From: Daniel Borkmann commit 8c482cdc358ef931ee02262e0a4ef0f29946aa0c upstream While reviewing seccomp code, we found that BPF_S_ANC_SECCOMP_LD_W has been wrongly decoded by commit a8fc927780 ("sk-filter: Add ability to get socket filter program (v2)") into the opcode BPF_LD|BPF_B|BPF_ABS althou

[linux-yocto] [PATCH 9/26] filter: prevent nla extensions to peek beyond the end of the message

2014-08-28 Thread zhe.he
From: Mathias Krause commit 05ab8f2647e4221cbdb3856dd7d32bd5407316b3 upstream The BPF_S_ANC_NLATTR and BPF_S_ANC_NLATTR_NEST extensions fail to check for a minimal message length before testing the supplied offset to be within the bounds of the message. This allows the subtraction of the nla hea

[linux-yocto] [PATCH 12/26] net: filter: initialize A and X registers

2014-08-28 Thread zhe.he
From: Alexei Starovoitov commit 83d5b7ef99c9f05e87333b334a638de1264ab8e4 upstream exisiting BPF verifier allows uninitialized access to registers, 'ret A' is considered to be a valid filter. So initialize A and X to zero to prevent leaking kernel memory In the future BPF verifier will be rejecti

[linux-yocto] [PATCH 11/26] filter: added BPF random opcode

2014-08-28 Thread zhe.he
From: Chema Gonzalez commit 4cd3675ebf74d7f559038ded6aa8088e4099a83d upstream Added a new ancillary load (bpf call in eBPF parlance) that produces a 32-bit random number. We are implementing it as an ancillary load (instead of an ISA opcode) because (a) it is simpler, (b) allows easy JITing, and

[linux-yocto] [PATCH 13/26] sched, cls: check if we could overwrite actions when changing a filter

2014-08-28 Thread zhe.he
From: Cong Wang commit 2f7ef2f8790f5bf53db4fc6b2310943139285827 upstream When actions are attached to a filter, they are a part of the filter itself, so when changing a filter we should allow to overwrite the actions inside as well. In my specific case, when I tried to _append_ a new action to

[linux-yocto] [PATCH 15/26] net: filter: simplify label names from jump-table

2014-08-28 Thread zhe.he
From: Daniel Borkmann commit 5bcfedf06f7fdf9efcf65dc11198e9012f7530f4 upstream This patch simplifies label naming for the BPF jump-table. When we define labels via DL(), we just concatenate/textify the combination of instruction opcode which consists of the class, subclass, word size, target reg

[linux-yocto] [PATCH 8/26] net: filter: be more defensive on div/mod by X==0

2014-08-28 Thread zhe.he
From: Daniel Borkmann commit 5f9fde5f799df7156eeb3fa58282e9fd2f38a5f8 upstream The old interpreter behaviour was that we returned with 0 whenever we found a division by 0 would take place. In the new interpreter we would currently just skip that instead and continue execution. It's true that a

[linux-yocto] [PATCH 16/26] net: filter: make register naming more comprehensible

2014-08-28 Thread zhe.he
From: Daniel Borkmann commit 30743837dd204d2b04fd4e9d3db78cc7b118c81a upstream The current code is a bit hard to parse on which registers can be used, how they are mapped and all play together. It makes much more sense to define this a bit more clearly so that the code is a bit more intuitive. T

[linux-yocto] [PATCH 14/26] bpf_dbg: fix wrong register usage

2014-08-28 Thread zhe.he
From: Brendan Hickey commit e5744fe9d262d11131916d04ea79ea539fe296c0 upstream The AND instruction is erroneously using the X register instead of the K register. Signed-off-by: Brendan Hickey Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller Signed-off-by: He Zhe --- tools/net/b

[linux-yocto] [PATCH 7/26] net: filter: minor: fix kdoc in __sk_run_filter

2014-08-28 Thread zhe.he
From: Daniel Borkmann commit 01d32f6e5a3f709a90aadbb73723e77a96d67cb2 upstream This minor patch fixes the following warning when doing a `make htmldocs`: DOCPROC Documentation/DocBook/networking.xml Warning(.../net/core/filter.c:135): No description found for parameter 'insn' Warning(.../net/

[linux-yocto] [PATCH 24/26 RFC net-next] tracing: accelerate tracing filters with BPF

2014-08-28 Thread zhe.he
From: Alexei Starovoitov Taken from https://lkml.org/lkml/2014/5/13/905 tracing: accelerate tracing filters with BPF Tracing filters are parsing user supplied character string and constructing a predicate tree. filter_match_preds() was used to walk nodes of the tree to simulate matching of bool

[linux-yocto] [PATCH 21/26] net: filter: Fix redefinition warnings on x86-64.

2014-08-28 Thread zhe.he
From: "David S. Miller" commit 1268e253a81e504bc5d5cb7f887dbd538984f137 upstream Do not collide with the x86-64 PTRACE user API namespace. net/core/filter.c:57:0: warning: "R8" redefined [enabled by default] arch/x86/include/uapi/asm/ptrace-abi.h:38:0: note: this is the location of the previou

[linux-yocto] [PATCH 20/26] net: filter: additional BPF tests

2014-08-28 Thread zhe.he
From: Alexei Starovoitov commit 9def624afdf2a8122eed5f2beec7448513c9a703 upstream All tests should pass with and without JIT. Example output: test_bpf: #0 TAX 35 16 16 PASS test_bpf: #1 TXA 7 7 7 PASS test_bpf: #2 ADD_SUB_MUL_K 10 PASS test_bpf: #3 DIV_KX 33 PASS test_bpf: #4 AND_OR_LSH_K 10 10

[linux-yocto] [PATCH 19/26] net: filter: BPF testsuite

2014-08-28 Thread zhe.he
From: Alexei Starovoitov commit 64a8946b447e418b4283c3573ef397980cca0cd8 upstream The testsuite covers classic and internal BPF instructions. It is particularly useful for JIT compiler developers. Adds to "net" selftest target. The testsuite can be used as a set of micro-benchmarks. It measures

[linux-yocto] [PATCH 17/26] net: filter: misc/various cleanups

2014-08-28 Thread zhe.he
From: Daniel Borkmann commit eb9672f4a14bb7058c44efcc31c89737a7724d2c upstream This contains only some minor misc cleanpus. We can spare us the extra variable declaration in __skb_get_pay_offset(), the cast in __get_random_u32() is rather unnecessary and in __sk_migrate_realloc() we can remove t

[linux-yocto] [PATCH 18/26] net: filter: make BPF conversion more readable

2014-08-28 Thread zhe.he
From: Alexei Starovoitov commit 9739eef13c926645fbf88bcb77e66442fa75d688 upstream Introduce BPF helper macros to define instructions (similar to old BPF_STMT/BPF_JUMP macros) Use them while converting classic BPF to internal and in BPF testsuite later. Signed-off-by: Alexei Starovoitov Signed

[linux-yocto] [PATCH 22/26] net: filter: x86: split bpf_jit_compile()

2014-08-28 Thread zhe.he
From: Alexei Starovoitov commit f3c2af7ba17a83809806880062c9ad541744fb95 upstream Split bpf_jit_compile() into two functions to improve readability of for(pass++) loop. The change follows similar style of JIT compilers for arm, powerpc, s390 The body of new do_jit() was not reformatted to reduc

[linux-yocto] [PATCH 26/26] net: e1000e calls skb_set_hash

2014-08-28 Thread zhe.he
From: Tom Herbert commit e25909bcdf2e43caa4ea9b1283ade2749da35639 upstream Drivers should call skb_set_hash to set the hash and its type in an skbuff. Signed-off-by: Tom Herbert Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher Signed-off-by: He Zhe --- drivers/net/ethernet/intel/e1000e/n

[linux-yocto] [PATCH 23/26] net: filter: x86: internal BPF JIT

2014-08-28 Thread zhe.he
From: Alexei Starovoitov commit 622582786c9e041d0bd52bde201787adeab249f8 upstream Maps all internal BPF instructions into x86_64 instructions. This patch replaces original BPF x64 JIT with internal BPF x64 JIT. sysctl net.core.bpf_jit_enable is reused as on/off switch. Performance: 1. old BPF

[linux-yocto] [PATCH 25/26] net: ppp: use sk_unattached_filter api

2014-08-28 Thread zhe.he
From: Daniel Borkmann commit 568f194e8bd16c353ad50f9ab95d98b20578a39d upstream For the ppp driver, there are currently two open-coded BPF filters in use, that is, pass_filter and active_filter. Migrate both to make proper use of sk_unattached_filter_{create,destroy} API so that the actual BPF co

[linux-yocto] [PATCH 1/1] Revert "net: Rename skb->rxhash to skb->hash"

2014-09-09 Thread zhe.he
From: He Zhe Revert unnecessary renaming for BPF. Build will fail if related drivers are enabled but do not get updated accordingly. Signed-off-by: He Zhe --- arch/arm/net/bpf_jit_32.c | 4 ++-- arch/powerpc/net/bpf_jit_comp.c | 4 ++-- arch/s390/net/bpf_jit_comp.c| 8 ar

[linux-yocto] [V2][PATCH 1/1] net: Rename skb->hash to skb->rxhash

2014-09-10 Thread zhe.he
From: He Zhe This is used to undo the previous commit "net: Rename skb->rxhash to skb->hash" which introduces unnecessary renamings for BPF. Build will fail if related drivers are enabled but do not get updated accordingly. Since the context has been changed by other commits in the BPF set, some

[linux-yocto] [PATCH 1/1] qemuarm64: create bsp config

2014-09-18 Thread zhe.he
From: He Zhe This is the initial meta data for qemu arm64 bsp that supports qemu's virt for aarch64. Signed-off-by: He Zhe --- .../bsp/qemuarm64/qemuarm64-standard.scc | 9 +++ meta/cfg/kernel-cache/bsp/qemuarm64/qemuarm64.cfg | 29 ++ meta/cfg/kernel-cache/

[linux-yocto] [PATCH 0/1] Add patch to fix missing checkpoint on yaffs2, for yocto-4.1

2015-12-10 Thread zhe.he
From: He Zhe Please apply this set of patches on yocto-4.1 branch from git://git.yoctoproject.org/yocto-kernel-cache He Zhe (1): yaffs2: Add patch to fix missing checkpoint .../yaffs2-fix-missing-checkpoint-on-yaffs.patch | 85 ++ features/yaffs2/yaffs2.scc

[linux-yocto] [PATCH 0/1] Add patch to fix missing checkpoint on yaffs2, for master

2015-12-10 Thread zhe.he
From: He Zhe Please apply this set of patches on master branch from git://git.yoctoproject.org/yocto-kernel-cache He Zhe (1): yaffs2: Add patch to fix missing checkpoint .../yaffs2-fix-missing-checkpoint-on-yaffs.patch | 85 ++ features/yaffs2/yaffs2.scc

[linux-yocto] [PATCH 1/1] yaffs2: Add patch to fix missing checkpoint

2015-12-10 Thread zhe.he
From: He Zhe Signed-off-by: He Zhe --- .../yaffs2-fix-missing-checkpoint-on-yaffs.patch | 85 ++ features/yaffs2/yaffs2.scc | 1 + 2 files changed, 86 insertions(+) create mode 100644 features/yaffs2/yaffs2-fix-missing-checkpoint-on-yaffs.patch d

[linux-yocto] [PATCH 1/1] yaffs2: Add patch to fix missing checkpoint

2015-12-10 Thread zhe.he
From: He Zhe Signed-off-by: He Zhe --- .../yaffs2-fix-missing-checkpoint-on-yaffs.patch | 85 ++ features/yaffs2/yaffs2.scc | 1 + 2 files changed, 86 insertions(+) create mode 100644 features/yaffs2/yaffs2-fix-missing-checkpoint-on-yaffs.patch d

[linux-yocto] [PATCH] intel-x86: Add preemp-rt config entries

2018-07-18 Thread zhe.he
From: He Zhe Signed-off-by: He Zhe --- bsp/intel-x86/intel-x86-32-preempt-rt.scc | 9 + bsp/intel-x86/intel-x86-64-preempt-rt.scc | 8 2 files changed, 17 insertions(+) create mode 100644 bsp/intel-x86/intel-x86-32-preempt-rt.scc create mode 100644 bsp/intel-x86/intel-x86-64-

[linux-yocto] [PATCH] rbd: Add fragments for Rados block device

2018-07-18 Thread zhe.he
From: He Zhe Signed-off-by: He Zhe --- cfg/rbd.cfg | 1 + cfg/rbd.scc | 4 2 files changed, 5 insertions(+) create mode 100644 cfg/rbd.cfg create mode 100644 cfg/rbd.scc diff --git a/cfg/rbd.cfg b/cfg/rbd.cfg new file mode 100644 index 000..156a099 --- /dev/null +++ b/cfg/rbd.cfg @@

[linux-yocto] [PATCH] cfg: Add config fragments for docker

2018-07-19 Thread zhe.he
From: He Zhe Signed-off-by: He Zhe --- cfg/docker.cfg | 10 ++ cfg/docker.scc | 4 2 files changed, 14 insertions(+) create mode 100644 cfg/docker.cfg create mode 100644 cfg/docker.scc diff --git a/cfg/docker.cfg b/cfg/docker.cfg new file mode 100644 index 000..c678c94 ---

[linux-yocto] [PATCH] Revert mm/vmstat.c: fix vmstat_update() preemption BUG

2018-07-20 Thread zhe.he
From: Sebastian Andrzej Siewior commit 97731753d44d5efcb95b994dc952c0e8195b3e96 upstream This patch reverts commit c7f26ccfb2c3 ("mm/vmstat.c: fix vmstat_update() preemption BUG"). Steven saw a "using smp_processor_id() in preemptible" message and added a preempt_disable() section around it to k

[linux-yocto] [PATCH] powerpc: correct the preempt-lazy assembly

2018-09-25 Thread zhe.he
From: Sebastian Andrzej Siewior The powerpc port won't compile and abort with "Error: operand out of range" because the TIF_NEED_RESCHED_LAZY uses bit 20 which is larger than 15 which is the upper limit. Swap it with TIF_32BIT and fixup the assembly in one assembly file to get it to compile again

[linux-yocto] [PATCH] powerpc: correct the preempt-lazy assembly

2018-09-25 Thread zhe.he
From: Sebastian Andrzej Siewior The powerpc port won't compile and abort with "Error: operand out of range" because the TIF_NEED_RESCHED_LAZY uses bit 20 which is larger than 15 which is the upper limit. Swap it with TIF_32BIT and fixup the assembly in one assembly file to get it to compile again

[linux-yocto] [PATCH] netfilter: Fix kmemleak false positive reports

2018-10-23 Thread zhe.he
From: He Zhe unreferenced object 0x9643edb89900 (size 256): comm "sd-resolve", pid 220, jiffies 4295016710 (age 208.256s) hex dump (first 32 bytes): 01 00 00 00 00 00 00 00 03 00 74 f3 ba b1 b6 b5 ..t. 65 3e 00 00 00 00 00 00 90 f9 a0 ed 43 96 ff ff e>..C...

[linux-yocto] [PATCH] ipv4: net namespace does not inherit network configurations

2018-10-23 Thread zhe.he
From: He Zhe patch from https://lkml.org/lkml/2014/7/29/119 Ipv4 net namespace requires a similar logic change as commit a79ca223e029 [ipv6: fix bad free of addrconf_init_net] introduces for newer kernels. Since a net namespace is independent to another. That is, there is no any relationship be

[linux-yocto] [PATCH v2] ipv4: net namespace does not inherit network configurations

2018-10-28 Thread zhe.he
From: He Zhe patch from https://lkml.org/lkml/2014/7/29/119 Ipv4 net namespace requires a similar logic change as commit a79ca223e029 [ipv6: fix bad free of addrconf_init_net] introduces for newer kernels. Since a net namespace is independent to another. That is, there is no any relationship be

[linux-yocto] [PATCH] aufs: tiny, suppress a warning

2018-11-07 Thread zhe.he
From: "J. R. Okajima" commit 3a33601796d4139286c57cd15bf7d88d00aa7674 upstream Signed-off-by: J. R. Okajima fs/aufs/vdir.c: In function 'fillvdir': fs/aufs/vdir.c:493:15: warning: 'ino' may be used uninitialized in this function [-Wmaybe-uninitialized] arg->err = au_nhash_append_wh

[linux-yocto] [PATCH] kmemleak: Turn kmemleak_lock to raw spinlock on RT

2018-11-13 Thread zhe.he
From: He Zhe See https://lore.kernel.org/patchwork/patch/1011368/ for upstream status. kmemleak_lock, as a rwlock on RT, can possibly be held in atomic context and causes the follow BUG. BUG: scheduling while atomic: migration/15/132/0x0002 Modules linked in: iTCO_wdt iTCO_vendor_support in

[linux-yocto] [PATCH] Revert "igb: reduce CPU0 latency when updating statistics"

2019-01-21 Thread zhe.he
From: Jeff Kirsher This reverts commit 59361316afcb08569af21e1af83e89c7051c055a. Due to problems found in additional testing, this causes an illegal context switch in the RCU read-side critical section. CC: Dave Jones CC: Cong Wang CC: Jan Jablonsky Signed-off-by: Jeff Kirsher Signed-off-by

[linux-yocto] [PATCH] serial: 8250: Fix serial8250 initialization crash

2019-01-22 Thread zhe.he
From: He Zhe https://lore.kernel.org/lkml/41c574bfdce7490597079dae8f328...@svr-chch-ex1.atlnz.lc/ The initialization code of interrupt backoff work might reference NULL pointer and cause the following crash, if no port was found. [ 10.017727] CPU 0 Unable to handle kernel paging request at vi

[linux-yocto] [PATCH] ide: Fix ide convert to blk-mq

2019-01-29 Thread zhe.he
From: He Zhe This is written by Jens Axboe . https://lore.kernel.org/lkml/a0fcb119-82e7-c9b2-ea76-6aa39bd33...@windriver.com/ LTP case read_all_proc(read_all -d /proc -q -r 10) often, but not every time, fails with the following call traces, since 600335205b8d "ide: convert to blk-mq"(5.0-rc1)

[linux-yocto] [PATCH] x86: lazy-preempt: use proper return label on 32bit-x86

2019-03-18 Thread zhe.he
From: Sebastian Andrzej Siewior The lazy-preempt uses the wrong return label in case preemption isn't possible. This results crash while returning to the kernel. Use the correct return label if preemption isn' possible. Reported-by: Andri Yngvason Signed-off-by: Sebastian Andrzej Siewior com

[linux-yocto] [PATCH] x86/resctrl: Rename INTEL_RDT to RESCTRL

2019-03-20 Thread zhe.he
From: He Zhe The following upstream commits have renamed INTEL_RDT to RESCTRL. 6fe07ce35e8a ("x86/resctrl: Rename the config option INTEL_RDT to RESCTRL") e6d429313ea5 ("x86/resctrl: Avoid confusion over the new X86_RESCTRL config") Signed-off-by: He Zhe --- bsp/intel-x86/intel-x86-64.cfg | 4

[linux-yocto] [PATCH] cgl: audit: Remove CONFIG_AUDIT_WATCH and CONFIG_AUDIT_WATCH

2019-03-24 Thread zhe.he
From: He Zhe In the following commits, these two options have been replaced by CONFIG_AUDITSYSCALL which is in audit.cfg. c8fc5d49c341 ("audit: remove WATCH and TREE config options") cb74ed278f80 ("audit: always enable syscall auditing when supported and audit is enabled") Signed-off-by: He Zh

[linux-yocto] [PATCH] tracing/x86: Save CR2 before tracing irqsoff on error_entry

2019-04-24 Thread zhe.he
From: "Steven Rostedt (VMware)" He Zhe reported a crash by enabling trace events and selecting "userstacktrace" which will read the stack of userspace for every trace event recorded. Zhe narrowed it down to: c3bc8fd637a9 ("tracing: Centralize preemptirq tracepoints and unify their usage") Wit

[linux-yocto] [PATCH] tracing/x86: Fix compilation failure when CONFIG_TRACE_IRQFLAGS is off

2019-04-28 Thread zhe.he
From: He Zhe b470fb994ebd ("tracing/x86: Save CR2 before tracing irqsoff on error_entry") misses a "#ifdef". Signed-off-by: He Zhe --- arch/x86/entry/common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c index 48a0a59..56d54d30 100644

[linux-yocto] [PATCH] kmemleak: change the lock of kmemleak_object to raw_spinlock_t

2019-05-10 Thread zhe.he
From: Liu Haitao The following call trace would be triggered as kmemleak is running. BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974 in_atomic(): 1, irqs_disabled(): 1, pid: 2401, name: kmemleak Preemption disabled at: [] scan_block+0x31/0x120 CPU: 12 PID: 247

[linux-yocto] [PATCH] samples: fix pidfd-metadata compilation

2019-06-10 Thread zhe.he
From: Guenter Roeck Define __NR_pidfd_send_signal if it isn't to prevent a compilation error. To make pidfd-metadata compile on all arches, irrespective of whether or not syscall numbers are assigned, define the syscall number to -1. If it isn't defined this will cause the kernel to return -ENOS

  1   2   >