Commit graph

608833 commits

Author SHA1 Message Date
Johannes Berg
26f6446935 ipv6: add option to drop unsolicited neighbor advertisements
In certain 802.11 wireless deployments, there will be NA proxies
that use knowledge of the network to correctly answer requests.
To prevent unsolicitd advertisements on the shared medium from
being a problem, on such deployments wireless needs to drop them.

Enable this by providing an option called "drop_unsolicited_na".

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit aec215e7aa380fe5f85eb6948766b58bf78cb6c3)

Change-Id: Iad429a767a786087b0985632be44932b2e3fd1a8
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2020-11-03 21:30:19 +01:00
Johannes Berg
d525209aa0 ipv6: add option to drop unicast encapsulated in L2 multicast
In order to solve a problem with 802.11, the so-called hole-196 attack,
add an option (sysctl) called "drop_unicast_in_l2_multicast" which, if
enabled, causes the stack to drop IPv6 unicast packets encapsulated in
link-layer multi- or broadcast frames. Such frames can (as an attack)
be created by any member of the same wireless network and transmitted
as valid encrypted frames since the symmetric key for broadcast frames
is shared between all stations.

Reviewed-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit dede82143bf1bbf92ea73a519bb0298b19c56cb9)

Change-Id: I76c8f84b53e95c40ad3c2b5adac0ec4964cc920c
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2020-11-03 21:30:19 +01:00
Johannes Berg
03d929b812 ipv4: add option to drop unicast encapsulated in L2 multicast
In order to solve a problem with 802.11, the so-called hole-196 attack,
add an option (sysctl) called "drop_unicast_in_l2_multicast" which, if
enabled, causes the stack to drop IPv4 unicast packets encapsulated in
link-layer multi- or broadcast frames. Such frames can (as an attack)
be created by any member of the same wireless network and transmitted
as valid encrypted frames since the symmetric key for broadcast frames
is shared between all stations.

Additionally, enabling this option provides compliance with a SHOULD
clause of RFC 1122.

Change-Id: I8de9fa5bdbea0556802f2ee553d0e73c1349213e
Reviewed-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2020-11-03 21:30:19 +01:00
codeworkx
86a07298eb smb: enable otg feature on driver init and based on dash status
Change-Id: Ic8d554e9df4457bc9e3ad8c2182d5b555b3513bf
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2020-11-03 21:30:18 +01:00
codeworkx
be94132514 mdss: use lower case letters for adobe_rgb, dcip3 and srgb to be consistent
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2020-11-03 21:30:18 +01:00
codeworkx
845fe1efff tri-state-key: send proper input when updating keycodes from userspace
Change-Id: I6a3d2869d7e4c655b02454b91c5bef19a5a815f9
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2020-11-03 21:30:18 +01:00
codeworkx
0a1f43c27f tri_state_key: bring inline with lineage-15.1
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2020-11-03 21:30:18 +01:00
codeworkx
fdf7a2555a synaptics S3320: bring inline with lineage-15.1
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2020-11-03 21:30:18 +01:00
codeworkx
0757f942ea fpc1020: bring inline with lineage-15.1
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2020-11-03 21:30:17 +01:00
Sam Mortimer
213e1377ab msm8998: Add proximity_state sysfs support to goodix driver
*) Implements sysfs proximity_state so that fp reader
   can be disabled by PocketMode app.

*) Code fragments copied from fpc1020 driver where possible.

Change-Id: If0e6fa3172e1546d989de8522b2bdd734a3840a6
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2020-11-03 21:30:17 +01:00
Tim Murray
cdf0459d0e cpuidle: don't disable cpuidle when entering suspend
cpuidle was disabled while entering suspend as part of commit
8651f97bd9 in order to work around some
ACPI bugs. However, there's no reason to do this on modern
platforms. Leaving cpuidle enabled can result in improved power
consumption if dpm_resume_noirq runs for a significant time.

Change-Id: Ie182785b176f448698c0264eba554d1e315e8a06
2020-11-03 21:30:17 +01:00
Alex Naidis
ecdefa7279 DTS: Reduce msm-core polling rate to 100ms
100ms is a better polling rate since the
scheduler's informational demand is lower
than expected.

Change-Id: I5c399155d9bc2469b249bff9e3b9a744b4121429
2020-11-03 21:30:17 +01:00
Sultanxda
16a635bba7 power: msm-core: Fix mutex not getting unlocked in error path
When this copy_to_user() fails, the mutex won't be unlocked. Fix it.

