Commit Graph
344369 Commits
Author SHA1 Message Date
Jeff Vander Stoep be068a2dfd Revert "SELinux: per-command whitelisting of ioctls"
This reverts commit bc84b4adb1469e3d05ad76c304a4c545feaf1f88.

Bug: 22846070
Change-Id: Ib4cb130b2225ea2e22556ff852313e0de7dddcab
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
2019-08-05 09:12:29 +02:00
Jeff Vander Stoep e2ed20302b Revert "SELinux: use deletion-safe iterator to free list"
This reverts commit c9a8571249fa3a55a0490bd571eaf0cea097fab0.

Bug: 22846070
Change-Id: I85e2b6322f98bd584ed523b0bd0291375dbc35dc
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
2019-08-05 09:12:29 +02:00
Jeff Vander Stoep a3666d82dc Revert "SELinux: ss: Fix policy write for ioctl operations"
This reverts commit c06168226f5eaaaad93af5b2811f213b01382363.

Bug: 22846070
Change-Id: I665c1f2350e10ce890e7c4be1a06e666929d5d7a
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
2019-08-05 09:12:29 +02:00
Andrey Vagin 62debffab6 signal: allow to send any siginfo to itself
The idea is simple.  We need to get the siginfo for each signal on
checkpointing dump, and then return it back on restore.

The first problem is that the kernel doesn't report complete siginfos to
userspace.  In a signal handler the kernel strips SI_CODE from siginfo.
When a siginfo is received from signalfd, it has a different format with
fixed sizes of fields.  The interface of signalfd was extended.  If a
signalfd is created with the flag SFD_RAW, it returns siginfo in a raw
format.

rt_sigqueueinfo looks suitable for restoring signals, but it can't send
siginfo with a positive si_code, because these codes are reserved for
the kernel.  In the real world each person has right to do anything with
himself, so I think a process should able to send any siginfo to itself.

This patch:

The kernel prevents sending of siginfo with positive si_code, because
these codes are reserved for kernel.  I think we can allow a task to
send such a siginfo to itself.  This operation should not be dangerous.

This functionality is required for restoring signals in
checkpoint/restart.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Cc: Serge Hallyn <serge.hallyn@canonical.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Change-Id: Ibdd8af9dc6400f42db1e3200db90f36df4fe9cc4
(cherry picked from commit 66dd34ad31e5963d72a700ec3f2449291d322921)
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
2019-08-05 09:12:28 +02:00
Kevin F. Haggerty 56d4786636 defconfig: Update defconfig
* Disable CONFIG_USB_ANDROID_SAMSUNG_MTP to allow MTP to work
* Enable CONFIG_CRYPTO_DEV_QCEDEV

