Commit Graph
344348 Commits
Author SHA1 Message Date
Francescodario Cuzzocrea ebd00ad239 defconfig: enable prima WLAN driver 2019-08-04 20:04:33 +02:00
Ashish Kumar Dhanotiya df260a82a1 prima: wlan: Return an error code in case of invalid seq_len while adding key
There is no return statement in case of invalid sequence length in
__wlan_hdd_cfg80211_add_key api.

Return an error code in case of invalid seq_len.

Issue: SEC-1245
Change-Id: Ib240f6cf91d9d563dd87148c15e06ae8b48919d5
CRs-Fixed: 2153553
(adapted from commit https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/prima
5a0eeb72c3cde7dcb8096967561a88a678ad9aec)
2019-08-04 20:04:26 +02:00
Jingxiang Ge 14836ebcdc prima: wlan: Propagate key sequence counter to SME
propagation from qcacld-3.0 to prima

Currently the key sequence counter received from userspace is not
propagated to SME, so add logic to propagate it.

Issue: SEC-1245
Change-Id: I5371700003744eb967c578c44e4d130628efcdc8
CRs-Fixed: 2134583
(adapted from commit https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/prima
6a2b6756bad53d057cd3cb7856b9184d0011e1e0)
2019-08-04 20:04:25 +02:00
Hanumanth Reddy Pothula 0c455da93a qcacld-3.0: Validate wpa ie length before extracting ie
During initializing ibss security settings there is a possibility
of integer underflow while extracting wpa ie because of ie length
check miss.

Add wpa ie length boundary check before extracting wpa ie.

Issue: SEC-1249
Change-Id: I37d8ee5ea1e1ba12277128a1407783f5647251b6
CRs-Fixed: 2151241
(adapted from commit https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0
27381e9d253629180dcdaa698d3fd01bec28d351)
2019-08-04 20:04:25 +02:00
Hanumanth Reddy Pothula 0e852cd2c9 wlan: Use proper length to send the beacon/probe to kernel
propagation from qcacld-3.0 to prima.

Currently sizeof(struct ieee80211_mgmt) + IE len is used to calculate
the total frame length to send the beacon/probe to kernel.
struct ieee80211_mgmt contains union to define different frames and
thus the sizeof(struct ieee80211_mgmt) may give extra length for
beacon/probe if any of the union size is greater than the probe/beacon
union size. This result in trail of zeroes at the end of the frame.

To fix this use sizeof(mgmt_mac_header) + SIR_MAC_B_PR_SSID_OFFSET +
ie len to determine the exact size of the frame.

Change-Id: I71e94b111f36fcd4060befcae282f1fcce5e17f1
CRs-Fixed: 2251716
2019-08-04 20:04:24 +02:00
Jeff Johnson 8d7be2d642 prima: Avoid overread when configuring MAC addresses
Currently there are multiple cfg80211 vendor commands where MAC
address attributes are defined in a nla_policy table with a type of
NLA_UNSPEC but without a minimum length. Add the proper minimum length
to avoid buffer overread.

Change-Id: I11e1205943147102a536ca462fbdba7c826dd195
CRs-Fixed: 2061251
[GabrieleM: Partially applied with 3617aa44129c503af51f4f0537b9c6866]
2019-08-04 20:04:24 +02:00
Francescodario Cuzzocrea ac76b08d7c drivers: staging: prima: import prima WLAN driver from CAF
* Package Version : LA.BF.1.1.3_rb1.15
2019-08-04 20:03:50 +02:00
Padma, Santhosh Kumar c34f0288dd wcnss: Expose dump stack functionality
Add changes to expose dump stack functionality which can be used
by driver to dump stack information when it requires

CR Fixed: 943322
Change-Id: I0fde7142dea2c18daf6b1fb0c5ee4bb8a31a6be0
Signed-off-by: Padma, Santhosh Kumar <skpadma@codeaurora.org>
Signed-off-by: Pradosh Das <prados@codeaurora.org>
2019-08-04 19:49:47 +02:00
Linus Torvalds 452229af85 Disable "maybe-uninitialized" warning globally
Several build configurations had already disabled this warning because
it generates a lot of false positives.  But some had not, and it was
still enabled for "allmodconfig" builds, for example.