Change-Id: I99c93fd04e812d187b83ff375d95a2abba82f501
Signed-off-by: Sultanxda <sultanxda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2020-11-03 21:30:17 +01:00
Alexander Martinz
4c632e266f block, bfq: fix build breakage
Caused by latest block changes from 06100.
struct backing_device_info is not available anymore.

Change-Id: I47ca095ffbad02c3d9158d869d89485ed005435f
Signed-off-by: Alexander Martinz <alex@amartinz.at>
2020-11-03 21:30:17 +01:00
Alexander Martinz
ce9425e7cb block, bfq: update to latest bfq-v8-v4.4 state
BFQ-v8r12 up to 887cf43acdb1d5415fa678e4a63be8fe1bab2d3a

Change-Id: I4725397969026ff9fa969d598c4378f24800c31d
Signed-off-by: Alexander Martinz <alex@amartinz.at>
2020-11-03 21:30:16 +01:00
Mauro Andreolini
1e27de9cd6 block, bfq: add Early Queue Merge (EQM) to BFQ-v7r11 for 4.4.0
A set of processes may happen  to  perform interleaved reads, i.e.,requests
whose union would give rise to a  sequential read  pattern.  There are two
typical  cases: in the first  case,   processes  read  fixed-size chunks of
data at a fixed distance from each other, while in the second case processes
may read variable-size chunks at  variable distances. The latter case occurs
for  example with  QEMU, which  splits the  I/O generated  by the  guest into
multiple chunks,  and lets these chunks  be served by a  pool of cooperating
processes,  iteratively  assigning  the  next  chunk of  I/O  to  the first
available  process. CFQ  uses actual  queue merging  for the  first type of
rocesses, whereas it  uses preemption to get a sequential  read pattern out
of the read requests  performed by the second type of  processes. In the end
it uses  two different  mechanisms to  achieve the  same goal: boosting the
throughput with interleaved I/O.

This patch introduces  Early Queue Merge (EQM), a unified mechanism to get a
sequential  read pattern  with both  types of  processes. The  main idea is
checking newly arrived requests against the next request of the active queue
both in case of actual request insert and in case of request merge. By doing
so, both the types of processes can be handled by just merging their queues.
EQM is  then simpler and  more compact than the  pair of mechanisms used in
CFQ.

Finally, EQM  also preserves the  typical low-latency properties of BFQ, by
properly restoring the weight-raising state of a queue when it gets back to
a non-merged state.

Change-Id: I9c626abcc591f9d9bc82fa535b7a11a38b6f89cb
Signed-off-by: Mauro Andreolini <mauro.andreolini@unimore.it>
Signed-off-by: Arianna Avanzini <avanzini@google.com>
Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2020-11-03 21:30:16 +01:00
Paolo Valente
ec0889a941 block: introduce the BFQ-v7r11 I/O sched for 4.4.0
The general structure is borrowed from CFQ, as much of the code for
handling I/O contexts. Over time, several useful features have been
ported from CFQ as well (details in the changelog in README.BFQ). A
(bfq_)queue is associated to each task doing I/O on a device, and each
time a scheduling decision has to be made a queue is selected and served
until it expires.

    - Slices are given in the service domain: tasks are assigned
      budgets, measured in number of sectors. Once got the disk, a task
      must however consume its assigned budget within a configurable
      maximum time (by default, the maximum possible value of the
      budgets is automatically computed to comply with this timeout).
      This allows the desired latency vs "throughput boosting" tradeoff
      to be set.

    - Budgets are scheduled according to a variant of WF2Q+, implemented
      using an augmented rb-tree to take eligibility into account while
      preserving an O(log N) overall complexity.

    - A low-latency tunable is provided; if enabled, both interactive
      and soft real-time applications are guaranteed a very low latency.

    - Latency guarantees are preserved also in the presence of NCQ.

    - Also with flash-based devices, a high throughput is achieved
      while still preserving latency guarantees.

    - BFQ features Early Queue Merge (EQM), a sort of fusion of the
      cooperating-queue-merging and the preemption mechanisms present
      in CFQ. EQM is in fact a unified mechanism that tries to get a
      sequential read pattern, and hence a high throughput, with any
      set of processes performing interleaved I/O over a contiguous
      sequence of sectors.

    - BFQ supports full hierarchical scheduling, exporting a cgroups
      interface.  Since each node has a full scheduler, each group can
      be assigned its own weight.

    - If the cgroups interface is not used, only I/O priorities can be
      assigned to processes, with ioprio values mapped to weights
      with the relation weight = IOPRIO_BE_NR - ioprio.

    - ioprio classes are served in strict priority order, i.e., lower
      priority queues are not served as long as there are higher
      priority queues.  Among queues in the same class the bandwidth is
      distributed in proportion to the weight of each queue. A very
      thin extra bandwidth is however guaranteed to the Idle class, to
      prevent it from starving.

