diag: Add logs & events streaming support for DCI

Diag driver is adding a new feature to stream logs & events to a
user space application on Linux processor. This will eliminate
need to connect QXDM to receive diag traffic.
This is known as Diag Consumer Interface (DCI).

Change-Id: I7983bb7d9b8a0429ebbee290868c8bd0e562953f
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
diag: Add fixes for DCI

1) Fix an issue where after running a DCI app and exiting it,
 second app does not receive any DCI data. Issue was due to
 incorrect state of a flag used by SMD channel.

2) Add a mutex around shared data structures like cumulative masks.
Multiple clients may want to change DCI mask at the same time, so
mutex will prevent any corruption

3) Add support for health commands. The client request how many logs
were dropped and received.

Change-Id: Ica12b3c93aa4dda9b04aa13cd5a9f8dbc412148c
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
diag: Improve handling of IOCTLs

DIAG kernel driver interacts with user space processes using
IOCTLS. This change adds conditions to avoid potential integer
over/underflow, incorrect buffer copy.

CVE-2012-4220
CVE-2012-4221

Change-Id: Ic1e815051ae9544c911c9a5bd0c9218c1225f6d5
CRs-Fixed: 385352
CRs-Fixed: 385349
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
msm: display: non-blocking for overlay update

Display commit will work as overlay commit when
MDP_DISPLAY_COMMIT_OVERLAY flag is set. It will be
non-blocking if wait_for_finish is false.

Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Change-Id: Ibd143dbfcd2fdd7a8fab3038c5af4e2fbc9ea198
iommu/msm: fix the include guard in iommu.h

msm_soc_version_supports_iommu_v1() was defined outside the guard.

Change-Id: I47a579cf14c159c4cbe44b855067c0b82da7b552
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
Signed-off-by: Alex Wong <waiw@codeaurora.org>