Change-Id: I00d82d5ae90fcd4eb95f976728dc83d16947aec0
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
2019-08-05 09:12:25 +02:00
Florian Westphal a6c0aa8530 netfilter: xt_rpfilter: skip locally generated broadcast/multicast, too
Alex Efros reported rpfilter module doesn't match following packets:
IN=br.qemu SRC=192.168.2.1 DST=192.168.2.255 [ .. ]
(netfilter bugzilla #814).

Problem is that network stack arranges for the locally generated broadcasts
to appear on the interface they were sent out, so the IFF_LOOPBACK check
doesn't trigger.

As -m rpfilter is restricted to PREROUTING, we can check for existing
rtable instead, it catches locally-generated broad/multicast case, too.

Change-Id: I2d921ac4d53e5b1ca9a5249e489c33e4fa4a4b3a
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
2019-08-05 09:11:32 +02:00
Ethan Chen 906c7a3636 msm8226: Enable RPFILTER
* regen defconfig while we're at it

Change-Id: I13a622d2228e6cd43959dab24d2486216815f933
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
2019-08-05 09:11:32 +02:00
Tom Marshall 4f75368b85 defconfig: Disable vendor security restrictions
Change-Id: I5b9996ba4634d3f7286d9a2a2ae27310969692be
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
2019-08-05 09:11:28 +02:00
Kevin F. Haggerty 33ec490473 scripts: Eliminate implicit delarations in fips_crypto_utils.c
Change-Id: I6e41b31175141d7e2a763cb8f876279820983fcf
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
2019-08-05 09:10:01 +02:00
H. Peter Anvin 43b65e3d63 kernel: Replace timeconst.pl with a bc script
bc is the standard tool for multi-precision arithmetic.  We switched
to Perl because akpm reported a hard-to-reproduce build hang, which
was very odd because affected and unaffected machines were all running
the same version of GNU bc.

Unfortunately switching to Perl required a really ugly "canning"
mechanism to support Perl < 5.8 installations lacking the Math::BigInt
module.

It was recently pointed out to me that some very old versions of GNU
make had problems with pipes in subshells, which was indeed the
construct used in the Makefile rules in that version of the patch;
Perl didn't need it so switching to Perl fixed the problem for
unrelated reasons.  With the problem (hopefully) root-caused, we can
switch back to bc and do the arbitrary-precision arithmetic naturally.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Change-Id: I8450a919c2d27b6c18561621c0a48a762e46a22d
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
2019-08-05 09:09:45 +02:00
Kevin F. Haggerty ae7675a1bd arm/kernel/setup.c: Add pre-MM bootloader compat shim
* Stop the dying

Change-Id: Ibcb37ecd34f871674e3bdea84f4b8c8de2b82cd8
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
2019-08-05 09:09:36 +02:00
Mallikarjuna GB 1130eee57c Bluetooth: SNIFF: Avoid sniff while SCO to address IOT issues
Change-Id: Ibf6e7eeb5080209db8304e19f5372a5a9ba79ee1
Signed-off-by: Mallikarjuna GB <gbmalli@codeaurora.org>
Reviewed-on: http://gerrit.pcs.mot.com/532378
Submit-Approved: Jira Key <jirakey@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Vishwanath K M <a21174@motorola.com>
Reviewed-by: LieJun Tao <L.J.Tao@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
(cherry picked from commit 95eba67be175d46a071b2fec94670c53afeb5b6b)
2019-08-05 09:08:39 +02:00
Ashish Kumar Sharma 7fa98c3578 Bluetooth: implement S3 Profile
To avoid BT-WiFi coexistence issues, phone will reject
EV3 packet types.Code Logic added to reject EV3 packet
type when eSCO Connection request is from Carkit/Headset,
hence headset will connect SCO with HV3 packet.Phone will
connect devices with eSCO only if 2EV3 packet type is
supported and for other SCO will be connected. This commit
is propagated from (CR)

 - Original JIRA (CR) Packet optimization for BT
 - Feature ID 33099

Change-Id: Icf2ea0589b4364a0a3b1ae33fb724e4fcec36255
Reviewed-on: http://gerrit.pcs.mot.com/317610
Tested-by: Jira Key <JIRAKEY@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: LieJun Tao <L.J.Tao@motorola.com>
Reviewed-by: Ashish Kumar Sharma <rjmc87@motorola.com>
Reviewed-by: Tao Hu <taohu@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Signed-off-by: Vishwanath K M <a21174@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/512986
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Viswanathan N <a21415@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
(cherry picked from commit ab0181f1846f873284bcfb430a49d253ebca9bb2)
2019-08-05 09:08:30 +02:00
Ethan Chen e77394410d tspdrv: Fix possible null pointer
Change-Id: I9a5c713b4e2c0898af972ef284df02e9ff5fe251
2019-08-05 09:08:00 +02:00
Robert Rozic b888192b57 s3ve3g: Fix probing of the ram console
This fixes last_kmsg
Original commit :
CyanogenMod/android_kernel_samsung_hlte@a44fd9d
2019-08-05 09:06:04 +02:00
arter97 db0c83a8c1 tspdrv: add userspace vibration strength control
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>

Code clean-ups & vibration strength over stock 126 value
Signed-off-by: Jean-Pierre Rasquin <yank555.lu@gmail.com>

Change-Id: Ie0941223f07a5df6baadad6b8228cc91710040c9
2019-08-05 09:06:04 +02:00
Robert Rozic 841dff7d51 input: cypress-touchkey - Add keydisabler 2019-08-05 09:06:04 +02:00
Robert Rozic 439e674d94 qpnp-sec-charger: Return 0 when no cable inserted
Thanks @arco
2019-08-05 09:06:03 +02:00
Ravi Joshi 17aa9011f6 WLAN subsystem: Sysctl support for key TCP/IP parameters
It has been observed that default values for some of key tcp/ip
parameters are affecting the tput/performance of the system. Hence
extending configuration capabilities to TCP/Ip stack through
sysctl interface

CRs-Fixed: 507581

Signed-off-by: Kiran Kumar Lokere <klokere@codeaurora.org>

Change-Id: Ia92fc229c0a4a8c3f7e4e02cf7e3c8849719ddff
2019-08-05 09:05:43 +02:00
Robert Rozic d3c58b149a cfg80211: Add wiphy flag to disable 11D hints
Original commit:
https://github.com/CyanogenMod/android_kernel_motorola_msm8226/commit/da4d82de71d28ef1c78b4090f2feaba0c33a77f6
2019-08-05 09:05:32 +02:00
HASH bdfdeeaad7 system_rev: fix type mismatch derps by samsung
Change-Id: Ib4f9c00fa2757fdcbddf89f306144de3eb6042af
Signed-off-by: HASH <hash.xda@gmail.com>
2019-08-04 21:28:01 +02:00
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