Change-Id: I1c789ca3c2eb93972d742f82ee729cfe5fb7170c
Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
Signed-off-by: Arianna Avanzini <avanzini@google.com>
2020-11-03 21:30:16 +01:00
codeworkx
3ea001b8c4 leds-qpnp: revert changes made by op
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2020-11-03 21:30:16 +01:00
Pranav Vashi
eedaf85245 drivers: Allow disabling OEM debug support
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2020-11-03 21:30:16 +01:00
Srinivas Girigowda
a8f858b908 cfg80211: Support backport of removing ieee80211
Bug: 62058353
Change-Id: Id8725947048bb4ba461dcb77b7b9023991a304be
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2020-11-03 21:30:16 +01:00
Scott Mertz
f9dd83f04a leds: leds-qpnp: add synchronized rgb control
Change-Id: Idd480a7d251a550f02f30e84f29a3f87f4e91323
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2020-11-03 21:30:15 +01:00
yanyh2
20e091c857 pwm-qpnp: fix the uninitialized pwm mode issue
If the led request the PWM mode and the initial mode is PWM
when change the led pwm mode, it will fail to change pwm mode
for no mode change with a uninitialized return code and cause
the LED configuration failing

Change-Id: I29ba3823fb7b4f0d1b2a0d9f22c464c94fbe9717
Signed-off-by: yanyh2 <yanyh2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1072946
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Coverity Analysis <coverity@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2020-11-03 21:30:15 +01:00
Scott Mertz
c3b7b440aa pwm: qpnp-pwm: add api for synchronous enable of pwms
Change-Id: Ibe4d8f8f8c9dbb89434cd633a049bd9e216af6f4
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2020-11-03 21:30:15 +01:00
Daniel Rosenberg
33152bb4c7 ANDROID: sdcardfs: Change current->fs under lock
Adjusted from previous version to add missing include

bug: 111641492

Change-Id: I321d83f5d599efb3abdfaf2f3a4900ac512beca6
Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Git-commit: f6d0920c41a732be06d284177311b57335227bd1
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2020-11-03 17:30:11 +01:00
Tejaswi Tanikella
e25ce14ec1 pppolac: pull udp header before sock enqueue
pppolac driver incorrectly enqueues the packet into the sock queue
without pulling UDP headers. The application will receive data along
with UDP header when L2TP control packets are received.

The issue was introduced after moving UDP header removal functionality
from process rcvmesg context to BH context.

Instead of pppolac driver directly queuing L2TP control packets into
socket queue, return packet to udp_queue_rcv_skb, which will deliver the
packet to the application after pulling the UDP header.

Fixes: e6afc8ace ("udp: remove headers from UDP packets before queueing")

Change-Id: Icfa0fd8da43ea9c14fa7c718746a6529651ac202
Signed-off-by: Tejaswi Tanikella <tejaswit@codeaurora.org>
Signed-off-by: Chinmay Agarwal <chinagar@codeaurora.org>
Acked-by: Sharath Chandra Vurukala <sharathv@qti.qualcomm.com>
2020-11-03 17:30:10 +01:00
Hardik Arya
7a51a8d49b soc: qcom: Remove smp2p test support
Smp2p test code is used internally to test the
functionality of drivers and has no real use case
in end product.

Change-Id: I7a50c077bb71068188b5411424c5782b3d0edbb7
Signed-off-by: Hardik Arya <harya@codeaurora.org>
2020-11-03 17:30:10 +01:00
Isaac J. Manjarres
58d4b3e3dc soc: qcom: service-locator: Free PD list after client use
Currently, when a client invokes the service-locator to get
the domain list for a service, a data structure is dynamically
allocated to hold this information, and that is given to the
client for use. However, after the client uses the domain list,
the data structure is not freed, resulting in a memory leak.