Looking at the warnings produced, every single one I looked at was a
false positive, and the warnings are frequent enough (and big enough)
that they can easily hide real problems that you don't notice in the
noise generated by -Wmaybe-uninitialized.

The warning is good in theory, but this is a classic case of a warning
that causes more problems than the warning can solve.

If gcc gets better at avoiding false positives, we may be able to
re-enable this warning.  But as is, we're better off without it, and I
want to be able to see the *real* warnings.

Change-Id: Ie810d255be8911c413c9abe6965a9a66639a1dce
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-08-04 15:16:55 +02:00
Francescodario Cuzzocrea 400a70dcc9 Makefile: remove GCC wrapper 2019-08-04 15:16:17 +02:00
PythonLimited c797d3cdb5 Kconfig: remind the user to use VARIANT_DEFCONFIG but do not rely on it on build 2019-08-04 15:16:08 +02:00
Robert Rozic 6388719824 include/sound: Export audio_effects.h header file
Needed to build libqcompostprocbundle and libqcomvisualizer
Thanks @percy-g2
2019-08-03 23:08:02 +02:00
Francescodario Cuzzocrea 6961733ade drivers: video: mdss: fix compiling with 4.9.x toolchain 2019-08-03 20:34:27 +02:00
Francescodario Cuzzocrea 005c4c687d HACK: drivers: video: mdss: fix compilation issues
* The function prototype for this function has become :
	 int mdss_panel_dt_get_dst_fmt(u32 bpp, char mipi_mode, u32 pixel_packing,char *dst_format);
      in the latest source drop
2019-08-03 20:03:05 +02:00
xXPR0T0TYPEXx f47609fb4c arch: arm: configs: add samsung 8x26 variant defconfigs 2019-08-03 15:56:01 +02:00
xXPR0T0TYPEXx 86d6fed6d7 drivers: motor: add vibetonz and drv260x vibrator drivers 2019-08-03 12:25:05 +02:00
zeroblade1984 761db8f8c5 drivers: input: Fix DVFS Errors
Signed-off-by: zeroblade1984 <zeroblade1984@gmail.com>
Signed-off-by: Jackeagle <jackeagle102@gmail.com>

Change-Id: I0fa8531917d09cfb08d19d27ac912a9723a92d44
2019-08-03 12:24:42 +02:00
Robert Rozic e8357f64b9 touchscreen: mms114: Fix build when DVFS is disabled
Signed-off-by: Robert Rozic <r.rozic97@gmail.com>
2019-08-03 12:23:57 +02:00
Robert Rozic 7c637c75c5 ASoC: msm: Allow DOLBY_DAP to be selected on MSM8226
Signed-off-by: Robert Rozic <r.rozic97@gmail.com>
2019-08-03 12:23:50 +02:00
Syam Sidhardhan 38699aa70f Bluetooth: Remove unused hci_le_ltk_reply()
In this API, we were using sizeof operator for an array
given as function argument, which is invalid.
However this API is not used anywhere.

Change-Id: I80a43472b35f0f6c117624de2b2907b37eefb786
Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
2019-08-03 12:23:28 +02:00
xXPR0T0TYPEXx df47ee2287 wcnss: wcnss_log_iris_regs expecting CONFIG_WCNSS_IRIS_REGISTER_DUMP now 2019-08-03 12:21:30 +02:00
xXPR0T0TYPEXx a3a97f9639 drivers: input: touchscreen: cyttsp4: resolved missing separator on
makefile
2019-08-03 12:21:20 +02:00
xXPR0T0TYPEXx 69f1b401a4 timeconst.pl : removed defined() check 2019-08-03 12:20:53 +02:00
xXPR0T0TYPEXx a3f9757e77 drivers: video: mdss: fix compiling with 4.9.x toolchain 2019-08-03 12:19:31 +02:00
Francescodario Cuzzocrea 85baa390bf misc: Import SM-G900H kernel source code
* Samsung Package Version: G800HXXU1CRJ1
    * CAF Tag: LA.BF.1.1.3-00110-8x26.0
