defconfig: remove support for /dev/mem and /dev/kmem on perf builds

Keeping /dev/mem and /dev/kmem exposed to userspace allows userspace
to peek/poke to these areas and is a security risk. Remove support for
/dev/mem and /dev/kmem on perf builds.

Change-Id: Iad85b34039a67c5f8796adfd16543a94a1bc3054
CRs-Fixed: 530719
Signed-off-by: Sarang Joshi <spjoshi@codeaurora.org>
wcnss: Trigger WCNSS driver on first open.

WCNSS driver requires a trigger followed by an open, this is to support
the trigger from an external script. However, startup scripts are no
more supported; and wcnss service should always trigger this driver. So
the first open to this driver (that is from wcnss service), should also
trigger the driver.

Change-Id: I843c044d4fa452ca541a62255bbcb33b9d7f6eb0
CRs-fixed: 611763
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
msm: Make CONFIG_STRICT_MEMORY_RWX even stricter

If CONFIG_STRICT_MEMORY_RWX was set, the first section (containing
the kernel page table and the initial code) and the section
containing the init code were both given RWX permission, which is
a potential security hole.

Pad the first section after the initial code (which will never
be executed when the MMU is on) to make the rest of the kernel
text start in the second section and make the first section RW.

Move some data which had ended up in the "init text"
section into the "init data" one, as this is RW, not RX.
Make the "init text" RX.

We will not free the section containing the "init text",
because if we do, the kernel will allocate memory for RW data there.

Change-Id: I6ca5f4e07342c374246f04a3fee18042fd47c33b
CRs-fixed: 513919
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
msm: qdsp6v2: Deleting kernel driver from arch/arm/mach-msm/qdsp6v2

Driver is registering under misc driver but exists under arch/arm/mach

Change-Id: I1c8cff14a48550d1089593b28de7023160184cf0
CRs-Fixed: 548017
Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>
net: fib: fix incorrect call_rcu_bh()

After IP route cache removal, I believe rcu_bh() has very little use and
we should remove this RCU variant, since it adds some cycles in fast
path.
Anyway, the call_rcu_bh() use in fib_true is obviously wrong, since
some users only assert rcu_read_lock().

