2 years agotegra-alt: adsp: avoid sleep in send msg
Viraj Karandikar [Thu, 1 Sep 2016 10:25:10 +0000]
tegra-alt: adsp: avoid sleep in send msg

Do not use blocking flag for mailbox send function.
Use mdelay instead of msleep

Bug 200222934

Change-Id: I9c121f50debb46b191ad735f7445bbe5c026e30a
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/1217913
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agotegra-alt: adsp: schedule work for freq override
Viraj Karandikar [Wed, 31 Aug 2016 12:23:14 +0000]
tegra-alt: adsp: schedule work for freq override

Schedule worker function for frequency override to avoid
adsp_override_freq() and clk_set_rate() getting called
from atomic context.

Bug 200222934

Change-Id: Ia65ce4a617bfd4494d04bdfac8b28e6d8260943c
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/1211239
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Puneet Saxena <puneets@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>

2 years agoBACKPORT: FROMLIST: arm64: mm: support ARCH_MMAP_RND_BITS.
dcashman [Tue, 29 Dec 2015 23:28:13 +0000]
BACKPORT: FROMLIST: arm64: mm: support ARCH_MMAP_RND_BITS.

(cherry picked from commit https://lkml.org/lkml/2015/12/21/340)

arm64: arch_mmap_rnd() uses STACK_RND_MASK to generate the
random offset for the mmap base address.  This value represents a
compromise between increased ASLR effectiveness and avoiding
address-space fragmentation. Replace it with a Kconfig option, which
is sensibly bounded, so that platform developers may choose where to
place this compromise. Keep default values as new minimums.

Signed-off-by: Daniel Cashman <dcashman@android.com>
Signed-off-by: Daniel Cashman <dcashman@google.com>

Bug: 27796957
Patchset: ASLR sysctl

Bug 200227120

Change-Id: I2bce64c83f21c0c358e743d0d04239c805cca3f1
Signed-off-by: Kees Cook <keescook@google.com>
Signed-off-by: Vaibhav Shinde <vashinde@nvidia.com>
(cherry picked from commit 83b2f515c113d457e4be773e5f024212cf77eece)
Reviewed-on: http://git-master/r/1209026
Reviewed-by: Sri Krishna Chowdary <schowdary@nvidia.com>
Reviewed-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

2 years agoFROMLIST: mm: mmap: Add new /proc tunable for mmap_base ASLR.
dcashman [Tue, 29 Dec 2015 22:24:39 +0000]
FROMLIST: mm: mmap: Add new /proc tunable for mmap_base ASLR.

(cherry picked from commit https://lkml.org/lkml/2015/12/21/337)

ASLR  only uses as few as 8 bits to generate the random offset for the
mmap base address on 32 bit architectures. This value was chosen to
prevent a poorly chosen value from dividing the address space in such
a way as to prevent large allocations. This may not be an issue on all
platforms. Allow the specification of a minimum number of bits so that
platforms desiring greater ASLR protection may determine where to place
the trade-off.

Signed-off-by: Daniel Cashman <dcashman@android.com>
Signed-off-by: Daniel Cashman <dcashman@google.com>

Bug: 27796957
Patchset: ASLR sysctl

Bug 200227120

Change-Id: I1278914139a2e3910a301ab34755f409076768e7
Signed-off-by: Kees Cook <keescook@google.com>
Signed-off-by: Vaibhav Shinde <vashinde@nvidia.com>
(cherry picked from commit 6619fc5ad5427451d04903df37b37204502febb8)
Reviewed-on: http://git-master/r/1209024
Reviewed-by: Sri Krishna Chowdary <schowdary@nvidia.com>
Reviewed-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

2 years agoFROMLIST: arm: mm: support ARCH_MMAP_RND_BITS.
dcashman [Tue, 29 Dec 2015 23:07:17 +0000]
FROMLIST: arm: mm: support ARCH_MMAP_RND_BITS.

(cherry picked from commit https://lkml.org/lkml/2015/12/21/341)

arm: arch_mmap_rnd() uses a hard-code value of 8 to generate the
random offset for the mmap base address.  This value represents a
compromise between increased ASLR effectiveness and avoiding
address-space fragmentation. Replace it with a Kconfig option, which
is sensibly bounded, so that platform developers may choose where to
place this compromise. Keep 8 as the minimum acceptable value.

Signed-off-by: Daniel Cashman <dcashman@android.com>
Signed-off-by: Daniel Cashman <dcashman@google.com>

Bug: 27796957
Patchset: ASLR sysctl

Bug 200227120

Change-Id: Ia3c4bf2e765662fa3f600e1b626ac1543b0f0149
Signed-off-by: Kees Cook <keescook@google.com>
(cherry picked from commit 96d089f37baee5083d894e1ca8c8d669adfd67b4)
Signed-off-by: Vaibhav Shinde <vashinde@nvidia.com>
Reviewed-on: http://git-master/r/1209023
Reviewed-by: Sri Krishna Chowdary <schowdary@nvidia.com>
Reviewed-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

2 years agonet: wireless: bcmdhd_88: Add statistics counters
Michael Hsu [Tue, 13 Sep 2016 02:43:22 +0000]
net: wireless: bcmdhd_88: Add statistics counters

Implement stat sysfs node to report statistics:
- connects / disconnects
- f/w tx/rx counters
- firmware hangs
- connected wifi channels
- wifi power on failures
- etc.

Bug 1743467
Bug 200229148

Change-Id: I9007b73107cb63a19e6a29552b87bf58dce3ca66
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-on: http://git-master/r/1219414
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

2 years agotegra210-platforms: increase pwm granularity to 16 bits
Martin Gao [Fri, 26 Aug 2016 01:08:50 +0000]
tegra210-platforms: increase pwm granularity to 16 bits

For Darcy
- originally pwm ranges from 0 - 256, and lacks granularity
- increases to use 16 bits instead (0 - 65536)

Bug 1542391

Change-Id: Ia84338741e1a0ad4647cecabad23091edf3b27f6
Signed-off-by: Martin Gao <marting@nvidia.com>
Reviewed-on: http://git-master/r/1200172
(cherry picked from commit 3d35d72e7e220c10e3a8b75a7c7a3146adcce45c)
Reviewed-on: http://git-master/r/1219069
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

2 years agonvavp: Add missing mutex unlock
Soumen Kumar Dey [Thu, 15 Sep 2016 03:53:29 +0000]
nvavp: Add missing mutex unlock

Add missing mutex unlock for nvavp_submit.

bug 1775299

Change-Id: I1b525e192bfd9dd19bcd0211484400445eda7b2b
Signed-off-by: Soumen Kumar Dey <sdey@nvidia.com>
Reviewed-on: http://git-master/r/1221122
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

2 years agoarm64: boot: dts: darcy: New Fan settings
Anshul Jain [Thu, 16 Jun 2016 22:21:49 +0000]
arm64: boot: dts: darcy: New Fan settings

New fan table:
T.cpu PWM Hysterisis
63 65 30
65 110 1
79 160 10

Bug 1716449

Change-Id: I5be46de778b3cbbadb112058dcc68f43b31ad744
Signed-off-by: Anshul Jain <anshulj@nvidia.com>
Reviewed-on: http://git-master/r/1166129
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
(cherry picked from commit ec8ee6636f3d7922a3b3fa3991d16dcce140312a)
Reviewed-on: http://git-master/r/1220206
Reviewed-by: Automatic_Commit_Validation_User

2 years agostop_machine: serialize disable IRQ sequence
Prafull Suryawanshi [Mon, 2 Nov 2015 09:09:02 +0000]
stop_machine: serialize disable IRQ sequence

bug 200044022

On T124 platforms, we hit a hang on cpu_down(cpu=3) where
CPU3 gets stuck waiting on the gic irq_controller_lock in
gic_eoi_irq. The other CPUs have already entered the
DISABLE_IRQ stop machine state at this point.
This therefore causes the watchdog to timeout and the
system to reset. Given that we have the stopper thread
scheduled (preemption disabled), the 'hang scenario' most
likely manifests itself due to some sort of issue in
the irq context. Sequentially entering the DISABLE_IRQ
state from CPU3->CPU0 seem to somehow prevent this hang.

This change is only meant to be a temporary workaround
to improve system stability and is by no means a fix
of any sort. To that end, it is wrapped in a CONFIG
option that is turned off by default, except for T12x.

Change-Id: Ic50ecd5a6d429706e4f68bcd133707fae4e692ce
Signed-off-by: Prafull Suryawanshi <prafulls@nvidia.com>
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/827027
Reviewed-by: Vaibhav Shinde <vashinde@nvidia.com>
Tested-by: Vaibhav Shinde <vashinde@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
GVS: Gerrit_Virtual_Submit

2 years agoiio: common: NVS HAL API 1.4 support
Erik Lilliebjerg [Sun, 21 Aug 2016 09:03:06 +0000]
iio: common: NVS HAL API 1.4 support

- Add support for Android sensor HAL API 1.4:
  - Add API 1.4 sensor definitions.
  - Add dynamic sensor support.

Change-Id: Id6ad4e6200d3d980b60e8fecd1408bd92014c682
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1206627
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>
GVS: Gerrit_Virtual_Submit

2 years agoXCHI: version is not needed.
David DSH [Mon, 29 Aug 2016 18:52:10 +0000]
XCHI: version is not needed.

Move version to user space.

Bug 1764715

Change-Id: Ifa8e16a0c4d3181e422976e0fe9f28f43578f84a
Signed-off-by: David DSH <ddastoussthi@nvidia.com>
Reviewed-on: http://git-master/r/1209231
(cherry picked from commit dda519af9b636ed0e47c2a3dcdcaf21c9a73e0e6)
Reviewed-on: http://git-master/r/1217153
Reviewed-by: Martin Gao <marting@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

2 years agommc: card: test: Fix out of boundary array access
Xia Yang [Mon, 15 Aug 2016 21:56:51 +0000]
mmc: card: test: Fix out of boundary array access

Allocate buffer with 1 extra byte for NULL terminator.

Bug 1791602

Change-Id: I3c3658315c2cd2a1dc7be7d72953998a5275e71e
(cherry picked from commit 53f628117d0a092182254ad81bc38cf943b994e3)
Signed-off-by: Mithun Maragiri <mmaragiri@nvidia.com>
Reviewed-on: http://git-master/r/1213890
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

2 years agoproc: make proc_fd_permission() thread-friendly
Oleg Nesterov [Wed, 11 Sep 2013 21:24:37 +0000]
proc: make proc_fd_permission() thread-friendly

proc_fd_permission() says "process can still access /proc/self/fd after it
has executed a setuid()", but the "task_pid() = proc_pid() check only
helps if the task is group leader, /proc/self points to
/proc/<leader-pid>.

Change this check to use task_tgid() so that the whole thread group can
access its /proc/self/fd or /proc/<tid-of-sub-thread>/fd.

Notes:
- CLONE_THREAD does not require CLONE_FILES so task->files
  can differ, but I don't think this can lead to any security
  problem. And this matches same_thread_group() in
  __ptrace_may_access().

- /proc/self should probably point to /proc/<thread-tid>, but
  it is too late to change the rules. Perhaps it makes sense
  to add /proc/thread though.

Test-case:

void *tfunc(void *arg)
{
assert(opendir("/proc/self/fd"));
return NULL;
}

int main(void)
{
pthread_t t;
pthread_create(&t, NULL, tfunc, NULL);
pthread_join(t, NULL);
return 0;
}

fails if, say, this executable is not readable and suid_dumpable = 0.

Bug 200226999

Change-Id: I4a0f2648e257b75c8b03516a63f655a1adbe942c
(Cherry-picked from 96d0df79f2644fc823f26c06491e182d87a90c2a)
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Vaibhav Shinde <vashinde@nvidia.com>
Reviewed-on: http://git-master/r/1212863
Reviewed-by: Sri Krishna Chowdary <schowdary@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Reviewed-by: Gagan Grover <ggrover@nvidia.com>

2 years agothermal: add sanity check for set state ops
Martin Gao [Tue, 30 Aug 2016 00:38:42 +0000]
thermal: add sanity check for set state ops

- add sanity check in set_cur_state ops, so that it only update state
  if set state is within max number of states supported

Bug 1806751

Change-Id: I9a57baf6b4e3847a639e4dcddb8336604f23b345
Signed-off-by: Martin Gao <marting@nvidia.com>
Reviewed-on: http://git-master/r/1216504
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

2 years agohid: jarvis: send report to app to control mic
siddardha naraharisetti [Wed, 25 May 2016 06:18:25 +0000]
hid: jarvis: send report to app to control mic

To control pepper mic, send report to userspace so that
it can send the report to pepper using gattservice
rather than sending message using hid output report.
this will help to prevent multiple concurrent requests
to pepper, as Gattservice will serialize the requests

Bug 1769205

Change-Id: Ifa2084610529cdf6353b547be267d6434b79e82e
Signed-off-by: siddardha naraharisetti <siddardhan@nvidia.com>
Reviewed-on: http://git-master/r/1153070
(cherry picked from commit 1c4276a801526e9ea42ae3247d5df57394a023a6)
Reviewed-on: http://git-master/r/1208539
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Spencer Sutterlin <ssutterlin@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

2 years agobcmdhd_88: increase timestamp array size
Bibhay Ranjan [Mon, 5 Sep 2016 18:35:35 +0000]
bcmdhd_88: increase timestamp array size

-add timestamp size too while calculating
total buffer size.

Bug 200231581

Reviewed-on: http://git-master/r/1207551
Change-Id: Ia261b20c476107f836f848e695d4f77adc41fa58
Signed-off-by: Bibhay Ranjan <bibhayr@nvidia.com>
Reviewed-on: http://git-master/r/1214965
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

2 years agoata: ahci_tegra: Fix RTPM issues
Preetham Chandru R [Fri, 12 Aug 2016 12:36:31 +0000]
ata: ahci_tegra: Fix RTPM issues

This bug fixes RTPM issues for few drives where
link does not go to low power modes. If drive
does not go to LPM it should only send standby command
and skip suspending SATA Controller

Bug 200224437

Change-Id: I2ab95796fdc7b1849c45c26fb6773aafc32cbb7d
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
Reviewed-on: http://git-master/r/1203574
(cherry picked from commit a3859e7b0046faca452cb5471dfa56d6ec06a1d2)
Reviewed-on: http://git-master/r/1211309
GVS: Gerrit_Virtual_Submit
Reviewed-by: Kerwin Wan <kerwinw@nvidia.com>
Tested-by: Kerwin Wan <kerwinw@nvidia.com>

2 years agobcmdhd: nv_logger: fix memory leak
Bibhay Ranjan [Thu, 25 Aug 2016 06:56:14 +0000]
bcmdhd: nv_logger: fix memory leak

-call kfree for internal structures.
-increase the size of the timestamp
 array to accomodate the complete time
 format.
-add timestamp size too while calculating
 total buffer size.

Bug 200231581

Change-Id: I64bb1ad7f5959f659653469101b2e230f302132f
Signed-off-by: Bibhay Ranjan <bibhayr@nvidia.com>
Reviewed-on: http://git-master/r/1207551
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

2 years agoRevert "mmc: host: Use SDR104 UHS mode for SDR50 mode"
R Raj Kumar [Wed, 31 Aug 2016 12:28:45 +0000]
Revert "mmc: host: Use SDR104 UHS mode for SDR50 mode"

- This reverts commit 32d6f044342573de290bcf86e55c1f5708eec229,
  since, UHS mode timing selections are already handled
  in sdhci tegra driver and this commit is not required.
- Select SDR104 mode for SDR50 mode by removing the NvQuirk.

Bug 1806889

Change-Id: If4025f206cf2caddb7cc0252b927708c3e21a2df
Signed-off-by: R Raj Kumar <rrajk@nvidia.com>
Reviewed-on: http://git-master/r/1211242
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

2 years agovideo: tegra: hdmi: add check for valid fb
Prafull Suryawanshi [Wed, 24 Aug 2016 10:22:39 +0000]
video: tegra: hdmi: add check for valid fb

bug 200228662

When monitor kept connected while booting, dc can get hpd interrupt
before fb register is complete. This cause kernel panic. This change
checks if fb is valid and also cancel the hdmi state change if fb is
not ready yet.

Change-Id: I0a528ef83c9212a52c35ca62fc3d3d3eb0cca12a
Signed-off-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-on: http://git-master/r/1206999
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aly Hirani <ahirani@nvidia.com>
Reviewed-by: Santosh Galma <galmar@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>

2 years agotegra-profiler: fix security vulnerability issue
Igor Nabirushkin [Thu, 18 Aug 2016 08:35:20 +0000]
tegra-profiler: fix security vulnerability issue

Tegra Profiler: some fields of structs are not initialized.
So, when they are copied to user space, stack information leaks.

Bug 1797747

Change-Id: I2b00f30fa2e3360c412573d40faf96f45c113346
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/1208892
(cherry picked from commit 08d72717508f180fcf6f5b73557c4413356d76eb)
Reviewed-on: http://git-master/r/1210648
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

2 years agovideo: tegra: dc: fix bit depth of yuv422 mode
Michael Frydrych [Fri, 17 Jun 2016 14:39:30 +0000]
video: tegra: dc: fix bit depth of yuv422 mode

Bit depth of yuv422 mode was set to 10-bits, while it should
have been set to 12-bits. Incorrect bit depth resulted in the
mode not being intercepted when setting yuv422 black.

Bug 200102634
Bug 200182153

Change-Id: I6de42816a9aad92bc2c8bdfad70b1727a49fe94a
Signed-off-by: Michael Frydrych <mfrydrych@nvidia.com>
Reviewed-on: http://git-master/r/1167820
(cherry picked from commit 39aabae1c46710a5dd609690ab12746075640f7f)
Reviewed-on: http://git-master/r/1177570
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ivan Raul Guadarrama <iguadarrama@nvidia.com>
Tested-by: Ivan Raul Guadarrama <iguadarrama@nvidia.com>
Reviewed-by: Tuomas Kulve <tkulve@nvidia.com>
Reviewed-by: Aly Hirani <ahirani@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>

2 years agoxhci-tegra: t210: wait for U3 entry in bus suspend
Henry Lin [Sun, 14 Aug 2016 17:17:11 +0000]
xhci-tegra: t210: wait for U3 entry in bus suspend

In T210, U3 entry delay is expected as LFPS dectector WAR needs to
use two mailbox commands to implement. The two mailbox commands can be
finished among 2 ms most of time. But, in worst case, they may
take up to hundreds of ms. Waiting for U3 entry in bus suspend
for some time can avoid xhci-tegra driver to stop system suspend
for long U3 entry delay frequently.

Bug 200227198

Change-Id: I989e60e829d8bd9b085495d96f70580c6d7981ab
Signed-off-by: Henry Lin <henryl@nvidia.com>
Reviewed-on: http://git-master/r/1202447
(cherry picked from commit 1659d51b9ee211161af1653aef4f84cdad013aef)
Reviewed-on: http://git-master/r/1209494
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: WK Tsai <wtsai@nvidia.com>
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

2 years agoarm64: dts: Updating Wi-Fi country codes for Foster/Darcy
Mahesh Patil [Tue, 30 Aug 2016 05:56:08 +0000]
arm64: dts: Updating Wi-Fi country codes for Foster/Darcy

- Foster: Update EU country code with DFS support
- Foster: Update IN country code with EU w/o DFS
- Foster: Add CN country code
- Foster/Darcy: Add NZ country code, same as AU
- Foster/Darcy: Add HK country code, same as EU
- Foster/Darcy: Add SG country code, same as US

Bug 1792300
Bug 1792302

Change-Id: I3bf493b3d53da2cbe9656c15bcdc5b9732d88c15
Reviewed-on: http://git-master/r/1207549
(cherry picked from commit ef64644362f36f69dc2b7e427f2f6fdfeec8b8c5)
(cherry picked from commit 10192426e19b8711ac3362ef140c5e6d65a22dae)
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: http://git-master/r/1209546
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
Tested-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

2 years agonvtouch: dta: copy touches to dta ioctl data
Aaron Bartholomew [Wed, 15 Jun 2016 20:54:53 +0000]
nvtouch: dta: copy touches to dta ioctl data

need to add touches to the outgoing data to client
over nvtouch's dta ioctl

bug 1637284

Change-Id: I600aeff52838f97a653e9ad410951e641e816c6c
Signed-off-by: Aaron Bartholomew <abartholomew@nvidia.com>
Reviewed-on: http://git-master/r/1165177
Reviewed-by: Steve Rogers <srogers@nvidia.com>
(cherry picked from commit d486c17f3cd7d2a5dcf40cd4b02a4ab19fe4e10e)
Reviewed-on: http://git-master/r/1172604
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

2 years agoxt_qtaguid: fix printing kernel pointers
Nitin Kumbhar [Tue, 5 Jul 2016 07:59:14 +0000]
xt_qtaguid: fix printing kernel pointers

Kernel pointers are printed to all users. This could enable
a local malicious application to access data outside of its
permission levels. The fix is designed to not print kernel
pointers to any user.

CVE-2016-3809
Bug 1774591

Change-Id: Ia9d6fedd4a9d0811585586dbbaeb5ed151771c58
Reviewed-on: http://git-master/r/1175528
(cherry picked from commit 32b4fdc1d841f560fc52520a719193048e55a835)
Signed-off-by: Mithun Maragiri <mmaragiri@nvidia.com>
Reviewed-on: http://git-master/r/1205272
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
(cherry picked from commit 7050d35b2fa03ef788741abcc9e05f05ae222efe)
Reviewed-on: http://git-master/r/1209298

2 years agonet: disable capability check for net_bind_service
Xiao Bo Zhao [Wed, 27 Apr 2016 22:26:54 +0000]
net: disable capability check for net_bind_service

If group id matches, then skip capability and selinux check for capability
CAP_NET_BIND_SERVICE

Bug 200227789
Bug 1763043

Change-Id: I5935860c016d0f76b874595e83f2fd918f3fa36d
Signed-off-by: Xiao Bo Zhao <xiaoboz@nvidia.com>
Reviewed-on: http://git-master/r/1133850
Reviewed-by: Toby Butzon <tbutzon@nvidia.com>
Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Inamdar Sharif <isharif@nvidia.com>
Reviewed-by: Raymond Poudrier <rapoudrier@nvidia.com>
Reviewed-on: http://git-master/r/1177256
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-on: http://git-master/r/1207320
Tested-by: Patrick Horng <phorng@nvidia.com>

2 years agosecurity: tlk_driver: add support for PHYS_LIST handling.
Chris Johnson [Mon, 23 Mar 2015 23:37:35 +0000]
security: tlk_driver: add support for PHYS_LIST handling.

Bug 200091941
Bug 1754253

Change-Id: Ia5b920e6f45280b7a3fb4360b828612225af5761
Signed-off-by: Chris Johnson <cwj@nvidia.com>
Signed-off-by: Mahesh Lagadapati <mlagadapati@nvidia.com>
Reviewed-on: http://git-master/r/1132411
(cherry picked from commit 4c5acba1dbe4439258f4203823cdac5bee24a00b)
Reviewed-on: http://git-master/r/1164583
Reviewed-on: http://git-master/r/1119126
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

2 years agotlk: code cleanup
Mahesh Lagadapati [Mon, 10 Aug 2015 20:11:12 +0000]
tlk: code cleanup

Cleaned up the code to do proper error handling and to remove unused
variables.

Bug 200091941
Bug 1754253

Change-Id: Ia0e84451bbbb29edd35dd3060864c6e60cbc6192
Signed-off-by: Mahesh Lagadapati <mlagadapati@nvidia.com>
Reviewed-on: http://git-master/r/1132416
(cherry picked from commit 6ef9203cec6c77384b0a44c731c7fa050074dea2)
Reviewed-on: http://git-master/r/1164582
Reviewed-on: http://git-master/r/1119125
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

2 years agosecurity: tlk_driver: fix memory leak
Hridya Valsaraju [Tue, 2 Jun 2015 17:21:50 +0000]
security: tlk_driver: fix memory leak

Fix memory leak in te_pin_user_pages().
When get_user_pages() fail, free allocated memory and
release each mapped page from the page cache.

Bug 200091941
Bug 1754253

Change-Id: Ifdd311863916baa42e6e1b38f1692c72382bb44a
(cherry picked from commit 82f26d7cdd8244b498049e2ae49cc6ab87f21908)
Signed-off-by: Hridya Valsaraju <hvalsaraju@nvidia.com>
Signed-off-by: Mahesh Lagadapati <mlagadapati@nvidia.com>
Reviewed-on: http://git-master/r/1132415
Reviewed-on: http://git-master/r/1164581
Reviewed-on: http://git-master/r/1017875
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

2 years agoRevert "security: tlk_driver: lock/fault userspace pages"
Mahesh Lagadapati [Thu, 31 Mar 2016 19:59:58 +0000]
Revert "security: tlk_driver: lock/fault userspace pages"

This reverts commit a517ace37e656ea3023b527882d349329a026a84.

mlock is not required if buffers are send with physical address.

Bug 200091941
Bug 1754253

Change-Id: I82b7db24b33d867581d031d79230aa3265f1eb7e
Signed-off-by: Mahesh Lagadapati <mlagadapati@nvidia.com>
Reviewed-on: http://git-master/r/1132414
(cherry picked from commit edbda45bfce9e597ddee6f3b9ec49e3d7394eb36)
Reviewed-on: http://git-master/r/1164580
Reviewed-on: http://git-master/r/1119124
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

2 years agoRevert "security:tlk_driver:fix sys_munlock issue"
Mahesh Lagadapati [Thu, 31 Mar 2016 19:59:03 +0000]
Revert "security:tlk_driver:fix sys_munlock issue"

This reverts commit ddb690950d1402f995d0c73bb00bd5bf865cdda5.

mlock is not required if buffers are send with physical address.

Bug 200091941
Bug 1754253

Change-Id: I5240d41e6659461c0b43df015f6dc44db594174c
Signed-off-by: Mahesh Lagadapati <mlagadapati@nvidia.com>
Reviewed-on: http://git-master/r/1132413
(cherry picked from commit 2ab4f8b7e13e9343e94292778e674e6436b59eca)
Reviewed-on: http://git-master/r/1164579
Reviewed-on: http://git-master/r/1119123
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

2 years agot210: tegra-fuse: correct the fuse offsets
Shardar Shariff Md [Tue, 23 Aug 2016 12:17:05 +0000]
t210: tegra-fuse: correct the fuse offsets

Correct the fuse offsets for device_key, device_selection, reserved_sw
and arm_jtag_disable fuses

Bug 200214601

Change-Id: I52cbd48182cd8e3d9b8e76ec65cd43437c9ed05a
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Reviewed-on: http://git-master/r/1206366
(cherry picked from commit cb417897f5e103bfc4e37ecf4e030883c15d2f72)
Reviewed-on: http://git-master/r/1208300
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

2 years agobcmdhd_88: save the firmware events in a file
Bibhay Ranjan [Thu, 25 Aug 2016 16:22:54 +0000]
bcmdhd_88: save the firmware events in a file

Bug 200173848
Bug 200231606

Change-Id: Ifd77b012ebc6dcb5a762b4f4a3f054f0a6992b13
Reviewed-on: http://git-master/r/1011951
Signed-off-by: Bibhay Ranjan <bibhayr@nvidia.com>
Reviewed-on: http://git-master/r/1207869
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

2 years agoarm64: tegra: dts: remove unused codec node for jetson
Kerwin Wan [Wed, 24 Aug 2016 09:56:16 +0000]
arm64: tegra: dts: remove unused codec node for jetson

rt5659 was used as an audio evaluate card in jetson bringup
stage and later is replaced with super module.

Bug 200231270

Change-Id: Ibbb10856e967a29575a2d040ec4d87e1ecee0048
Signed-off-by: Kerwin Wan <kerwinw@nvidia.com>
Reviewed-on: http://git-master/r/1207109
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sameer Pujar <spujar@nvidia.com>

2 years agosched: Make CPU domains share pkg resources
Sai Gurrappadi [Mon, 23 Feb 2015 23:04:24 +0000]
sched: Make CPU domains share pkg resources

This allows for better use of idle CPUs in our SD_SHARE_PKG_RESOURCE
domain (top level sd). Hacking the default CPU sd instead of populating
this via the arch topology for experimentation.

Bug 200055047

Change-Id: I1d5a56fe35dd98b805b19940b4d6fb288c10af1e
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/724489
GVS: Gerrit_Virtual_Submit
Reviewed-by: Anshul Jain (SW) <anshulj@nvidia.com>
Tested-by: Anshul Jain (SW) <anshulj@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
(cherry picked from commit fb221b1b1786abdaec8b30f0563985989acd4125)
Reviewed-on: http://git-master/r/921536
Reviewed-by: David Lock <dlock@nvidia.com>
Tested-by: David Lock <dlock@nvidia.com>
Reviewed-by: Ilan Aelion <iaelion@nvidia.com>

2 years agommc: sdhci: tegra: nvidia,is-sdio DT attrib
Bitan Biswas [Tue, 26 Jul 2016 13:44:32 +0000]
mmc: sdhci: tegra: nvidia,is-sdio DT attrib

Added DT attribute nvidia,is-sdio for
sdhci tegra SDIO node for darcy and foster-e

bug 200206885

Change-Id: I8eb21413ae3bd643af0c7ff5c9926658d9602fdc
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/1190886
(cherry picked from commit e1a5fadf1a7ca1868419418c483c041fdf178973)
Reviewed-on: http://git-master/r/1205652
GVS: Gerrit_Virtual_Submit
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

2 years agommc: sdhci: tegra: SDIO 204MHz fixed clk
Bitan Biswas [Tue, 26 Jul 2016 14:03:54 +0000]
mmc: sdhci: tegra: SDIO 204MHz fixed clk

Set SDIO clock as fixed clock of 204MHz
based on DT attribute nvidia,is-sdio
This is to avoid 163.2MHz clock for SDIO.

bug 200206885

Change-Id: Iebc73bc4318afb7a034cda61791bd79d7c014c01
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/1190887
(cherry picked from commit 0a11dc77eb32ed1d73417bfe7f898ffce8bcedcc)
Reviewed-on: http://git-master/r/1205615
Reviewed-on: http://git-master/r/1205651
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agoARM64: dts: change FPS source for LDO0 and LDO1
Venkat Reddy Talla [Fri, 19 Aug 2016 05:52:11 +0000]
ARM64: dts: change FPS source for LDO0 and LDO1

Change LDO0 and LDO1 suspend FPS source to FPS1 to turn off
both LDO0, LDO1 regulators during SC7 state to reduce power
consumption.

Bug 200212058

Change-Id: Ib1435cab6930d848bf68ef33bd91420adcc8b4e4
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/1204843
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>

2 years agotegra: sor: dump NV_SOR_HDMI_GENERIC_CTRL reg
Arun Swain [Fri, 3 Jun 2016 19:02:59 +0000]
tegra: sor: dump NV_SOR_HDMI_GENERIC_CTRL reg

Add support for dumping NV_SOR_HDMI_GENERIC_CTRL
reg.

Bug 200122117

Change-Id: If237e64fdeff0cacd4837940a4c995db06900b52
Reviewed-on: http://git-master/r/1158841
(cherry picked from commit 79079e2eb8a8e2b3e350b0ee023e128b74ff963a)
Reviewed-on: http://git-master/r/1161998
(cherry picked from commit 9bcab483a068e809c70bb2f6b4d83c3efb5139b4)
Signed-off-by: Arun Swain <arswain@nvidia.com>
Reviewed-on: http://git-master/r/1206499
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>

2 years agotegra: hdmi: Fix HDR exit
Arun Swain [Fri, 3 Jun 2016 01:29:53 +0000]
tegra: hdmi: Fix HDR exit

Don't stop sending HDR infoframe if HDR is
re-eanbled in dc within the 2 secs of stipulated
time of starting the exit-hdr worker thread.

Bug 1773605

Change-Id: I1adafcf7b5c15b81b8dc614d8125c0e7b5e25cde
Reviewed-on: http://git-master/r/1158509
(cherry picked from commit 4bf5073ae63cd3f329d8b16fd6b67bed0fa190c4)
Reviewed-on: http://git-master/r/1161995
(cherry picked from commit 80f3c546a6dfa7bfd6d4f041e412d2e893d2b55e)
Signed-off-by: Arun Swain <arswain@nvidia.com>
Reviewed-on: http://git-master/r/1206498
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>

2 years agofs: enable UTF-8 character set
Jean Huang [Fri, 17 Jun 2016 21:28:28 +0000]
fs: enable UTF-8 character set

Bug 1778283

Change-Id: Ifdaa5f15605ef995c50ee91049a350a0f3b28069
Signed-off-by: Jean Huang <jeanh@nvidia.com>
Reviewed-on: http://git-master/r/1167151
(cherry picked from commit 461ab3591bfa2047bdea3e07d8917d3ecf620be2)
Reviewed-on: http://git-master/r/1175872
(cherry picked from commit 8356dd678e7ff53b45782e37e43f82ed522702f4)
Reviewed-on: http://git-master/r/1199399
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

2 years agocifs: enable CONFIG_CIFS_WEAK_PW_HASH to support LANMAN
Jean Huang [Thu, 16 Jun 2016 17:19:43 +0000]
cifs: enable CONFIG_CIFS_WEAK_PW_HASH to support LANMAN

Bug 200209739

Change-Id: I9684ba32a156512e46d010c4b06859343fecc751
Signed-off-by: Jean Huang <jeanh@nvidia.com>
Reviewed-on: http://git-master/r/1165348
(cherry picked from commit a104b3b17b826d9f5fa8f739ec0e9f327b0c8eb0)
Reviewed-on: http://git-master/r/1169723
(cherry picked from commit c551128cab43ef4fcf59bb425ba98177b54ecfb9)
Reviewed-on: http://git-master/r/1199398
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

2 years agoALSA: timer: Fix leak in events via snd_timer_user_tinterrupt
Kangjie Lu [Tue, 3 May 2016 20:44:32 +0000]
ALSA: timer: Fix leak in events via snd_timer_user_tinterrupt

The stack object “r1” has a total size of 32 bytes. Its field
“event” and “val” both contain 4 bytes padding. These 8 bytes
padding bytes are sent to user without being initialized.

Bug 1787007

Change-Id: I70d3702d220e0e192d8d582abc9fb0ac33566daf
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-on: http://git-master/r/1197222
(cherry picked from commit d99fadb0097c4058f3de8dc539f4088cc833976e)
Signed-off-by: Mithun Maragiri <mmaragiri@nvidia.com>
Reviewed-on: http://git-master/r/1203374
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agovideo: tegra: hdmi: fix AFD info in AVI infoframe
Prafull Suryawanshi [Mon, 22 Aug 2016 06:29:55 +0000]
video: tegra: hdmi: fix AFD info in AVI infoframe

Setting Active Format Information present bit to 0
in AVI infoframe as AFD is not currently  programmed.

bug 200229849

Change-Id: I078a6001ca86ed7f946aface8df42929dbb80e8a
Signed-off-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-on: http://git-master/r/1205573
GVS: Gerrit_Virtual_Submit
Reviewed-by: Santosh Galma <galmar@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>

2 years agommc: tegra: Add module param to configure boot part access
Ian Chang [Mon, 22 Aug 2016 09:40:39 +0000]
mmc: tegra: Add module param to configure boot part access

Added module parameter to configure boot partition access by
the driver. By default, boot partition access is disabled.
To enable boot partition access during modprobe, set
en_boot_part_access=1
For kernel cmd line configuration, use sdhci_tegra.en_boot_part_access=1

Bug 200174188
Bug 1788142
Bug 200205187

Change-Id: I3ea072045f31f410ddda3893838b49961605118c
Signed-off-by: Ian Chang <ianc@nvidia.com>
Reviewed-on: http://git-master/r/1205694
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Shih <rshih@nvidia.com>

2 years agoALSA: compress: fix an integer overflow check
Dan Carpenter [Wed, 16 Jul 2014 06:37:04 +0000]
ALSA: compress: fix an integer overflow check

I previously added an integer overflow check here but looking at it now,
it's still buggy.

The bug happens in snd_compr_allocate_buffer().  We multiply
".fragments" and ".fragment_size" and that doesn't overflow but then we
save it in an unsigned int so it truncates the high bits away and we
allocate a smaller than expected size.

Bug 1787007

Change-Id: I8123ec91a1befa6628151c8ab8ac0b1a6a9235fc
Fixes: b35cc8225845 ('ALSA: compress_core: integer overflow in snd_compr_allocate_buffer()')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-on: http://git-master/r/1197174
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Tested-by: Mithun Maragiri <mmaragiri@nvidia.com>
Reviewed-by: Woojung Min <wmin@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
(cherry picked from commit 4d74dbeda5893b7501ddcbcdae909fffa47ed09a)
Reviewed-on: http://git-master/r/1203354

2 years agobcmdhd: save the firmware events in a file
Bibhay Ranjan [Thu, 11 Feb 2016 21:33:46 +0000]
bcmdhd: save the firmware events in a file

Bug 200173848

Change-Id: Id359c0a8b811d03383aaab6fef5642d90613eb5a
Signed-off-by: Bibhay Ranjan <bibhayr@nvidia.com>
Reviewed-on: http://git-master/r/1011951
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agoALSA: timer: Fix leak in SNDRV_TIMER_IOCTL_PARAMS
Kangjie Lu [Tue, 3 May 2016 20:44:07 +0000]
ALSA: timer: Fix leak in SNDRV_TIMER_IOCTL_PARAMS

The stack object “tread” has a total size of 32 bytes. Its field
“event” and “val” both contain 4 bytes padding. These 8 bytes
padding bytes are sent to user without being initialized.

Bug 1787007

Change-Id: I2011f354d6ba6de55c8c8f3b5f4f4c7c19483094
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mithun Maragiri <mmaragiri@nvidia.com>
Reviewed-on: http://git-master/r/1197219
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Woojung Min <wmin@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
(cherry picked from commit 05d23eabd548e4b1727ba49c330a590cd3fd1cd7)
Reviewed-on: http://git-master/r/1203357

3 years agonet: validate the range we feed to iov_iter_init() in sys_sendto/sys_recvfrom
Al Viro [Tue, 2 Aug 2016 09:21:30 +0000]
net: validate the range we feed to iov_iter_init() in sys_sendto/sys_recvfrom

Bug 1787007

Change-Id: Iec24dc91a140510c1666801f6204dced8d2318f9
Cc: stable@vger.kernel.org # v3.19
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Reviewed-on: http://git-master/r/1197034
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Mithun Maragiri <mmaragiri@nvidia.com>
Reviewed-by: Woojung Min <wmin@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
(cherry picked from commit ca502c1791bbb3f09bbdb3fc0f4118c0ee7b11bc)
Reviewed-on: http://git-master/r/1203351

3 years agoi2c: tegra: Ratelimit error print
Ankita Garg [Mon, 15 Aug 2016 23:50:34 +0000]
i2c: tegra: Ratelimit error print

We are switching over to inifinite
number of retries for HDCP. This change
ratelimits the error messages from a specific
i2c client to prevent the kernel log buffer from
being filled with i2c failure messages.

Bug 1694737

Change-Id: Ie57881d367ab1b309f2feb362de1414fa59a59f6
Reviewed-on: http://git-master/r/1133802
(cherry picked from commit a8db18edbfef2b2f77975abfe64f2e0daec276ba)
Signed-off-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-on: http://git-master/r/1130654
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agoarm64: configs: restrict access to perf events
Woojung Min [Tue, 9 Aug 2016 07:16:30 +0000]
arm64: configs: restrict access to perf events

Enable CONFIG_SECURITY_PERF_EVENTS_RESTRICT to restrict access to perf events
It is for android security patch CVE-2016-3843/ANDROID-29119870.

Bug 1787007

Change-Id: Icc6731a05752456d8d611ac723baff22df625d23
Signed-off-by: Woojung Min <wmin@nvidia.com>
Signed-off-by: Mithun Maragiri <mmaragiri@nvidia.com>
Reviewed-on: http://git-master/r/1200020
(cherry picked from commit f9210ab26a74177c88ddb02abba3360700993d15)
Signed-off-by: Mithun Maragiri <mmaragiri@nvidia.com>
Reviewed-on: http://git-master/r/1203369
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

3 years agoFROMLIST: security,perf: Allow further restriction of perf_event_open
Jeff Vander Stoep [Sun, 29 May 2016 21:22:32 +0000]
FROMLIST: security,perf: Allow further restriction of perf_event_open

When kernel.perf_event_open is set to 3 (or greater), disallow all
access to performance events by users without CAP_SYS_ADMIN.
Add a Kconfig symbol CONFIG_SECURITY_PERF_EVENTS_RESTRICT that
makes this value the default.

This is based on a similar feature in grsecurity
(CONFIG_GRKERNSEC_PERF_HARDEN).  This version doesn't include making
the variable read-only.  It also allows enabling further restriction
at run-time regardless of whether the default is changed.

https://lkml.org/lkml/2016/1/11/587

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

Bug: 29054680
Bug 1787007

Change-Id: Iff5bff4fc1042e85866df9faa01bce8d04335ab8
(cherry picked from commit 012b0adcf7299f6509d4984cf46ee11e6eaed4e4)
Signed-off-by: Woojung Min <wmin@nvidia.com>
Signed-off-by: Mithun Maragiri <mmaragiri@nvidia.com>
Reviewed-on: http://git-master/r/1200000
(cherry picked from commit a653a36c131d4366268f649205c0a18295276da7)
Signed-off-by: Mithun Maragiri <mmaragiri@nvidia.com>
Reviewed-on: http://git-master/r/1203367
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

3 years agonet: wireless: bcmdhd: Integrate following changes
Srinivas Ramachandran [Tue, 29 Sep 2015 00:48:10 +0000]
net: wireless: bcmdhd: Integrate following changes

a96eddb net: wireless: bcmdhd: Network diagnostics
f6d2852 net: wireless: bcmdhd: Network bandwidth estimator

Bug 1798886

Change-Id: I9d73668de8b514a68a11053977f063fc6f362d77
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-on: http://git-master/r/1200863
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

3 years agoarm64: dts: Integrate the following changes
Srinivas Ramachandran [Thu, 16 Jun 2016 20:21:11 +0000]
arm64: dts: Integrate the following changes

7253735 arm64: dts: Update abbreviation for Darcy APAC region
ad9bd2f arm64: dts: Update the region code map for Darcy

Bug 1798886

Change-Id: Ib15f82cc1ef3f723a1ded91a0f56f25167e91a7a
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-on: http://git-master/r/1200862
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agoUPSTREAM: ipv6: add complete rcu protection around np->opt
Eric Dumazet [Mon, 30 Nov 2015 03:37:57 +0000]
UPSTREAM: ipv6: add complete rcu protection around np->opt

[ Upstream commit 45f6fad84cc305103b28d73482b344d7f5b76f39 ]

This patch addresses multiple problems :

UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions
while socket is not locked : Other threads can change np->opt
concurrently. Dmitry posted a syzkaller
(http://github.com/google/syzkaller) program desmonstrating
use-after-free.

Starting with TCP/DCCP lockless listeners, tcp_v6_syn_recv_sock()
and dccp_v6_request_recv_sock() also need to use RCU protection
to dereference np->opt once (before calling ipv6_dup_options())

This patch adds full RCU protection to np->opt

Bug 1787007

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Bug: 28746669
Change-Id: I81775b2269a8263c4e4760b94b9fdd0d5916b31e
Signed-off-by: Mithun Maragiri <mmaragiri@nvidia.com>
Reviewed-on: http://git-master/r/1201486
(cherry picked from commit 6b32d43afd1417820d5bd4b45c8a3810bfc3d942)
Signed-off-by: Mithun Maragiri <mmaragiri@nvidia.com>
Reviewed-on: http://git-master/r/1203365
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

3 years agonet: fix infoleak in rtnetlink
Kangjie Lu [Tue, 3 May 2016 20:46:24 +0000]
net: fix infoleak in rtnetlink

The stack object “map” has a total size of 32 bytes. Its last 4
bytes are padding generated by compiler. These padding bytes are
not initialized and sent out via “nla_put”.

Bug 1787007

Change-Id: I33c4a566efc17fc6a8c6d850bc3e9602d7a996ad
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Woojung Min <wmin@nvidia.com>
(cherry picked from commit 5f8e44741f9f216e33736ea4ec65ca9ac03036e6)
Reviewed-on: http://git-master/r/1196545
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Signed-off-by: Mithun Maragiri <mmaragiri@nvidia.com>
Reviewed-on: http://git-master/r/1199480
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
(cherry picked from commit b9b0f6f46a8723e5c3198840d6548c54d9df9b98)
Reviewed-on: http://git-master/r/1203356

3 years agoBACKPORT: perf tools: Document the perf sysctls
Ben Hutchings [Tue, 19 Jan 2016 21:35:15 +0000]
BACKPORT: perf tools: Document the perf sysctls

perf_event_paranoid was only documented in source code and a perf error
message.  Copy the documentation from the error message to
Documentation/sysctl/kernel.txt.

perf_cpu_time_max_percent was already documented but missing from the
list at the top, so add it there.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linux-doc@vger.kernel.org
Link: http://lkml.kernel.org/r/20160119213515.GG2637@decadent.org.uk
[ Remove reference to external Documentation file, provide info inline, as before ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Bug: 29054680
Bug 1787007

Change-Id: I13e73cfb2ad761c94762d0c8196df7725abdf5c5
(cherry picked from commit 925d82a466131093dee9a301372f4c29a28d948b)
Signed-off-by: Woojung Min <wmin@nvidia.com>
Signed-off-by: Mithun Maragiri <mmaragiri@nvidia.com>
Reviewed-on: http://git-master/r/1199997
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
(cherry picked from commit 4e82f031635e9a672c50aca666ecb21825287f9b)
Reviewed-on: http://git-master/r/1203355

3 years agodvfs: tegra: Validate CLDVFS register address
Alex Frid [Thu, 30 Jun 2016 01:21:46 +0000]
dvfs: tegra: Validate CLDVFS register address

Bug 1783583

Change-Id: I8b0e865db02c00f741dafb473d4bd39c5075f23f
(cherry picked from commit 453a77c5cd9a1316307458203365f9eb5bda62de)
Signed-off-by: Vaibhav Shinde <vashinde@nvidia.com>
Reviewed-on: http://git-master/r/1199573
GVS: Gerrit_Virtual_Submit
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

3 years agodrivers: thermal: fix race on workqueue
Bill Huang [Thu, 14 Jul 2016 02:28:23 +0000]
drivers: thermal: fix race on workqueue

A deadlock might happen when fan_ramp_work are started right after the
therm_fan_est_work has started with the mutex "fan_state_lock" held and
would like to flush the fan_ramp_work, similar call trace can be seen as
the below.

nvidia.NvCPLSvc D ffffffc00008691c     0  1141    253 0x00000001
Call trace:
[<ffffffc00008691c>] __switch_to+0xc8/0xd4
[<ffffffc000c34c8c>] __schedule+0x62c/0x7bc
[<ffffffc000c34e74>] schedule+0x58/0x60
[<ffffffc000c352b8>] schedule_preempt_disabled+0x14/0x24
[<ffffffc000c33aec>] __mutex_lock_slowpath+0x174/0x240
[<ffffffc000c33bfc>] mutex_lock+0x44/0x60
[<ffffffc000880204>] set_fan_pwm_state_map_sysfs+0x90/0x114
[<ffffffc00053656c>] dev_attr_store+0x18/0x28
[<ffffffc0001ff818>] sysfs_write_file+0xfc/0x154
[<ffffffc0001987bc>] vfs_write+0xc0/0x184
[<ffffffc000199030>] SyS_write+0x94/0x164
kworker/u9:2    D ffffffc00008691c     0  1732      2 0x00000000
Workqueue: thermal-fan-est.47 therm_fan_est_work_func
Call trace:
[<ffffffc00008691c>] __switch_to+0xc8/0xd4
[<ffffffc000c34c8c>] __schedule+0x62c/0x7bc
[<ffffffc000c34e74>] schedule+0x58/0x60
[<ffffffc000c32d78>] schedule_timeout+0x2c/0x254
[<ffffffc000c34434>] wait_for_common+0x134/0x170
[<ffffffc000c34484>] wait_for_completion+0x14/0x1c
[<ffffffc0000c7b88>] flush_workqueue+0x1d0/0x528
[<ffffffc000880144>] fan_update_target_pwm+0x4c/0x7c
[<ffffffc0008802f0>] pwm_fan_set_cur_state+0x68/0x8c
[<ffffffc00087a570>] thermal_cdev_update+0xa0/0x12c
[<ffffffc00087e528>] pid_thermal_gov_throttle+0x308/0x394
[<ffffffc00087bc9c>] handle_thermal_trip+0xd4/0x12c
[<ffffffc00087bde0>] thermal_zone_device_update+0xec/0x14c
[<ffffffc00056d1dc>] therm_fan_est_work_func+0x1c4/0x220
[<ffffffc0000c9b1c>] process_one_work+0x260/0x410
[<ffffffc0000cac5c>] worker_thread+0x204/0x378
[<ffffffc0000d1350>] kthread+0xc0/0xc8

Bug 200214795

Change-Id: Iab0a8ce6b334f478e681320d5d64a43667e30c02
Signed-off-by: Bill Huang <bilhuang@nvidia.com>
Reviewed-on: http://git-master/r/1181093
(cherry picked from commit 7544902b2c55d8ad5fb561911977367b1e9b19ea)
Reviewed-on: http://git-master/r/1184611
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

3 years agoarm64: tegra21: emc: Make sure the DLL always has a clock
Alex Waterman [Mon, 23 May 2016 20:58:15 +0000]
arm64: tegra21: emc: Make sure the DLL always has a clock

Ensure the DLL always has a clock. If it does not then the DLL will
not be able to swap to a new clock source. That is to say the DLL
requires both the old and new clock source to be active when its
source is changed.

Bug 1655375

Change-Id: I796725b95628d7ea6753d7986af74324e9c1489b
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1152001
(cherry picked from commit e0a23c1f4a99a88b09faedd82dbdba64fc138bec)
Reviewed-on: http://git-master/r/1183711
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Collins <rcollins@nvidia.com>

3 years agodtsi: sensors: Remove restrictions to run sensors at full speed
Robert Collins [Tue, 19 Jul 2016 01:01:26 +0000]
dtsi: sensors: Remove restrictions to run sensors at full speed

- Remove frequency restrictions on gyro, accel, compass, barometer.
- Remove barometer_disabled, if currently disabled.

Bug 200191681
Bug 200201316

Change-Id: If75f10034a4c14ebb4010ed4ae3a511e0bd2ade6
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1183159
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>
Reviewed-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Tested-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
GVS: Gerrit_Virtual_Submit

3 years agoiio: imu: nvi v.336 Add DMP AUX support
Erik Lilliebjerg [Mon, 18 Jul 2016 04:48:59 +0000]
iio: imu: nvi v.336 Add DMP AUX support

- Add DMP support for devices on the auxiliary ports behind the MPU/ICM.  Due
  to the differences between the MPU and ICM DMPs, the auxiliary port API was
  extended that allowed the DMP dependencies to be removed from the auxiliary
  device's external drivers.
- Updated the pressure calculations for the BMP280 driver to the latest BMP280
  specification.

Bug 200191681
Bug 200201316
Bug 200195822

Change-Id: Id4338b11094f8ef00df214c14649b7bc951a6891
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1182906
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>
GVS: Gerrit_Virtual_Submit

3 years agoUPSTREAM: arm64: module: avoid undefined shift behavior in reloc_data()
Ard Biesheuvel [Tue, 5 Jan 2016 09:18:52 +0000]
UPSTREAM: arm64: module: avoid undefined shift behavior in reloc_data()

Compilers may engage the improbability drive when encountering shifts
by a distance that is a multiple of the size of the operand type. Since
the required bounds check is very simple here, we can get rid of all the
fuzzy masking, shifting and comparing, and use the documented bounds
directly.

Bug 200227978

Change-Id: Ibc1b73f4a630bc182deb6edfa7458b5e29ba9577
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Reviewed-on: http://git-master/r/1203066
GVS: Gerrit_Virtual_Submit
Tested-by: Kerwin Wan <kerwinw@nvidia.com>
Reviewed-by: Kerwin Wan <kerwinw@nvidia.com>

3 years agoUPSTREAM: arm64: module: fix relocation of movz instruction with negative immediate
Ard Biesheuvel [Tue, 5 Jan 2016 09:18:51 +0000]
UPSTREAM: arm64: module: fix relocation of movz instruction with negative immediate

The test whether a movz instruction with a signed immediate should be
turned into a movn instruction (i.e., when the immediate is negative)
is flawed, since the value of imm is always positive. Also, the
subsequent bounds check is incorrect since the limit update never
executes, due to the fact that the imm_type comparison will always be
false for negative signed immediates.

Let's fix this by performing the sign test on sval directly, and
replacing the bounds check with a simple comparison against U16_MAX.

Bug 200227978

Change-Id: I9ad3d8bfd91e5fdc6434b1be6c3062dfec193176
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
[will: tidied up use of sval, renamed MOVK enum value to MOVKZ]
Signed-off-by: Will Deacon <will.deacon@arm.com>
Reviewed-on: http://git-master/r/1203065
GVS: Gerrit_Virtual_Submit
Tested-by: Kerwin Wan <kerwinw@nvidia.com>
Reviewed-by: Kerwin Wan <kerwinw@nvidia.com>

3 years agovideo: tegra: hdcp: Set max_retries to be inifinite
Ankita Garg [Fri, 22 Apr 2016 20:33:56 +0000]
video: tegra: hdcp: Set max_retries to be inifinite

Some TVs/monitors do not send a hotplug event on
wake-up or change of source. Currently HDCP link
verification only retries max of 5 times. The counter
is reset on hotplug or successful verification. So on
these monitors the max count is hit and we never
resume HDCP. This change changes max retries to
infinite.

Bug 1694737

Change-Id: I121fcb1212b453037cadeb306b553e5a40ac3a87
Signed-off-by: Ankita Garg <ankitag@nvidia.com>
(cherry picked from commit 2e9a8fc991a644274a210130389643a572bd690e)
Reviewed-on: http://git-master/r/1133803
(cherry picked from commit db1d6f39a38abf4d2ceac51d6addea220cc78fcc)
Reviewed-on: http://git-master/r/1190446
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

3 years agotegra:hdcp: Fix error in infinite max_retries
Ankita Garg [Fri, 22 Jul 2016 21:59:46 +0000]
tegra:hdcp: Fix error in infinite max_retries

We are setting max_retries to -1 to enable
infinite retries. However, max_retries is
currently an unsigned char.

Bug 1694737

Change-Id: I439254fce45f8e491ebe42071df8484de7fc627e
Signed-off-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-on: http://git-master/r/1192502
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agodts: support TS to enter fastboot on foster pro 2
Martin Gao [Fri, 8 Jul 2016 23:23:28 +0000]
dts: support TS to enter fastboot on foster pro 2

- Enable xusb support in bl on foster pro 2 sku
- Create dts chosen node to indicate the vbus to
  enable

Bug 200218301

Change-Id: I6ef1bf0b1d26a23ff9bed7095831a84929d10ed7
Signed-off-by: Martin Gao <marting@nvidia.com>
Reviewed-on: http://git-master/r/1177876
(cherry picked from commit 26edab762307a8e2466c6c4a5e9999bd81985085)
Reviewed-on: http://git-master/r/1200075
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

3 years agodts: enable xotg and xudc for darcy in dt
Martin Gao [Wed, 1 Jun 2016 01:11:51 +0000]
dts: enable xotg and xudc for darcy in dt

- Darcy always uses xotg and xudc configured via dt
- remove dt-override-status-odm-data nodes to remove the ability for
odmdata to override bit 24 (utmip1-owner bit)

Bug 200198550

Change-Id: Ie2aca6798e0e0604ba01ad7f4fe08ed307502645
Signed-off-by: Martin Gao <marting@nvidia.com>
Reviewed-on: http://git-master/r/1156948
(cherry picked from commit fc3eca710becd44bb8808eeeabfd42a7127f56ec)
Reviewed-on: http://git-master/r/1200074
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

3 years agoHID: hidraw: Add spinlock in struct hidraw to protect list
Ankita Garg [Fri, 5 Aug 2016 23:27:43 +0000]
HID: hidraw: Add spinlock in struct hidraw to protect list

It is unsafe to call list_for_each_entry in hidraw_report_event to
traverse each hidraw_list node without a lock protection, the list
could be modified if someone calls hidraw_release and list_del to
remove itself from the list, this can cause hidraw_report_event
to touch a deleted list struct and panic.

To prevent this, introduce a spinlock in struct hidraw to protect
list from concurrent access.

Commit-id of upstream change: 277fe44dd862412ee034470ad1c13a79d24e533b

Bug 200216971

Change-Id: Ib144abe4851e2cae12e7533bee763e8d9a97d5d4
Signed-off-by: Yonghua Zheng <younghua.zheng@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-on: http://git-master/r/1198707
Reviewed-by: Raymond Poudrier <rapoudrier@nvidia.com>
Reviewed-by: David Dastous St Hilaire <ddastoussthi@nvidia.com>

3 years agommc: host: Use SDR104 UHS mode for SDR50 mode
R Raj Kumar [Mon, 11 Jul 2016 12:05:14 +0000]
mmc: host: Use SDR104 UHS mode for SDR50 mode

- Program SDR104 mode in the UHS_MODE_SEL register for
  SDR50 mode as well.
- This is required for better timing and reliable transfers
  in SDR50 mode.

Bug 1423423
Bug 200217784

Change-Id: I9513b9d5a153842a1e1dcea79ddc29bdc27e4591
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Signed-off-by: R Raj Kumar <rrajk@nvidia.com>
Reviewed-on: http://git-master/r/1201716
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

3 years agogpu: nvgpu: gk20a: Use spin_lock for jobs_lock
Bharat Nihalani [Tue, 9 Aug 2016 13:00:12 +0000]
gpu: nvgpu: gk20a: Use spin_lock for jobs_lock

This is done to boost performance of the GPU submit time, which
is critical for compute use-cases.

Bug 200215465

Change-Id: Ic4884ee4eac910b92b84a47fdc1b2e9f26b2f1f0
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: http://git-master/r/1199860
(cherry picked from commit 4746e346b0923e95bc272da123ff15160474e235)
Reviewed-on: http://git-master/r/1201703
Reviewed-by: Automatic_Commit_Validation_User

3 years agopcie: host: tegra: fix l1ss programming
Vidya Sagar [Tue, 5 Jul 2016 10:19:52 +0000]
pcie: host: tegra: fix l1ss programming

L1SS configuration parameters need to be programmed
only for Tegra root ports and immediate devices (EP/UP port).
This change fixes the unwanted programming being done
to other devices apart from the ones mentioned above

Bug 200215912

Change-Id: Id8d8ec9952f3c7f7249de0f5c2ed244721e2fb57
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1175569
(cherry picked from commit a006e75c1e505eb66386f8be24682d515f726111)
Reviewed-on: http://git-master/r/1176200
Reviewed-on: http://git-master/r/1199308
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

3 years agopcie: host: tegra: re-org L1SS reg programming
Vidya Sagar [Wed, 15 Jun 2016 16:13:13 +0000]
pcie: host: tegra: re-org L1SS reg programming

performs all L1SS registers programming before L1SS is
enabled by kernel

Bug 200210426

Change-Id: I48fe1a31933b9dfa9733b2550b1555db9be568b2
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1165056
Reviewed-on: http://git-master/r/1199307
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

3 years agoPCI: save and restore L1-SS registers
Vidya Sagar [Wed, 16 Dec 2015 08:17:56 +0000]
PCI: save and restore L1-SS registers

saves and restores L1 PM-SS registers during suspend and resume
this makes sure consistency of L1SS states across suspend/resume
cycle

Bug 200161255

Change-Id: I68b25e9433d0f08e4fadbe4547db7fb811f59462
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/923504
(cherry picked from commit 39530fa01a94d0f57f5fbb0febc56ac33f8e0024)
Reviewed-on: http://git-master/r/1165055
Reviewed-on: http://git-master/r/1199306
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

3 years agoPCI: Add support for save/restore of extended capabilities
Alex Williamson [Tue, 17 Dec 2013 23:43:45 +0000]
PCI: Add support for save/restore of extended capabilities

Current save/restore is specific to standard capabilities.

Bug 200210426

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
(cherry picked from commit fd0f7f73ca96bb0f8723b5e59759ad43bab88954)

Change-Id: I58e5d0ea452947d329e099ba54fa9059370693fc
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1165054
Reviewed-on: http://git-master/r/1199305
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

3 years agoPCI: Fix comment typo for pci_add_cap_save_buffer()
Yijing Wang [Thu, 1 Aug 2013 13:05:27 +0000]
PCI: Fix comment typo for pci_add_cap_save_buffer()

Fix trivial comment typo for pci_add_cap_save_buffer().

Bug 200210426

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
(cherry picked from commit ce1be10bf6dc8406ae773f0ac6265585a4154d37)

Change-Id: I7c657211f6c230ad2ac216f8539ade8205964626
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1165053
Reviewed-on: http://git-master/r/1199304
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

3 years agopcie: host: tegra: disable aspm-l0s by default
Vidya Sagar [Mon, 2 Nov 2015 09:20:51 +0000]
pcie: host: tegra: disable aspm-l0s by default

disables aspm-l0s state by default except for those
which are whitelisted.
It also disables CLK-PM if the end point isn't pulling
clkreq down

Bug 200151223
Bug 1687368

Change-Id: I594888b63a9e3b45fff61871b40bca623998e9e4
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/826164
(cherry picked from commit fed09295fc4e5182c94414ef59d27ba48fdae44e)
Reviewed-on: http://git-master/r/831188
(cherry picked from commit 2bc1e873f28d2dbb469ae916cd34bcf2caa54f13)
Reviewed-on: http://git-master/r/1165052
Reviewed-on: http://git-master/r/1199303
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

3 years agoPCI/ASPM: enable aspm-l1ss support
Vidya Sagar [Mon, 19 Oct 2015 16:05:02 +0000]
PCI/ASPM: enable aspm-l1ss support

enables ASPM-L1 sub-states support

Bug 200143430

Change-Id: I236d09df6ea63d4ae72ff99d976026cc9a1ba933
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/819699
(cherry picked from commit c29c8155a63cf296905aa04f2ed1c0382ade2a56)
Reviewed-on: http://git-master/r/822729
(cherry picked from commit 53c3407b88d0964ca9f8653bb3901ccf623d43d9)
Reviewed-on: http://git-master/r/1165051
Reviewed-on: http://git-master/r/1199302
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

3 years agopcie: host: tegra: fix aspm-l1ss enabling
Vidya Sagar [Fri, 23 Oct 2015 08:12:24 +0000]
pcie: host: tegra: fix aspm-l1ss enabling

fixes the way aspm-l1ss gets enabled when multiple
pcie end points are connected

Bug 200143430

Change-Id: I1dc7fadb7092e8251378a84c3e4df538e5423d3e
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/821939
(cherry picked from commit 1f8efcf7faafd3641e9e2dfcb2d1956ff5926017)
Reviewed-on: http://git-master/r/822730
(cherry picked from commit 3c23d02d338c2b616966a4567be07e208fcb0541)
Reviewed-on: http://git-master/r/1165050
Reviewed-on: http://git-master/r/1199301
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

3 years agoRevert "pcie: host: tegra: cleanup clkreq dir programming"
Vidya Sagar [Wed, 15 Jun 2016 14:03:22 +0000]
Revert "pcie: host: tegra: cleanup clkreq dir programming"

This reverts commit bb730705ac9b3a62b0e52271cd9b2b863a2e6600.

This will be fixed properly along with other fixes in
http://git-master/r/#/c/1165056/

Bug 200210426

Change-Id: I740f13714a50bfc27fbfe64e7b720d0d63b9b97d
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1165048
(cherry picked from commit ac0e2fdb524ef0e9fccac4630902d69bed78ade1)
Reviewed-on: http://git-master/r/1199300
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>

3 years agoARM64: config: tegra21: enable CONFIG_INET_DIAG_DESTROY
Om Prakash Singh [Mon, 8 Aug 2016 12:05:20 +0000]
ARM64: config: tegra21: enable CONFIG_INET_DIAG_DESTROY

Bug 200225430

Change-Id: I17e57a4c3e1ed2c1e7a0c2ee6fa28cf364c34b1b
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/1199163
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agoARM: config: tegra12: enable CONFIG_INET_DIAG_DESTROY
Om Prakash Singh [Mon, 8 Aug 2016 12:02:15 +0000]
ARM: config: tegra12: enable CONFIG_INET_DIAG_DESTROY

Bug 200225430

Change-Id: I907b7357d169db315120e56f16396ff0171e04bc
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/1199162
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agoselinux: nlmsgtab: add SOCK_DESTROY to the netlink mapping tables
Lorenzo Colitti [Wed, 3 Feb 2016 15:52:15 +0000]
selinux: nlmsgtab: add SOCK_DESTROY to the netlink mapping tables

Without this, using SOCK_DESTROY in enforcing mode results in:

  SELinux: unrecognized netlink message type=21 for sclass=32

Bug 200225430

Change-Id: I7862bb0fc83573567243ffa9549a2c7405b5986c
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/1199161
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agovideo: tegra: dc: add check for dsi out for edid
Prafull Suryawanshi [Thu, 4 Aug 2016 09:21:03 +0000]
video: tegra: dc: add check for dsi out for edid

bug 200216241

DSI panel do not have edid which gives warning message when tried
to dump edid data. Adding check for this to avoid warning message.

Change-Id: I5f92ad6232c67c2dbe86df70ffb93dfc88d34b1d
Signed-off-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-on: http://git-master/r/1197445
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agodrivers: scsi: fixup blk_get_request dead queue scenarios
Rajath Shetty [Wed, 29 Jun 2016 21:18:23 +0000]
drivers: scsi: fixup blk_get_request dead queue scenarios

The blk_get_request function may fail in low-memory conditions or during
device removal (even if __GFP_WAIT is set).

Supports original change I1da5bc8419f43704e87625dac00c8fc4b88db743

This change adds this fix to the scsi drivers which were missing in
above change

Bug 1730744
Bug 200212246

Change-Id: I63d1e46cd1398754015ce285bbc9530ce6e1fcc4
Signed-off-by: Rajath Shetty <rshetty@nvidia.com>
Reviewed-on: http://git-master/r/1173424
(cherry picked from commit cb2316ea9b2d9f83f31966d757c2e862858c1763)
Reviewed-on: http://git-master/r/1197134
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

3 years agoi2c: tegra: override slcg for Master core logic
Shardar Shariff Md [Tue, 3 Nov 2015 21:09:10 +0000]
i2c: tegra: override slcg for Master core logic

- override(disable) 2nd-level clock for I2C master
core logic i.e keeping 2nd-level clock always ON
when bus is operating in multi-master mode.

Bug 200146630

Change-Id: I04840c2a0453ecbf5c10a9ea0e0f3d0523c5071a
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Reviewed-on: http://git-master/r/842347
(cherry picked from commit 115380a0fff228cb606e135e703d87c297070835)
Reviewed-on: http://git-master/r/1190655
(cherry picked from commit 57127ec8fbdb77a946e3f362c172f6d2aa53fa23)
Reviewed-on: http://git-master/r/1198800
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agoserial: tegra: correct error handling sequence to avoid system hang
Shardar Shariff Md [Tue, 2 Aug 2016 13:35:26 +0000]
serial: tegra: correct error handling sequence to avoid system hang

- Correct the error handling sequence to avoid FIFO errors
i.e handle break error first followed by other errors as
handling break error will clear other errors
- Handle break error by fifo flush as per IAS
- serial: tegra: keep rx irq disabled if there are spurious
errors and then tty buffer is exhausted and re-enable the
interrupts after 500msec.

Bug 1785924

Change-Id: I68c8322e0ff6808ebd0d38141853f88900b912b2
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Reviewed-on: http://git-master/r/1195970
(cherry picked from commit 1b5114ef7056b6c62ab0ca5c0f7ee5039494b192)
Reviewed-on: http://git-master/r/1198799
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agoi2c: tegra: fix unknown interrupt issue after ARB lost
Shardar Shariff Md [Mon, 9 Nov 2015 05:50:03 +0000]
i2c: tegra: fix unknown interrupt issue after ARB lost

For i2c transaction with repeat start (We post 7W [header + data
for Write followed by read in FIFO]) and unmask required interrupts.
But HW starts processing if there are atleast 3W in FIFO and during
this time if ARB lost error occurs then current data in FIFO is cleared
and chance of posting remaining data after FIFO is cleared. Now
SW handles the ARB lost error as interrupts are enabled later after
posting all packets and after clearing the ARB lost interrupt the
packet mode is disabled(Normal mode), which causes the Normal mode
interrupt(Unknown interrupt in case of packet mode) due to stale
data in fifo.

- To fix this, enable (unmask) error interrupt before posting the
packets into FIFO and clear the packet mode disable before clearing
ARB lost error also for other errors(NACK/FIFO overflow).

- Dont issue bus clear for ARB lost error if bus is operating in
multimaster mode.

Bug 200151590
Bug 200151064

Change-Id: I20d19a25aee400dd0a6517bdcaf87e2c84b0770a
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Reviewed-on: http://git-master/r/842348
(cherry picked from commit 7c8f33dec55fc63286acb35bee3f175f2f989189)
Reviewed-on: http://git-master/r/1190656
(cherry picked from commit ea4f6a73d5c01d05070bdaa6df4ce8b0c7326bad)
Reviewed-on: http://git-master/r/1198798
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agonvavp: Add mutex lock for all avp submit
Soumen Kumar Dey [Tue, 14 Jun 2016 09:01:57 +0000]
nvavp: Add mutex lock for all avp submit

Add mutex lock for nvavp_submit to avoid race condition.

bug 1775299

Change-Id: I11a66a58a1f048d6a0ee5aa949f852bfef56dc07
Signed-off-by: Soumen Kumar Dey <sdey@nvidia.com>
(cherry picked from commit fe20d48bb7fc453166806a2efe4e3905d12414fd)
Reviewed-on: http://git-master/r/1164117
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agoapbdma: improve position reporting
Sumit Bhattacharya [Thu, 21 Jan 2016 10:51:36 +0000]
apbdma: improve position reporting

Return accurate dma position in device_tx_status()
callback.

Bug 200137565

Change-Id: Ida5b46fb3b33564d0210cf7a52991f64849a0f4a
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/1113217
Reviewed-on: http://git-master/r/935726
GVS: Gerrit_Virtual_Submit
Reviewed-by: Manoj Gangwal <mgangwal@nvidia.com>

3 years agovideo: tegra: dc: FB_CAP_HDR -> FB_CAP_SMPTE_2084
Aly Hirani [Mon, 13 Jun 2016 18:39:39 +0000]
video: tegra: dc: FB_CAP_HDR -> FB_CAP_SMPTE_2084

Rename FB_CAP_HDR to FB_CAP_SMPTE_2084 to better describe its function.

Bug 200182153

Change-Id: Iffa7e1be7a1a0527aa75d6c0405b6a79cb765635
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
Reviewed-on: http://git-master/r/1163480
(cherry picked from commit 196f4fdd4b1e653c2dfbfb9df83d3203b919b62f)
Reviewed-on: http://git-master/r/1197161
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agohid: jarvis: Print audio tx trace only in debug
Ankita Garg [Thu, 5 May 2016 22:30:59 +0000]
hid: jarvis: Print audio tx trace only in debug

Print audio tx information only when DEBUG_AUDIO_TX
is set to 1, which is set to 0 by default

Bug 200194449

Change-Id: If32587fbd680eedfb3ee1e4fd9ad41d14179943f
Signed-off-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-on: http://git-master/r/1142375
(cherry picked from commit a761832f1b070c7f8215a40e1135044dcf7fdb25)
Reviewed-on: http://git-master/r/1162701
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agogpu: nvgpu: initialize local variable
Deepak Nibade [Thu, 4 Aug 2016 14:12:38 +0000]
gpu: nvgpu: initialize local variable

Initialize character array buf in gk20a_channel_ioctl() to zero
Keeping it uninitialized can result in leaking kernel stack
info to user space since we pass this buffer to UMD

Bug 1793398

Change-Id: Iffd654dbaca3b4e3c8fd2ac270d0febd01c165b8
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1195862
(cherry picked from commit 118809f4bd07af20df2b6c012828834695a5fccf)
Reviewed-on: http://git-master/r/1197614
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agovideo: tegra: dc: Do not enable cmu if already enabled
Ankita Garg [Thu, 9 Jun 2016 00:40:28 +0000]
video: tegra: dc: Do not enable cmu if already enabled

_tegra_dc_cmu_enable() updates the cmu by disabling
and enabling cmu. This breaks seamless during boot.
Instead, we should only update if the desired cmu
state does not match with the existing one.

Bug 1774045

Change-Id: Ieb3aa729de05798e262cbbf75514e88fed4d1657
Signed-off-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-on: http://git-master/r/1161483
(cherry picked from commit eb333ca076ed7b473280db09a579e62e513065bc)
Reviewed-on: http://git-master/r/1162700
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agohid: jarvis: On timer_start, do not delete active timer
Ankita Garg [Wed, 8 Jun 2016 01:21:38 +0000]
hid: jarvis: On timer_start, do not delete active timer

Whenever the try_to_del_timer_sync call returns with error,
the decoding_timer that is supposed to decode the audio
packets does not get scheduled and hence the FIFO gets full
(no consumer to consume the packets in the fifo). The cases
in which this happens is when the timer is active when
try_to_del_timer_sync is called. We do not need to remove
the timer when starting voice search. snd_atvr_schedule_timer
calls mod_timer(), which just modifies the expiration time
of the timer if its already active and schedules one if its
not already active.

Bug 200195718

Change-Id: Iec728dfd7eb002251afa8a7923ab2e2167d718d9
Signed-off-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-on: http://git-master/r/1160526
(cherry picked from commit 1909d374bf303051f3949f68d58c7bf509f76c87)
Reviewed-on: http://git-master/r/1162699
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agovideo: tegra: Configure ARM_VIDEO_RANGE
Aly Hirani [Thu, 7 Jul 2016 01:04:29 +0000]
video: tegra: Configure ARM_VIDEO_RANGE

If we are in RGB limited range, the HDMI spec explicitly forbids the
0/255 values. This change enables the ARM_VIDEO_RANGE in this mode
which clamps the output to [1, 254]

Bug 1750555

Change-Id: Ie30cc69eb95be3e38c6aecbdb500e83a43cbe514
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
Reviewed-on: http://git-master/r/1176476
(cherry picked from commit cf547b2376b09392189bc0e5162027f7b04a9585)
Reviewed-on: http://git-master/r/1197172
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>

3 years agoASoC: Codec: rt565x: derive proper dmic clk rate
Sameer Pujar [Tue, 2 Aug 2016 11:03:51 +0000]
ASoC: Codec: rt565x: derive proper dmic clk rate

The failure was seen in setting dmic clock when 192KHz HRA playback
was running. Earlier divider factors available were not sufficient
to get the right dmic clock. OSR factor is used now to further divide
the dmic clock to get the rate in required range.
(patch provided by Realtek)

Bug 200223032

Reviewed-on: http://git-master/r/1193642
(cherry picked from commit c30c54ba369e3d42bcb768bc855807455a3dbc61)

Change-Id: Ifed1ef43c96de799bfd9d8de483964a91be73372
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: http://git-master/r/1195875
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>

3 years agoUSB: usbfs: fix potential infoleak in devio
Kangjie Lu [Tue, 3 May 2016 20:32:16 +0000]
USB: usbfs: fix potential infoleak in devio

The stack object “ci” has a total size of 8 bytes. Its last 3 bytes
are padding bytes which are not initialized and leaked to userland
via “copy_to_user”.

CVE-2016-4482
Bug 1787007

Change-Id: I1488436e8322fd645f76c942aeae1daada6be995
(cherry picked from commit 681fef8380eb818c0b845fca5d2ab1dcbab114ee)

Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Signed-off-by: Dhiren Parmar <dparmar@nvidia.com>
Change-Id: I1488436e8322fd645f76c942aeae1daada6be995
Reviewed-on: http://git-master/r/1190551
(cherry picked from commit 0dee449c60dec829c02084d4e10ae373c1ebbd6e)
Reviewed-on: http://git-master/r/1195841
GVS: Gerrit_Virtual_Submit