2019-08-02 15:14:10 +02:00
Linux Build Service Account 9c7c217b9e Merge "msm: kgsl: Correctly increment the pagetable statistics" 2015-10-02 04:17:05 -07:00
Linux Build Service Account 19e9ac9968 Merge "proc: uid: fixing issues while back-porting upstream patch" 2015-10-02 04:17:04 -07:00
Linux Build Service Account 0c934636b4 Merge "proc: uid_cputime: fix show_uid_stat permission" 2015-10-02 04:17:04 -07:00
Linux Build Service Account b18c26b6a0 Merge "proc: uid: Adds accounting for the cputimes per uid" 2015-10-02 04:17:04 -07:00
Harshdeep Dhatt 3ed8064d8e msm: kgsl: Correctly increment the pagetable statistics
The pagetable.entries statistics should be incremented by 1
and not the size of the entire mapping.

CRs-Fixed: 911514
Change-Id: Ic9acb6a43a76ee0c429c439e60cbd2a6846647db
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2015-10-01 11:11:10 +05:30
Linux Build Service Account c65cc3b9fc Merge "hashtable: introduce a small and naive hashtable" 2015-09-30 08:52:27 -07:00
Srinivasarao P e168fecc99 proc: uid: fixing issues while back-porting upstream patch
While back-porting commit 3aaf46626af5875372d625644759c570a1515c3f
from upstream to 3.4 kernel, argument mismatch is seen for hash
functions. Fixed this by sending correct number of arguments.
And also added equivalent functionality for undefined functions
and macros like task_cputime_adjusted()

Change-Id: I862cfb9b5212cc960571a8e072bda3c034cf0873
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2015-09-25 13:48:43 +05:30
Jin Qian 78a5975e4f proc: uid_cputime: fix show_uid_stat permission
Change-Id: Ice9084e39da599261df0be6dc305b817b50cfbbf
Signed-off-by: Jin Qian <jinqian@google.com>
Git-commit: ba6f1652e0c153aae45ff3c6259e1c91378b9cfe
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2015-09-25 13:47:46 +05:30
Jin Qian a1ad229e56 proc: uid: Adds accounting for the cputimes per uid
Adds proc files /proc/uid_cputime/show_uid_stat and
/proc/uid_cputime/remove_uid_range.

show_uid_stat lists the total utime and stime for the active as well as
terminated processes for each of the uids.

Writing a range of uids to remove_uid_range will delete the accounting
for all the uids within that range.