4619.617291:   <0> Internal error: Oops: 5 [#1] PREEMPT SMP ARM
114619.622541:   <4> Modules linked in: wlan(O) adsprpc [last unloaded: wlan]
114619.628980:   <4> CPU: 1    Tainted: G        W  O  (3.4.0-g366f2d7-00028-gde45140 #1)
114619.636427:   <4> PC is at leaf_walk_rcu+0x50/0x9c
114619.640761:   <4> LR is at fib_route_seq_next+0x58/0x7c
...[ Dmesg snip snip ]...
14620.187747:   <0> 5fe0: 405a3cd4 405a3ca0 007207ac 0071c098 80000010 00000012 00000000 00000000
114620.196018:   <4> [<c0720ec4>] (leaf_walk_rcu+0x50/0x9c) from [<c07210b0>] (fib_route_seq_next+0x58/0x7c)
114620.205114:   <4> [<c07210b0>] (fib_route_seq_next+0x58/0x7c) from [<c01642d8>] (seq_read+0x304/0x498)
114620.213964:   <4> [<c01642d8>] (seq_read+0x304/0x498) from [<c018daf8>] (proc_reg_read+0x80/0x98)
114620.222388:   <4> [<c018daf8>] (proc_reg_read+0x80/0x98) from [<c0147e90>] (vfs_read+0xa4/0x12c)
114620.230720:   <4> [<c0147e90>] (vfs_read+0xa4/0x12c) from [<c0147f4c>] (sys_read+0x34/0x68)
114620.238625:   <4> [<c0147f4c>] (sys_read+0x34/0x68) from [<c000e2e0>] (ret_fast_syscall+0x0/0x30)

CRs-Fixed: 614067

Change-Id: If493d4873de2ab5fa17e54b451871b4b3d469865
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-commit: 0c03eca3d995e73d691edea8c787e25929ec156d
Git-repo: https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.10
Signed-off-by: Vijaya Kumar T M <vtmuni@codeaurora.org>
WLAN subsystem: Sysctl support for key TCP/IP parameters

It has been observed that default values for some of key tcp/ip
parameters are affecting the tput/performance of the system. Hence
extending configuration capabilities to TCP/Ip stack through
sysctl interface.

Change-Id: I0c99d5b50cbe0d6496e40d391eacc12b0c62dbed
CRs-Fixed: 507581
Signed-off-by: Mahesh A Saptasagar <msapta@codeaurora.org>
Merge "msm: qdsp6v2: Deleting kernel driver from arch/arm/mach-msm/qdsp6v2"
Merge "Merge "msm: qdsp6v2: Deleting kernel driver from arch/arm/mach-msm/qdsp6v2""
[media] media: Init the reserved fields of struct media_link_desc

struct media_link_desc is copy_to_user'ed as the return value of
MEDIA_IOC_ENUM_LINKS. When copying, the driver is omitting to initialise
the reserved fields.  This commit fixes that by initialising the
reserved fields to 0.

CRs-Fixed: 570757
Change-Id: I230e2666c0845cc36399518a0f2c94db664382d1
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
Merge "msm: Make CONFIG_STRICT_MEMORY_RWX even stricter"
power: don't wait for timeout if sys_sync completes early

In some cases the suspend thread is waiting for timer to expire
even if the sync workqueue is empty. So the suspend is taking extra
time.
To avoid this waiting, sending the completion event from
last sync item in workqueue.

CRs-Fixed: 583016

Change-Id: Ia3219e90762ec7f6ad3e7096126832acfd03ed69
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
msm: clock-rpm: Make rpm clocks sleeping clocks

Now that we have clk_prepare/unprepare we can make the RPM clocks
sleepable. This allows us to move the sometimes costly busy wait
that RPM clocks incur when enabling and disabling or changing
rates.

CRs-Fixed: 552223

Change-Id: I8ac53c0b7fc79e56051b19fedb6910ac3f1cda42
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Git-commit: b500badb5dc821dd92f93833003170cb9ae106b0
Git-repo: https://android.googlesource.com/kernel/msm/
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
Merge "Merge "Merge "msm: qdsp6v2: Deleting kernel driver from arch/arm/mach-msm/qdsp6v2"""
kernel: enable internaldb on perf build

Enable internaldb for performance build.
It is already enabled on non-performance build.

Change-Id: I2e89ed6ef1fec080a9c753f370de7887236f1eb3
CRs-Fixed: 607058
Signed-off-by: Mihir Shete <smihir@codeaurora.org>
Merge "net: fib: fix incorrect call_rcu_bh()"
Merge "wcnss: Trigger WCNSS driver on first open."
Revert "msm:camera: Disable/enable VFE write masters properly during overflow"

This reverts commit 8579e70bfb06885c1530e7e0c6b0410050e8cba8.

Change-Id: I8152f6d3be841b296c300e3513eb013ee7fe31fb
Signed-off-by: Katta Santhisindhu <kattas@codeaurora.org>
arm: mach-msm: fix integer overflow in DFE_IOCTL_COMMAND

Added error checks for upper limit of param.num in
DFE_IOCTL_COMMAND

Change-Id: I0143813d38ec7a5dfa7a8307b075daf7d4a4d101
Acked-by: John Nicholas <jnichola@qti.qualcomm.com>
Signed-off-by: Venkatesh Yadav Abbarapu <quicvenkat@codeaurora.org>
arm: mach-msm: fix integer overflow in DFE ioctls for reg arr rw

Added error checks for upper limit of param.num in DFE ioctls
for register array r/w

Change-Id: I62d2eac38024c6c64f8d2d0f6d65f409569b2a76
Acked-by: John Nicholas <jnichola@qti.qualcomm.com>
Signed-off-by: Venkatesh Yadav Abbarapu <quicvenkat@codeaurora.org>
qseecom: Validate the pointer returned by ion_import_dma_buf

Do a "IS_ERR_OR_NULL" check for the return value of
ion_import_dma_buf.

Change-Id: Iaac8b59b1f076d002430e0e6aba055bd88c83ed7
Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>