Commit Graph

440444 Commits

Author SHA1 Message Date
Harout Hedeshian 0dafe9e7da netfilter: xt_socket: add XT_SOCKET_RESTORESKMARK flag
xt_socket is useful for matching sockets with IP_TRANSPARENT and
taking some action on the matching packets. However, it lacks the
ability to match only a small subset of transparent sockets.

Suppose there are 2 applications, each with its own set of transparent
sockets. The first application wants all matching packets dropped,
while the second application wants them forwarded somewhere else.

Add the ability to retore the skb->mark from the sk_mark. The mark
is only restored if a matching socket is found and the transparent /
nowildcard conditions are satisfied.

Now the 2 hypothetical applications can differentiate their sockets
based on a mark value set with SO_MARK.

iptables -t mangle -I PREROUTING -m socket --transparent \
                                           --restore-skmark -j action
iptables -t mangle -A action -m mark --mark 10 -j action2
iptables -t mangle -A action -m mark --mark 11 -j action3

Change-Id: Ica30d9303ac6bb265fce4ef095a952508b4a1f0c
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Git-commit: 01555e74bde51444c6898ef1800fb2bc697d479e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[harouth@codeaurora.org: resolve trivial merge conflicts]
2015-12-14 09:53:08 -07:00
Harout Hedeshian 0d0a39cad4 netfilter: xt_socket: fix broken v0 support
commit 681f130f39e10 ("netfilter: xt_socket: add XT_SOCKET_NOWILDCARD
flag") added a potential NULL dereference if an old iptables package
uses v0 of the match.

Fix this by removing the test on @info in fast path.

IPv6 can remove the test as well, as it uses v1 or v2.

Change-Id: If883c48ec81335e6715311655d0ddc1c33401ec7
Reported-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Git-commit: baf60efa585c78b269f0097288868a51ccc61f55
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2015-12-14 09:53:07 -07:00
Eric Dumazet dd147226b9 netfilter: xt_socket: add XT_SOCKET_NOWILDCARD flag
xt_socket module can be a nice replacement to conntrack module
in some cases (SYN filtering for example)

But it lacks the ability to match the 3rd packet of TCP
handshake (ACK coming from the client).

Add a XT_SOCKET_NOWILDCARD flag to disable the wildcard mechanism.

The wildcard is the legacy socket match behavior, that ignores
LISTEN sockets bound to INADDR_ANY (or ipv6 equivalent)

iptables -I INPUT -p tcp --syn -j SYN_CHAIN
iptables -I INPUT -m socket --nowildcard -j ACCEPT

Change-Id: I5216b9c9b367cb1adbe74d47014a4155f6c39271
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Git-commit: 681f130f39e10087475383e6771b9366e26bab0c
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[harouth@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2015-12-14 09:53:07 -07:00
Eric Dumazet 3464db2cba netfilter: xt_socket: use IP early demux
With IP early demux added in linux-3.6, we perform TCP lookup in IP
layer before iptables hooks.

We can avoid doing a second lookup in xt_socket.

Change-Id: I9a29233ab0acc40a528374910c010e383af3eaf3
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Git-commit: 00028aa37098168048728acc32ab0206687f2920
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[harouth@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2015-12-14 09:53:06 -07:00
Linux Build Service Account f04aae3c62 Merge "ASoC: msm: fix indefinite wait in compress drain" 2015-12-11 18:49:17 -08:00
Linux Build Service Account 6ed85c52df Merge "qcom: core_ctl_helper: Add wrapper for CPU hotplug" 2015-12-11 18:49:16 -08:00
Linux Build Service Account f87a3e26f2 Merge "ARM: dts: Modify GPU power level for msm8976" 2015-12-11 18:49:14 -08:00
Linux Build Service Account 2e5f51b9f2 Merge "mmc: block: stop BKOPs before handling RPMB and ioctl" 2015-12-11 18:49:13 -08:00
Linux Build Service Account 25d745773b Merge "Revert "ARM: unwinder: fix excessive logging issue"" 2015-12-11 18:49:12 -08:00
Linux Build Service Account 9ea57bec36 Merge "ARM: dts: msm: defer touch resume on msm8952 QRD and msm8976 QRD" 2015-12-11 18:49:11 -08:00
Linux Build Service Account 3512879e40 Merge "input: ft5x06: defer touch resume to workqueue" 2015-12-11 18:49:10 -08:00
Linux Build Service Account e4eb8354ac Merge "msm: mdss: Fixed secure display control scm call id" 2015-12-11 18:49:10 -08:00
Linux Build Service Account 8a5275d726 Merge "ASoC: msm: qdsp6v2: extend wakelock hook to all misc drivers" 2015-12-09 19:02:37 -08:00
Prakash Kamliya e0ba7449a4 ARM: dts: Modify GPU power level for msm8976
Keep optimum powerlevels for msm8976 to help
performance and power.

Change-Id: Ie387152c37b433b330fa360de15ddddbb11d2876
Signed-off-by: Prakash Kamliya <pkamliya@codeaurora.org>
2015-12-07 04:31:31 -08:00
Linux Build Service Account 84a71d3cfe Merge "mmc: block: workaround for timeout issue with some vendor devices" 2015-12-04 12:44:23 -08:00
Linux Build Service Account 5a42580d46 Merge "ARM: dts: msm: correct stereo wsa speaker setting for 8976 devices" 2015-12-04 12:44:22 -08:00
Linux Build Service Account b5154c4552 Merge "ASoC: msm8x16-wcd: Fix hph pop in switching usecase" 2015-12-04 12:44:22 -08:00
Linux Build Service Account bec5b28b9c Merge "soundwire: put soundwire in suspend state when system is idle" 2015-12-04 12:44:21 -08:00
Linux Build Service Account 182099f21d Merge "ASoC: wcd9335: re-set micb_ref to zero post SSR" 2015-12-04 12:44:20 -08:00
Linux Build Service Account d8a3173b68 Merge "power: smbcharger: Re-run AICL irrespective of the AICL status" 2015-12-04 12:44:00 -08:00
Linux Build Service Account 0fb91456df Merge "ASoC: wcd9335: add fixes for TX pop and spkr gain updates" 2015-12-04 12:43:59 -08:00
Linux Build Service Account 8bdc809e8d Merge "mmc: core: disable clock scaling before mmc suspend" 2015-12-04 12:43:58 -08:00
Linux Build Service Account 8fa34efd7f Merge "net: rmnet_data: Add RXCSUM capability to netdevices" 2015-12-04 12:43:56 -08:00
Linux Build Service Account e4dafef3a2 Merge "clk: qcom: clock-cpu-8976: Add required fmax rates to OPP" 2015-12-04 12:43:55 -08:00
Linux Build Service Account 1bc0c933d6 Merge "msm: vidc: disable CPU L2 cache PC during video sessions" 2015-12-04 12:43:49 -08:00
Linux Build Service Account e6fca824a2 Merge "ARM: dts: msm: update mincpubw voting for MSM8976/8956" 2015-12-04 12:43:48 -08:00
Linux Build Service Account aeccea23eb Merge "ARM: dts: msm: configure pc disable latency for 8976" 2015-12-04 12:43:42 -08:00
Linux Build Service Account e123198888 Merge "sched: encourage idle load balance and discourage active load balance" 2015-12-04 12:43:41 -08:00
Linux Build Service Account e6a6903795 Merge "ARM: dts: msm: Add pm-qos for msm8976" 2015-12-04 12:43:41 -08:00
Linux Build Service Account fa81b52e1f Merge "ARM: dts: msm: Remove 133Mhz power level" 2015-12-04 12:43:40 -08:00
Linux Build Service Account 7afb657e81 Merge "ARM: dts: msm: Modify floor values for gpu bus votes" 2015-12-04 12:43:39 -08:00
Linux Build Service Account 18f76fb4ea Merge "clk: qcom: clock-pll: Print PLL registers in case of pll lock failure" 2015-12-04 12:43:38 -08:00
Linux Build Service Account 10bf84649e Merge "mmc: block: Do not call post_req in DCMD case" 2015-12-04 12:43:34 -08:00
Linux Build Service Account 526d5408f4 Merge "dma-buf: Check return value of anon_inode_getfile" 2015-12-04 12:43:33 -08:00
Linux Build Service Account 953d2255a4 Merge "ASoC: msm: increase slimbus channel FIFO watermark value" 2015-12-04 12:43:28 -08:00
Linux Build Service Account 75b4505e08 Merge "ASoC: msm-cpe-lsm: Queue 2 buffers with slimbus before afe start" 2015-12-04 12:43:27 -08:00
Linux Build Service Account 36a98dc86c Merge "ASoC: msm: add support for faster CPE data transfer rate" 2015-12-04 12:43:26 -08:00
Linux Build Service Account 8d251d3cf2 Merge "ASoC: wcd9335: reset CPE TX PP buffer memory" 2015-12-04 12:43:24 -08:00
Junjie Wu d6e56a4f37 qcom: core_ctl_helper: Add wrapper for CPU hotplug
Different kernel version needs to use different kernel APIs for
hotplug. Add wrapper for CPU hotplug so that external module can be
used across different kernel releases.

Use cpu_up/cpu_down() API for CPU hotplug.

Change-Id: Ib36a875027f67b96e2d108de8b7d902978e50005
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
2015-12-04 11:39:08 -08:00
Weiyin Jiang 770f089006 ASoC: msm: qdsp6v2: extend wakelock hook to all misc drivers
Extend PM_AWAKE and PM_RELAX interfaces to all misc drivers as to allow
their clients in user space to hold ARM core during time out count down.

Change-Id: I754f6198201e47826857459ef0fd18a7c7834310
Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
2015-12-04 07:38:03 -08:00
zhaoyuan 610106503f ARM: dts: msm: defer touch resume on msm8952 QRD and msm8976 QRD
Add support for deferring touch resume to a workqueue on
msm8952 QRD and msm8976 QRD.

Change-Id: I718f2a5efc13c906025ad17932a36612b6115f8c
Signed-off-by: Himanshu Aggarwal <haggarwa@codeaurora.org>
Signed-off-by: zhaoyuan <yzhao@codeaurora.org>
2015-12-04 10:30:40 +05:30
zhaoyuan 38fb912361 input: ft5x06: defer touch resume to workqueue
During device resume, the touch resume function is called after display's
resume. In this case, the ft5x06's resume function needs to wait for
200ms because of reset requirement. Defer the touch resume to a workqueue
to reduce the total device resume time. For this an optional DT property
is added to enable this on targets that need this feature.

Change-Id: Ib0677ca792aea83ece1caf8a0afff341302747fb
Signed-off-by: Himanshu Aggarwal <haggarwa@codeaurora.org>
Signed-off-by: zhaoyuan <yzhao@codeaurora.org>
2015-12-04 10:24:59 +05:30
Anirudh Ghayal 3b95baa5ec power: smbcharger: Re-run AICL irrespective of the AICL status
In the current implementation AICL is not re-run if its already
in progress. However in case where ICL gets updated while AICL
is in progress, the updated ICL value is not considered unless
AICL re-runs again. Handle this by re-running AICL irrespective of
the AICL status.

CRs-Fixed: 907473
Change-Id: I4a021e6ca148d0c218701cfb8a671d1e2dac6fee
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2015-12-03 04:16:14 -08:00
Ashay Jaiswal 7b016b58b5 ARM: dts: msm: enable AICL reruns for PMi8950 smbcharger
Enable AICL reruns for the PMi8950 smbcharger in order to allow it to
recover any current loss from glitchy AICL results.
Set the AICL rerun period to 180 seconds on PMI8950 to avoid waking
up all the time when charging.

CRs-Fixed: 920791
Change-Id: I24a734f3ed489ca50eb00aa9421816162c3fc9e5
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2015-12-03 04:15:23 -08:00
Xiaozhe Shi bbb7583442 power: qpnp-smbcharger: add module params for default ICL
Add module parameters to configure default ICLs for USB DCP and HVDCPs
in order to facilitate testing.

CRs-Fixed: 930588
Change-Id: I5fa1cdef010821211d3baa1797fdb72110d86a10
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:14:57 -08:00
Xiaozhe Shi 77f591822f power: qpnp-smbcharger: vote for FCC as BATT_TYPE
Use the BATT_TYPE voter for FCC instead of USER. This way the user can
set FCCs higher than the device tree limit.

Change-Id: Id386f8afd1bef2d1774730b214f1b97d64a6476b
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:14:41 -08:00
Xiaozhe Shi c8cb98c268 power: qpnp-smbcharger: support ICL adjustments through DP_DM
Support adjusting the usb ICL up and down through the DP_DM interface for
HVDCP 3.0.

CRs-Fixed: 930588
Change-Id: Ic24f946522d7ae0ec0a52f127118ac5a0d908277
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:14:22 -08:00
Xiaozhe Shi 442f488036 power: power_supply: add new enums for DP_DM
Add the ICL_DOWN and ICL_UP enums for POWER_SUPPLY_PROP_DP_DM in order
to allow hvdcpd to configure the relative input current limit.

CRs-Fixed: 930588
Change-Id: I80e37e241e145a81d6defe69fe5cbab1127cf933
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:14:00 -08:00
Xiaozhe Shi 6f21b4137a power: qpnp-smbcharger: draw more current from PMi in parallel chg
Current the smbcharger is splitting the ICL and charge current fairly
naively. This can cause problems where one charger is FCC limited and
another charger is ICL limited, causing a lot of wasted charge current.

Do a better current distribution to maximize the amount of charge
current going into the battery. By default, raise the ICL ratio of the
primary charger up to 60% to avoid issues with system load prematurely
causing the charger to current limit. Lower the FCC ratio back to 50% to
accommodate this.

Also, make both of these properties configurable through module
parameters and device tree in order to accommodate differences in pcb
and battery limitation.

CRs-Fixed: 930588
Change-Id: I77ec8483232e4297936baaad1e9bb4399474d444
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:13:37 -08:00
Xiaozhe Shi 8855a2d303 power: qpnp-smbcharger: optimize HVDCP 2.0 efficiency
At 9V, the smbcharger is more efficient at a switching frequency of
1MHz. Switch to this when the driver detects that it is in HVDCP 2.0
mode. Also, switch the VFIX clamping voltage threshold so that the
frequency is maintained.

CRs-Fixed: 910651
Change-Id: I4b8e1d360fe301671e882f20b2460cdb737204b0
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:12:57 -08:00