Change-Id: Ibaf562c66fef82c3a4d793c67e52e100d5f803a4
Signed-off-by: Jin Qian <jinqian@google.com>
Git-commit: 3aaf46626af5875372d625644759c570a1515c3f
Git-repo: https://android.googlesource.com/kernel/common/
[nabrah@codeaurora.org: Resolved trivial merge conflicts]
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2015-09-25 13:46:33 +05:30
Sasha Levin 8545fed40c hashtable: introduce a small and naive hashtable
This hashtable implementation is using hlist buckets to provide a simple
hashtable to prevent it from getting reimplemented all over the kernel.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
[ Merging this now, so that subsystems can start applying Sasha's
  patches that use this   - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Change-Id: Id3aa808a5096eb4ed0e73b5db8252819cc7eb666
Git-commit: d9b482c8ba1973a189f2d4c8175d405b87fbf2d7
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2015-09-25 01:05:27 -07:00
Srinivasarao P 808f48d614 defconfig: Enable CONFIG_UID_CPUTIME
Enables uid_cputime functionality which provides
the total time a UID's processes spend in userspace
and kernel space.

Change-Id: Ibba4502dacaf211b6c955b9d0bfc7f6370b2a9fe
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2015-09-25 13:15:02 +05:30
Linux Build Service Account b3f02b0450 Merge "ARM: msm: GCC Version change." 2015-09-24 13:24:10 -07:00
Linux Build Service Account c81d29c87d Merge 1317568bfe on remote branch
Change-Id: I900a7a157bbc5d00b70a03ae48750a0cae625201
2015-09-22 01:47:30 -06:00
Ravi Kumar Siddojigari f356ec93e2 SELinux: ss: Fix policy write for ioctl operations
Security server omits the type field when writing out the contents of the
avtab from /sys/fs/selinux/policy. This leads to a corrupt output. No impact
on the running kernel or its loaded policy. Impacts CTS neverallow tests.

Bug: 20665861
Change-Id: I657e18013dd5a1f40052bc2b02dd8e0afee9bcfb
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
Git-commit: 8cdfb356b51e29494ca0b9e4e86727d6f841a52d
Git-repo: https://bitbucket.org/seandroid/kernel-common.git
Signed-off-by: Ravi Kumar Siddojigari <rsiddoji@codeaurora.org>
2015-09-21 00:25:55 -07:00
Samir Mehta 1ec0b65997 ARM: msm: GCC Version change.
- This reverts commit 1e3bae22f3.
- Changing gcc toolchain to 4.9 version.
- Fix linker error of unknown CPU architecture by
  adding CONFIG_MSM_CORTEX_A7 in the arch options
  for the GCC. The issue is seen after bump up to
  gcc-4.9.
- Fix section mismatch errors after upgrading gcc to 4.9
  version. To fix these errors variables are moved to
  appropriate sections.

Change-Id: I7b5c9212e63826a0cb5b7e4ab161737ae87a2157
Signed-off-by: Samir Mehta <samirn@codeaurora.org>
2015-09-18 04:11:30 -07:00
Linux Build Service Account 8638eeae86 Merge "neigh: Better handling of transition to NUD_PROBE state" 2015-09-17 18:41:00 -07:00
Ravinder Konka d7e4caef50 kernel: remove copyright and license info from header files
Removing copyright and license information from
rmnet_ipa_fd_ioctl.h and ipa_qmi_service_v01.h header files
since these can be exported to user space.

Change-Id: I3535f81c29b888e8ebcbcb32dcba9f0f08b64485
Signed-off-by: Ravinder Konka <rkonka@codeaurora.org>
2015-09-15 15:39:48 +05:30
Linux Build Service Account 6b818b31f9 Merge "bif: qpnp-bsi: request BSI interrupts with level high triggering" 2015-09-14 18:05:49 -07:00
Ravinder Konka 1389951ec3 kernel: Include IPA headers required for WiFi offload
Include IPA headers required for compilation on
8974/8226

Change-Id: Iba7a211adafe4616327fa00b9b727be1281501a5
Signed-off-by: Ravinder Konka <rkonka@codeaurora.org>
2015-09-13 06:52:56 -07:00
Linux Build Service Account 2d02fca362 Merge "proc: Allow proc_free_inum to be called from any context" 2015-09-12 10:23:47 -07:00
Linux Build Service Account 2e25216b5a Merge "ALSA: compress: Add ioctl declaration for gapless" 2015-09-12 01:04:26 -07:00
Eric W. Biederman 4fa1e8f53d proc: Allow proc_free_inum to be called from any context
While testing the pid namespace code I hit this nasty warning.

[  176.262617] ------------[ cut here ]------------
[  176.263388] WARNING: at /home/eric/projects/linux/linux-userns-devel/kernel/softirq.c:160 local_bh_enable_ip+0x7a/0xa0()
[  176.265145] Hardware name: Bochs
[  176.265677] Modules linked in:
[  176.266341] Pid: 742, comm: bash Not tainted 3.7.0userns+ #18
[  176.266564] Call Trace:
[  176.266564]  [<ffffffff810a539f>] warn_slowpath_common+0x7f/0xc0
[  176.266564]  [<ffffffff810a53fa>] warn_slowpath_null+0x1a/0x20
[  176.266564]  [<ffffffff810ad9ea>] local_bh_enable_ip+0x7a/0xa0
[  176.266564]  [<ffffffff819308c9>] _raw_spin_unlock_bh+0x19/0x20
[  176.266564]  [<ffffffff8123dbda>] proc_free_inum+0x3a/0x50
[  176.266564]  [<ffffffff8111d0dc>] free_pid_ns+0x1c/0x80
[  176.266564]  [<ffffffff8111d195>] put_pid_ns+0x35/0x50
[  176.266564]  [<ffffffff810c608a>] put_pid+0x4a/0x60
[  176.266564]  [<ffffffff8146b177>] tty_ioctl+0x717/0xc10
[  176.266564]  [<ffffffff810aa4d5>] ? wait_consider_task+0x855/0xb90
[  176.266564]  [<ffffffff81086bf9>] ? default_spin_lock_flags+0x9/0x10
[  176.266564]  [<ffffffff810cab0a>] ? remove_wait_queue+0x5a/0x70
[  176.266564]  [<ffffffff811e37e8>] do_vfs_ioctl+0x98/0x550
[  176.266564]  [<ffffffff810b8a0f>] ? recalc_sigpending+0x1f/0x60
[  176.266564]  [<ffffffff810b9127>] ? __set_task_blocked+0x37/0x80
[  176.266564]  [<ffffffff810ab95b>] ? sys_wait4+0xab/0xf0
[  176.266564]  [<ffffffff811e3d31>] sys_ioctl+0x91/0xb0
[  176.266564]  [<ffffffff810a95f0>] ? task_stopped_code+0x50/0x50
[  176.266564]  [<ffffffff81939199>] system_call_fastpath+0x16/0x1b
[  176.266564] ---[ end trace 387af88219ad6143 ]---

It turns out that spin_unlock_bh(proc_inum_lock) is not safe when
put_pid is called with another spinlock held and irqs disabled.

For now take the easy path and use spin_lock_irqsave(proc_inum_lock)
in proc_free_inum and spin_loc_irq in proc_alloc_inum(proc_inum_lock).

Change-Id: Ife6915694a32cb7a1124c369f61c61bd126f085d
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Git-commit: 457adc35f6e50337b8246063c9df37bfc08b6d4e
Git-repo: https://android.googlesource.com/kernel/common/
CRs-Fixed: 901628
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
2015-09-11 14:46:02 +05:30
Eric W. Biederman 80f4b770f4 proc: Usable inode numbers for the namespace file descriptors.
Assign a unique proc inode to each namespace, and use that
inode number to ensure we only allocate at most one proc
inode for every namespace in proc.

A single proc inode per namespace allows userspace to test
to see if two processes are in the same namespace.

This has been a long requested feature and only blocked because
a naive implementation would put the id in a global space and
would ultimately require having a namespace for the names of
namespaces, making migration and certain virtualization tricks
impossible.

We still don't have per superblock inode numbers for proc, which
appears necessary for application unaware checkpoint/restart and
migrations (if the application is using namespace file descriptors)
but that is now allowd by the design if it becomes important.

I have preallocated the ipc and uts initial proc inode numbers so
their structures can be statically initialized.

Change-Id: I01d42c2f051fd74b1474d9d8378ccc78174cf3cf
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Git-commit: f80cd4676998eb352d1a8b9df0f3663537a9ce93
Git-repo: https://android.googlesource.com/kernel/common/
[schikk@codeaurora.org: Resolved merge conflicts ]
CRs-Fixed: 901628
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
2015-09-11 14:44:24 +05:30
Eric W. Biederman 62924897d2 proc: Fix the namespace inode permission checks.
Change the proc namespace files into symlinks so that
we won't cache the dentries for the namespace files
which can bypass the ptrace_may_access checks.

To support the symlinks create an additional namespace
inode with it's own set of operations distinct from the
proc pid inode and dentry methods as those no longer
make sense.

Change-Id: Id7d7e0155ef5961778ad339b34f859bc39f4a5aa
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Git-commit: 98c3155c5e3639ca968f948112cb4a50edc86341
Git-repo: https://android.googlesource.com/kernel/common/
CRs-Fixed: 901628
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
2015-09-11 14:41:58 +05:30
Eric W. Biederman 098d8c2310 proc: Generalize proc inode allocation
Generalize the proc inode allocation so that it can be
used without having to having to create a proc_dir_entry.

This will allow namespace file descriptors to remain light
weight entitities but still have the same inode number
when the backing namespace is the same.

Change-Id: I647fe594d3cd25735d4cfcee62a89ad5991b1304
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Git-commit: d25167f07ae914bb824da2e5a661d1848afb19d1
Git-repo: https://android.googlesource.com/kernel/common/
CRs-Fixed: 901628
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
2015-09-11 14:40:29 +05:30