Free domain list data structure after client use to fix
memory leak.

Change-Id: I2b87afefbb35c2c296b4267450fa3152e3725ab9
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2020-11-03 17:30:09 +01:00
Sean Tranchetti
aa90e21aee xfrm: validate template mode
XFRM mode parameters passed as part of the user templates
in the IP_XFRM_POLICY are never properly validated. Passing
values other than valid XFRM modes can cause stack-out-of-bounds
reads to occur later in the XFRM processing:

[  140.535608] ================================================================
[  140.543058] BUG: KASAN: stack-out-of-bounds in xfrm_state_find+0x17e4/0x1cc4
[  140.550306] Read of size 4 at addr ffffffc0238a7a58 by task repro/5148
[  140.557369]
[  140.558927] Call trace:
[  140.558936] dump_backtrace+0x0/0x388
[  140.558940] show_stack+0x24/0x30
[  140.558946] __dump_stack+0x24/0x2c
[  140.558949] dump_stack+0x8c/0xd0
[  140.558956] print_address_description+0x74/0x234
[  140.558960] kasan_report+0x240/0x264
[  140.558963] __asan_report_load4_noabort+0x2c/0x38
[  140.558967] xfrm_state_find+0x17e4/0x1cc4
[  140.558971] xfrm_resolve_and_create_bundle+0x40c/0x1fb8
[  140.558975] xfrm_lookup+0x238/0x1444
[  140.558977] xfrm_lookup_route+0x48/0x11c
[  140.558984] ip_route_output_flow+0x88/0xc4
[  140.558991] raw_sendmsg+0xa74/0x266c
[  140.558996] inet_sendmsg+0x258/0x3b0
[  140.559002] sock_sendmsg+0xbc/0xec
[  140.559005] SyS_sendto+0x3a8/0x5a8
[  140.559008] el0_svc_naked+0x34/0x38
[  140.559009]
[  140.592245] page dumped becaus: kasan: bad access detected
[  140.597981] page_owner info is not active (free page?)
[  140.603267]
[  140.653503] ================================================================

Change-Id: I5d2fa78a9d950c79d83d759bfd4d0f399fed18a4
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2020-11-03 17:30:09 +01:00
Amit Kushwaha
015a6c37e1 msm: kgsl: create sysfs entries to expose memory usage
Added sysfs entries to show kgsl memory usage statistics.
gpumem_mapped: kgsl memory mapped in the process address space.
gpumem_unmapped: kgsl allocated memory but not mapped in process.
imported_mem: graphics memory not allocated by the kgsl.

Below is the sysfs path for new entries:
/sys/class/kgsl/kgsl/proc/<pid>/

Change-Id: I08c2014d28dc0ca1e2b54ebf966d00143b303b54
Signed-off-by: Amit Kushwaha <kushwaha@codeaurora.org>
2020-11-03 17:29:57 +01:00
Harshit Agarwal
2103804389 Synchronize codes for Oneplus 5/5T OxygenOS 10.0.0
Change-Id: I982483b5b5ac1343805a1fb1e102addcb1fdaedb
2020-06-22 11:51:14 +05:30
Linux Build Service Account
db88d6df81 Merge f1a61bc4b5 on remote branch
Change-Id: Ib55ccdefd66a9ee0ec66ded8a10f2a2c07b72a2e
2020-02-10 00:35:53 -08:00
Linux Build Service Account
f1a61bc4b5 Merge "msm: vidc: avoid OOB write while accessing memory" 2020-01-20 06:41:08 -08:00
Linux Build Service Account
d422a6317e Merge "msm: vidc: remove additional checks in response_handler" 2020-01-20 06:40:50 -08:00
Dikshita Agarwal
106a302993 msm: vidc: avoid OOB write while accessing memory
Exclude 4 bytes which holds the size of the buffer while calculating
the actual buffer size to avoid OOB write.

Change-Id: I5471fabc3652a942797019c5beb06d17a713b079
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
2020-01-20 02:23:40 -08:00
Jhansi Konathala
6d64470424 asoc: msm-compress: Replace goto with return in case of invalid value
In case of invalid values in _put() callback return directly to avoid
deadlock issue with mutex unlocking in goto label.

Change-Id: Ib0623e26dd83b96cd6ec315f515098b8ea0b2dd2
Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
Signed-off-by: Jhansi Konathala <cjkonat@codeaurora.org>
2020-01-10 05:12:34 -08:00
Jhansi Konathala
80cdbd8809 asoc: msm-compress: Add lock in controls _put() and _get() callback
Few mixer controls _put and _get methods uses runtime private data
that can be freed by close() callback in parallel threads leading
to issue. Added global mutex lock in such methods to avoid runtime
concurrency around such data.

Change-Id: Ie542c64a4f1e50fd9547ebb9f65df2b7b0c21a0e
Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
Signed-off-by: Jhansi Konathala <cjkonat@codeaurora.org>
2020-01-10 05:11:25 -08:00
Linux Build Service Account
d8b4ad87cc Merge a4fda00580 on remote branch
Change-Id: I4af95060f1a9e244514071d0f0a873ce10f9c5c0
2020-01-08 11:57:21 -08:00
Govindaraj Rajagopal
6c606f6009 msm: vidc: remove additional checks in response_handler
possibility of OOB access on device->response_pkt in
__response_handler. for e.x if msg queue contains 1000
messages and all 1000 were read and queue is empty.
So __get_q_size api will return zero and _iface_msgq_read
will go in an infinite loop, even if packet_count
== max_packets.

Change-Id: I3c0fb095feff0ba5d4d6dab65ed9d5111f1b6f05
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-01-06 04:22:55 -08:00
E V Ravi
a4fda00580 msm: ais: fix camif_cfg programming
Fixed Camera configuration register. Register expects width and height
starting from 0 while it was programmed starting from 1.

This fixes CAMIF erorrs we experience as the programmed size is
always 1 more pixel and line.

Change-Id: I73f1f5040820b71d317c317f8f5c6e3ff19db6e6
Signed-off-by: E V Ravi <evenka@codeaurora.org>
2019-12-12 20:45:24 -08:00
Linux Build Service Account
b3e4ae2788 Merge "ARM: dts: msm: remove CARVEOUT ION for msm8996 ivi multi-gvm vplatform" 2019-12-10 02:24:26 -08:00
Linux Build Service Account
33dc678e76 Merge 7207889184 on remote branch
Change-Id: I219a5f0e8bd6ee3be3ba0d49230dde908d35dc25
2019-12-06 12:51:54 -08:00
Linux Build Service Account
a9ef617072 Merge "diag: Update diag logging mask definitions" 2019-12-05 09:17:37 -08:00
Chao Bi
e445e5b99e ARM: dts: msm: remove CARVEOUT ION for msm8996 ivi multi-gvm vplatform
CARVEOUT ION memory is not needed for lv gvm in multi-mode.

Change-Id: Id45da104da170680c0daa607c29b4ca6ca6f5779
Signed-off-by: Chao Bi <chaobi@codeaurora.org>
2019-12-05 16:55:13 +08:00
Manoj Prabhu B
efea876c05 diag: Update diag logging mask definitions
Extend build mask range and define logging levels for SSID range 0.
Update event and log mask last ids to support latest log mask ranges.

Change-Id: Iaca4f1d10e8e61db42c5dafab33c772c026b3845
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
2019-12-04 23:10:59 -08:00
Linux Build Service Account
def71a82e0 Merge "soc: qcom: hab: run the dispatcher's tasklet w/ high priority" 2019-12-04 22:43:29 -08:00
Linux Build Service Account
f8bce34049 Merge "media: v4l2loopback: fix for dereferenced error" 2019-12-04 12:33:25 -08:00
Linux Build Service Account
7207889184 Merge "Merge android-4.4-p.205 (5169787) into msm-4.4" 2019-12-04 05:36:53 -08:00
Linux Build Service Account
a94efeebe0 Merge "Merge android-4.4-p.204 (583bdda) into msm-4.4" 2019-12-04 05:36:51 -08:00
Lily Li
4bbb2def1d media: v4l2loopback: fix for dereferenced error
Found the code hasn't check whether some var is NULL before
using it in v4l2loopback. Fix those issues.

Change-Id: I559ed8c0978cf478ed713761b7bc7e3b21c09ff4
Signed-off-by: Lily Li <lali@codeaurora.org>
2019-12-03 14:56:04 +08:00
Linux Build Service Account
fbbb7d9af6 Merge "Merge android-4.4-p.203 (40ef73d) into msm-4.4" 2019-12-02 11:31:29 -08:00