OSDN Git Service

sagit-ice-cold/kernel_xiaomi_msm8998.git
7 years agotcp: fix use after free in tcp_xmit_retransmit_queue()
Eric Dumazet [Wed, 17 Aug 2016 12:56:26 +0000 (05:56 -0700)]
tcp: fix use after free in tcp_xmit_retransmit_queue()

When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the
tail of the write queue using tcp_add_write_queue_tail()

Then it attempts to copy user data into this fresh skb.

If the copy fails, we undo the work and remove the fresh skb.

Unfortunately, this undo lacks the change done to tp->highest_sack and
we can leave a dangling pointer (to a freed skb)

Later, tcp_xmit_retransmit_queue() can dereference this pointer and
access freed memory. For regular kernels where memory is not unmapped,
this might cause SACK bugs because tcp_highest_sack_seq() is buggy,
returning garbage instead of tp->snd_nxt, but with various debug
features like CONFIG_DEBUG_PAGEALLOC, this can crash the kernel.

This bug was found by Marco Grassi thanks to syzkaller.

Change-Id: Iba5975e360eb2b2729b6f958b7cb00bfc469e51b
Fixes: 6859d49475d4 ("[TCP]: Abstract tp->highest_sack accessing & point to next skb")
Reported-by: Marco Grassi <marco.gra@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-repo: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git
Git-commit: bb1fceca22492109be12640d49f5ea5a544c6bb4
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
7 years agoMerge "msm: wlan: update regulatory database" into msm-4.4
Service qcabuildsw [Fri, 18 Nov 2016 23:41:21 +0000 (15:41 -0800)]
Merge "msm: wlan: update regulatory database" into msm-4.4

7 years agoMerge "msm: kgsl: Make sure USE_CPU_MAP + MAP_USER_MEM work together"
Linux Build Service Account [Fri, 18 Nov 2016 09:55:05 +0000 (01:55 -0800)]
Merge "msm: kgsl: Make sure USE_CPU_MAP + MAP_USER_MEM work together"

7 years agoMerge "msm: kgsl: Fix pagetable member of struct kgsl_memdesc"
Linux Build Service Account [Fri, 18 Nov 2016 09:55:03 +0000 (01:55 -0800)]
Merge "msm: kgsl: Fix pagetable member of struct kgsl_memdesc"

7 years agoMerge "ARM: dts: msm: Enable auto GM for WLED in pmicobalt"
Linux Build Service Account [Fri, 18 Nov 2016 09:55:02 +0000 (01:55 -0800)]
Merge "ARM: dts: msm: Enable auto GM for WLED in pmicobalt"

7 years agoMerge "leds: qpnp-wled: Add support to configure auto PFM for pmicobalt"
Linux Build Service Account [Fri, 18 Nov 2016 09:55:01 +0000 (01:55 -0800)]
Merge "leds: qpnp-wled: Add support to configure auto PFM for pmicobalt"

7 years agoMerge "msm: ipa3: linearize large skbs"
Linux Build Service Account [Fri, 18 Nov 2016 09:55:00 +0000 (01:55 -0800)]
Merge "msm: ipa3: linearize large skbs"

7 years agoMerge "msm: mdss: hide additional kernel addresses from unprivileged users"
Linux Build Service Account [Fri, 18 Nov 2016 09:55:00 +0000 (01:55 -0800)]
Merge "msm: mdss: hide additional kernel addresses from unprivileged users"

7 years agoMerge "ASoC: msm: Fix sound card registration failure"
Linux Build Service Account [Fri, 18 Nov 2016 09:54:58 +0000 (01:54 -0800)]
Merge "ASoC: msm: Fix sound card registration failure"

7 years agoMerge "msm: sde: remove secure camera ctrl_id definition"
Linux Build Service Account [Fri, 18 Nov 2016 09:54:58 +0000 (01:54 -0800)]
Merge "msm: sde: remove secure camera ctrl_id definition"

7 years agoMerge "ARM: dts: msm: Add ufs regulators for msmfalcon interposer"
Linux Build Service Account [Fri, 18 Nov 2016 09:54:57 +0000 (01:54 -0800)]
Merge "ARM: dts: msm: Add ufs regulators for msmfalcon interposer"

7 years agoMerge "usb: pd: Stop processing SVDM if handler found"
Linux Build Service Account [Fri, 18 Nov 2016 09:54:56 +0000 (01:54 -0800)]
Merge "usb: pd: Stop processing SVDM if handler found"

7 years agoMerge "sched/hmp: Enhance co-location and scheduler boost features"
Linux Build Service Account [Fri, 18 Nov 2016 09:54:54 +0000 (01:54 -0800)]
Merge "sched/hmp: Enhance co-location and scheduler boost features"

7 years agoMerge "USB: Allow skipping device resume during system resume"
Linux Build Service Account [Fri, 18 Nov 2016 09:54:54 +0000 (01:54 -0800)]
Merge "USB: Allow skipping device resume during system resume"

7 years agoMerge "clk: msm: Add the CLKFLAG_NO_RATE_CACHE flag for MM clocks on MSM COBALT"
Linux Build Service Account [Fri, 18 Nov 2016 09:54:53 +0000 (01:54 -0800)]
Merge "clk: msm: Add the CLKFLAG_NO_RATE_CACHE flag for MM clocks on MSM COBALT"

7 years agoMerge "clk: qcom: Add support to be able to slew PLL"
Linux Build Service Account [Fri, 18 Nov 2016 09:54:52 +0000 (01:54 -0800)]
Merge "clk: qcom: Add support to be able to slew PLL"

7 years agoMerge "qseecom: improve error checks in qseecom_probe()"
Linux Build Service Account [Fri, 18 Nov 2016 09:54:51 +0000 (01:54 -0800)]
Merge "qseecom: improve error checks in qseecom_probe()"

7 years agoMerge "msm: mdss: Add systrace for readptr_done"
Linux Build Service Account [Fri, 18 Nov 2016 09:54:50 +0000 (01:54 -0800)]
Merge "msm: mdss: Add systrace for readptr_done"

7 years agoMerge "ARM: dts: msm: Add physical dimensions for NT35597 panel"
Linux Build Service Account [Fri, 18 Nov 2016 09:54:50 +0000 (01:54 -0800)]
Merge "ARM: dts: msm: Add physical dimensions for NT35597 panel"

7 years agoMerge "msm: mdss: fix incorrect mutex unlocking during NOTIFY_UPDATE_STOP"
Linux Build Service Account [Fri, 18 Nov 2016 09:54:48 +0000 (01:54 -0800)]
Merge "msm: mdss: fix incorrect mutex unlocking during NOTIFY_UPDATE_STOP"

7 years agoMerge "msm: mdss: fix race condition in dsi clk off request"
Linux Build Service Account [Fri, 18 Nov 2016 09:54:47 +0000 (01:54 -0800)]
Merge "msm: mdss: fix race condition in dsi clk off request"

7 years agoMerge "ARM: dts: msm: specify I2C configuration for msmfalcon"
Linux Build Service Account [Fri, 18 Nov 2016 09:54:46 +0000 (01:54 -0800)]
Merge "ARM: dts: msm: specify I2C configuration for msmfalcon"

7 years agoMerge "ARM: dts: msm: specify UART configuration on msmfalcon."
Linux Build Service Account [Fri, 18 Nov 2016 09:54:45 +0000 (01:54 -0800)]
Merge "ARM: dts: msm: specify UART configuration on msmfalcon."

7 years agoMerge "clk: qcom: Add support for debugfs support"
Linux Build Service Account [Fri, 18 Nov 2016 09:54:43 +0000 (01:54 -0800)]
Merge "clk: qcom: Add support for debugfs support"

7 years agoMerge "clk: Add support to allow client to print all enabled clocks"
Linux Build Service Account [Fri, 18 Nov 2016 09:54:42 +0000 (01:54 -0800)]
Merge "clk: Add support to allow client to print all enabled clocks"

7 years agoMerge "scsi: ufs: enable auto hibern8 only after device initialization"
Linux Build Service Account [Fri, 18 Nov 2016 09:54:42 +0000 (01:54 -0800)]
Merge "scsi: ufs: enable auto hibern8 only after device initialization"

7 years agoMerge "scsi: ufs: fix sleep in atomic context"
Linux Build Service Account [Fri, 18 Nov 2016 09:54:41 +0000 (01:54 -0800)]
Merge "scsi: ufs: fix sleep in atomic context"

7 years agoMerge "phy: qcom-ufs: update ufs phy 1-lane settings"
Linux Build Service Account [Fri, 18 Nov 2016 09:54:37 +0000 (01:54 -0800)]
Merge "phy: qcom-ufs: update ufs phy 1-lane settings"

7 years agoMerge "diag: Set the diag write buffers to busy state on channel close"
Linux Build Service Account [Fri, 18 Nov 2016 09:54:35 +0000 (01:54 -0800)]
Merge "diag: Set the diag write buffers to busy state on channel close"

7 years agomsm: wlan: update regulatory database
Amar Singhal [Wed, 16 Nov 2016 19:20:33 +0000 (11:20 -0800)]
msm: wlan: update regulatory database

Incorporate the 2016-10-31 updates to the internal regulatory
database. Update countries Bahrain, Belize, Chile, Egypt, Honduras,
India, S Korea, Nepal, Panama, Russia, Senegal, TT and UAE. Also
update St. Kitts&Navis and St. Lucia dfs region.

Change-Id: Ia151b2dd5229f07790ac961af298305b24e098fb
CRs-Fixed: 1091511
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
7 years agoMerge "leds: qpnp-wled: Add support to configure AUTO_GM settings"
Linux Build Service Account [Thu, 17 Nov 2016 18:08:46 +0000 (10:08 -0800)]
Merge "leds: qpnp-wled: Add support to configure AUTO_GM settings"

7 years agoMerge "tcp: take care of truncations done by sk_filter()"
Linux Build Service Account [Thu, 17 Nov 2016 18:08:45 +0000 (10:08 -0800)]
Merge "tcp: take care of truncations done by sk_filter()"

7 years agoMerge "scsi: ufs: handle LINERESET during hibern8"
Linux Build Service Account [Thu, 17 Nov 2016 18:08:44 +0000 (10:08 -0800)]
Merge "scsi: ufs: handle LINERESET during hibern8"

7 years agoMerge "scsi: ufs-qcom: update clock scaling sequence"
Linux Build Service Account [Thu, 17 Nov 2016 18:08:43 +0000 (10:08 -0800)]
Merge "scsi: ufs-qcom: update clock scaling sequence"

7 years agoMerge "ARM: dts: msm: ensure contiguous MSI for PCIe on msmcobalt"
Linux Build Service Account [Thu, 17 Nov 2016 18:08:42 +0000 (10:08 -0800)]
Merge "ARM: dts: msm: ensure contiguous MSI for PCIe on msmcobalt"

7 years agoMerge "driver: thermal: msm_thermal: Enable Reliability algorithm"
Linux Build Service Account [Thu, 17 Nov 2016 18:08:41 +0000 (10:08 -0800)]
Merge "driver: thermal: msm_thermal: Enable Reliability algorithm"

7 years agoMerge "leds: qpnp-flash: Fix the mask in the flash prepare API"
Linux Build Service Account [Thu, 17 Nov 2016 18:08:40 +0000 (10:08 -0800)]
Merge "leds: qpnp-flash: Fix the mask in the flash prepare API"

7 years agoMerge "leds: qpnp-flash-v2: change from dev_*() to pr_*() for logging"
Linux Build Service Account [Thu, 17 Nov 2016 18:08:38 +0000 (10:08 -0800)]
Merge "leds: qpnp-flash-v2: change from dev_*() to pr_*() for logging"

7 years agoMerge "leds: qpnp-flash-v2: Add support for configuring OTST thresholds"
Linux Build Service Account [Thu, 17 Nov 2016 18:08:38 +0000 (10:08 -0800)]
Merge "leds: qpnp-flash-v2: Add support for configuring OTST thresholds"

7 years agoMerge "leds: qpnp-flash-v2: Add support for thermal derate features"
Linux Build Service Account [Thu, 17 Nov 2016 18:08:37 +0000 (10:08 -0800)]
Merge "leds: qpnp-flash-v2: Add support for thermal derate features"

7 years agoMerge "msm: kgsl: preserve ISENSE registers across GPU power collapse"
Linux Build Service Account [Thu, 17 Nov 2016 18:08:36 +0000 (10:08 -0800)]
Merge "msm: kgsl: preserve ISENSE registers across GPU power collapse"

7 years agoMerge "scsi: ufs: error out all issued requests after shutdown"
Linux Build Service Account [Thu, 17 Nov 2016 18:08:34 +0000 (10:08 -0800)]
Merge "scsi: ufs: error out all issued requests after shutdown"

7 years agoARM: dts: msm: Enable auto GM for WLED in pmicobalt
Fenglin Wu [Thu, 10 Nov 2016 02:17:02 +0000 (10:17 +0800)]
ARM: dts: msm: Enable auto GM for WLED in pmicobalt

Enable auto GM for WLED module in pmicobalt to make LOOP_GM adaptively
changes with brightness change.

CRs-Fixed: 1081738
Change-Id: I10a788726358c56df9bfe11f2332e3823d7cd332
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
7 years agoleds: qpnp-wled: Add support to configure auto PFM for pmicobalt
Fenglin Wu [Wed, 9 Nov 2016 05:37:08 +0000 (13:37 +0800)]
leds: qpnp-wled: Add support to configure auto PFM for pmicobalt

The WLED boost controller in pmicobalt supports auto PFM mode when
LCD mode is selected. Auto PFM mode is enabled by default except
on some specific hardware versions. Add a property to specify
AUTO_PFM_THRESHOLD for the boost controller so that it can enter
PFM mode when the adaptive headroom voltage falls below the
threshold.

CRs-Fixed: 1081738
Change-Id: I964b3452d0cdb3618b4ab446655ae75fa3a1049d
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
7 years agoMerge "leds: qpnp-wled: Add support to configure VREF_CONTROL for pmicobalt"
Linux Build Service Account [Thu, 17 Nov 2016 10:22:35 +0000 (02:22 -0800)]
Merge "leds: qpnp-wled: Add support to configure VREF_CONTROL for pmicobalt"

7 years agoMerge "msm: cpp: Use the src clock node to read the cpp src clock rate"
Linux Build Service Account [Thu, 17 Nov 2016 10:22:34 +0000 (02:22 -0800)]
Merge "msm: cpp: Use the src clock node to read the cpp src clock rate"

7 years agoMerge "ARM: dts: msm: Add cpp src clock rates configuration for msmcobalt"
Linux Build Service Account [Thu, 17 Nov 2016 10:22:34 +0000 (02:22 -0800)]
Merge "ARM: dts: msm: Add cpp src clock rates configuration for msmcobalt"

7 years agoASoC: msm: Fix sound card registration failure
Laxminath Kasam [Wed, 16 Nov 2016 13:57:44 +0000 (19:27 +0530)]
ASoC: msm: Fix sound card registration failure

In external codec machine driver, register
SSR notifier after sound card register. Also,
add separate snd_soc_card variables for tavil
and tasha since same machine driver is used
for both codecs.

CRs-Fixed: 1083537
Change-Id: I73fc02b812f2e6694e2a6aa8bdad2381a5f19406
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
7 years agoASoC: msm: Add support for USB/WCN/TDM Audio
Laxminath Kasam [Mon, 14 Nov 2016 11:52:55 +0000 (17:22 +0530)]
ASoC: msm: Add support for USB/WCN/TDM Audio

Add required machine driver support for
USB Audio, BT, FM, TDM interfaces both
for internal and external codecs.

CRs-Fixed: 1083537
Change-Id: I3d2765535793d6ef9153cfcab4b44a9adad67e15
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
7 years agoMerge "icnss: Update WLFW header file to the latest and add fw_build_id"
Linux Build Service Account [Thu, 17 Nov 2016 02:17:04 +0000 (18:17 -0800)]
Merge "icnss: Update WLFW header file to the latest and add fw_build_id"

7 years agoMerge "icnss: Collect ramdump from MSA memory space"
Linux Build Service Account [Thu, 17 Nov 2016 02:17:03 +0000 (18:17 -0800)]
Merge "icnss: Collect ramdump from MSA memory space"

7 years agoMerge "msm: sde: Fix SDE rotator context list locking"
Linux Build Service Account [Thu, 17 Nov 2016 02:17:02 +0000 (18:17 -0800)]
Merge "msm: sde: Fix SDE rotator context list locking"

7 years agosched/hmp: Enhance co-location and scheduler boost features
Syed Rameez Mustafa [Wed, 31 Aug 2016 23:54:12 +0000 (16:54 -0700)]
sched/hmp: Enhance co-location and scheduler boost features

The recent introduction of the schedtune cgroup controller has provided
the scheduler with added flexibility in terms of some of it's placement
features. In particular each cgroup under the schedtune controller can
now specify:

1) Whether it needs co-location along with other cgroups
2) Whether it is eligible for scheduler boost (sched_boost_enabled)
3) Whether the kernel can override the boost eligibility when necessary
   (sched_boost_no_override)

The scheduler now creates a reserved co-location group at boot. This
group is used to co-locate all tasks that form part of any one of the
cgroups that have co-location enabled. This reserved group can neither
be destroyed nor reused for other purposes. Furthermore, cgroups are
only allowed to indicate their co-location preference once at boot.
Further updates are disallowed.

Since we are now creating co-location groups for an extended period of
time, there are a few other factors to consider when determining the
preferred cluster for the group. We first exclude any tasks in the
group that have not been observed to be running for a significant
amount of time. Secondly we introduce the notion of group up and down
migrate tunables to allow different migration policies than individual
tasks. Lastly we break co-location if a single task in a group exceeds
up-migrate but the total load of the group does not exceed group
up-migrate.

In terms of sched_boost, the scheduler now supports multiple types of
boost. These are:

1) FULL_THROTTLE : Force up-migrate tasks belonging any cgroup that
                   has the sched_boost_enabled flag turned on. Little
                   CPUs will only be used when big CPUs can no longer
                   accommodate tasks. Also up-migrate all RT tasks.

2) CONSERVATIVE : Override the sched_boost_enabled flag for all cgroups
                  except those that have the sched_boost_no_override
                  flag set. Force up-migrate all tasks belonging to only
                  those cgroups that still remain eligible for boost.
                  RT tasks do not get force up migrated.

3) RESTRAINED : Start frequency aggregation for co-located tasks. This
                type of boost does not force up-migrate any task.

Finally the boost API removes ref-counting. This means that there can
only be a single entity using boost at any given time. If multiple
entities are managing boost, they are required to be well behaved so
that they don't interfere with one another. Even for a single client,
it is not possible to switch directly from one boost type to another.
Boost must be first turned off before switching over to a new type.

Change-Id: I8d224a70cbef162f27078b62b73acaa22670861d
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
7 years agosched: revise boost logic when boost_type is SCHED_BOOST_ON_BIG
Joonwoo Park [Fri, 23 Sep 2016 19:21:55 +0000 (12:21 -0700)]
sched: revise boost logic when boost_type is SCHED_BOOST_ON_BIG

At present HMP scheduler boost tends to pack tasks by taking into
account of power cost and cstate.  This is suboptimal to performance
as it can lead preemption and higher latency.

Revise logic to prefer the least loaded CPU among the big cluster CPUs
when boost type is SCHED_BOOST_ON_BIG.  New logic still honor the
behaviour that scheduler can place tasks on the little CPUs when the
big CPUs are all overcommitted.

Also, it's found that need_idle with boost can easily return previous
CPU when there is no idle CPU found.  Fix this issue by making
need_idle flag to take precedence over sched_boost.

CRs-fixed: 1074879
Change-Id: I470bcd0588e038b4a540d337fe6a412f2fa74920
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
7 years agosched: Remove thread group iteration from colocation
Syed Rameez Mustafa [Thu, 10 Nov 2016 01:22:23 +0000 (17:22 -0800)]
sched: Remove thread group iteration from colocation

Iterating a leader task's thread group in order to add them to a
colocation group involves a complex locking chain that ends up
causing a deadlock. The deadlock is as follows when the same task
is being referenced on three different CPUs:

-----                     ------                      -----
CPU 0                     CPU 1                       CPU 2
-----                     ------                      -----
                          add_task_to_group(p)

__schedule(prev = p)      write_lock(                 ttwu(p)
                          related_thread_grp_lock)
                                                      lock(pi_lock)

idle_balance()                                        wait for
                                                      p->on_cpu
load_balance()            unable to acquire
                          p->pi_lock
send_notification()

wait for read_lock(
related_thread_grp_lock)

unable to set p->on_cpu

There are a couple of ways to resolve this deadlock in the kernel,
however, they are not trivial. For the sake of simplicity, move
the responsibility of thread group iteration back to userspace. This
would apply to both adding and removing the leader task from a
colocation group. The kernel would continue to automatically add
newly forked children of the colocated leader to the colocation
group.

This still leaves an issue with the locking order of the pi_lock and
the related_thread_group_lock. To solve all deadlocks, we need to avoid
taking the pi_lock in reset_all_task_stats() and instead rely on a more
heavy handed approach of taking all rq locks. The pi_lock was taken to
avoid a race between reset_all_task_stats() and sched_exit(). The race
can be avoided with rq locks as well.

Change-Id: I15323e3ef91401142d3841db59c18fd8fee753fd
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
7 years agomsm: ipa3: linearize large skbs
Skylar Chang [Tue, 8 Nov 2016 17:56:24 +0000 (09:56 -0800)]
msm: ipa3: linearize large skbs

IPA can support scatter-gather of skbs up to the size of the TLV fifo.
In case the skb has to many frags, IPA driver will linearize it.

Change-Id: I2f994ae0250ffc8f740ea633324815ae429c74be
CRs-Fixed: 1088658
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
7 years agoUSB: Allow skipping device resume during system resume
Hemant Kumar [Wed, 16 Nov 2016 03:10:42 +0000 (19:10 -0800)]
USB: Allow skipping device resume during system resume

This allows xHC to remain in low power mode and not
resume the bus when system wide resume happens.
Controller comes out of low power mode only when usb
device issues a remote wakeup or if there is a host
initiated bus resume.

Change-Id: I96cdcb9e3642906b4afa08d9bde07e123d9b3977
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
7 years agoqseecom: improve error checks in qseecom_probe()
Zhen Kong [Mon, 24 Oct 2016 17:06:45 +0000 (10:06 -0700)]
qseecom: improve error checks in qseecom_probe()

Make change in qseecom_probe() to improve the error return value
checks on some subfunctions, and free memory allocated within
qseecom_retrieve_ce_data.

CRs-fixed: 1075082
Change-Id: I971e555ec8d02ccf4382e83132a696b065a8ff12
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
7 years agomsm: mdss: hide additional kernel addresses from unprivileged users
Harsh Sahu [Fri, 11 Nov 2016 22:10:52 +0000 (14:10 -0800)]
msm: mdss: hide additional kernel addresses from unprivileged users

Starting commit Ie49eee9478f4657cfb2a994ba60da1ec4c356339
("msm: mdss: hide kernel addresses from unprevileged users"),
display driver removes the %p and uses %pK instead for printing kernel
pointers. This change missed some of the prints in some places.
This change fixes this by modifying the remaining pointer prints.

CRs-Fixed: 987021
Change-Id: I0d1797a4df9ff67f3b162a1b5d26320ca989f54a
Signed-off-by: Harsh Sahu <hsahu@codeaurora.org>
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
7 years agoMerge "soc: qcom: secure_buffer: Fix an uninitialized variable"
Linux Build Service Account [Wed, 16 Nov 2016 07:39:32 +0000 (23:39 -0800)]
Merge "soc: qcom: secure_buffer: Fix an uninitialized variable"

7 years agoMerge "defconfig: msm: update mmap randomness for all targets"
Linux Build Service Account [Wed, 16 Nov 2016 07:39:31 +0000 (23:39 -0800)]
Merge "defconfig: msm: update mmap randomness for all targets"

7 years agoMerge "iommu/arm-smmu: Fix uninitialized use of variable error"
Linux Build Service Account [Wed, 16 Nov 2016 07:39:30 +0000 (23:39 -0800)]
Merge "iommu/arm-smmu: Fix uninitialized use of variable error"

7 years agoMerge "ARM: dts: msm: Enable the haptics in QRD SKUK and vr1"
Linux Build Service Account [Wed, 16 Nov 2016 07:39:29 +0000 (23:39 -0800)]
Merge "ARM: dts: msm:  Enable the haptics in QRD SKUK and vr1"

7 years agoMerge "ARM: dts: msm: enable RPM regulator device node for MSMFALCON"
Linux Build Service Account [Wed, 16 Nov 2016 07:39:29 +0000 (23:39 -0800)]
Merge "ARM: dts: msm: enable RPM regulator device node for MSMFALCON"

7 years agoARM: dts: msm: specify I2C configuration for msmfalcon
Mukesh Kumar Savaliya [Sun, 16 Oct 2016 11:45:24 +0000 (17:15 +0530)]
ARM: dts: msm: specify I2C configuration for msmfalcon

Initial support for all BLSP I2Cs with default configuration
and disabled state such that clients can overwrite and enable
respective I2C instance as per need.

Change-Id: If08ff46e72d537254e90707f28c849a86f262853
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
7 years agoARM: dts: msm: specify UART configuration on msmfalcon.
Mukesh Kumar Savaliya [Wed, 5 Oct 2016 07:24:20 +0000 (12:54 +0530)]
ARM: dts: msm: specify UART configuration on msmfalcon.

Initial support for all BLSP UARTs with default configuration
and disabled state such that clients can overwrite and enable
respective UART instance as per need.

Change-Id: I15ef73049cee76c6ea5b3916d9281bbd9fdfc563
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
7 years agomsm: sde: remove secure camera ctrl_id definition
Abhijit Kulkarni [Wed, 16 Nov 2016 04:23:13 +0000 (20:23 -0800)]
msm: sde: remove secure camera ctrl_id definition

Remove the secure_camera ctrl_id unless the support is available
from the sde rotator driver. If this id is defined and functionality
is not present in the V4L2 driver it causes the rotator use cases
to fail.

CRs-Fixed: 1090525
Change-Id: I48c50bc320425c0db40cd4865e05c6b7a7fb5da3
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
7 years agoclk: qcom: Add support to be able to slew PLL
Taniya Das [Fri, 7 Oct 2016 07:30:03 +0000 (13:00 +0530)]
clk: qcom: Add support to be able to slew PLL

Few alpha PLLs would require to be able to slew in the same VCO mode, which
means the PLL would be able to update the new frequency L value without
turning it off. But to be support this feature the PLL needs to calibrated
at the mid of the VCO range and then enabled.

Change-Id: I24820bd6254002f8a8db9604d230dcbce59b1beb
Signed-off-by: Taniya Das <tdas@codeaurora.org>
7 years agoclk: qcom: Add support for debugfs support
Taniya Das [Mon, 7 Nov 2016 04:31:38 +0000 (10:01 +0530)]
clk: qcom: Add support for debugfs support

Add the clock operation list_registers which would print the register
content of a clock. This is supported for PLL/RCG/Branch/Gate clocks.
Also add support for list_rate for the RCG clock which would list all the
frequencies/rates supported by the SW.

Change-Id: I3b4cf83e776750d993d53331142223109bf0862e
Signed-off-by: Taniya Das <tdas@codeaurora.org>
7 years agoclk: Add support to allow client to print all enabled clocks
Taniya Das [Mon, 7 Nov 2016 04:38:30 +0000 (10:08 +0530)]
clk: Add support to allow client to print all enabled clocks

The clock api clock_debug_print_enabled would allow any client like low
power driver to print all the enabled clocks which include the
prepare_count/enable_count/rate/rate max vote.

Change-Id: I936496e553bc958c10e743fd8a225ffc7fbc0f79
Signed-off-by: Taniya Das <tdas@codeaurora.org>
7 years agoclk: Add support for list_rates ops for clocks
Taniya Das [Mon, 14 Nov 2016 06:24:02 +0000 (11:54 +0530)]
clk: Add support for list_rates ops for clocks

Add support for clocks debugfs to be able to display
 - rates_max which indicates the frequency to voltage mapping of a clock.
 - list_rates, the list of clock frequencies supported by root clocks.
 - Also display the rate_max associated with enabled clocks list.

Change-Id: I0a202af6f46c7cf164036d65487db5c40aab4063
Signed-off-by: Taniya Das <tdas@codeaurora.org>
7 years agoclk: add/modify debugfs support for clocks
Taniya Das [Mon, 14 Nov 2016 05:56:02 +0000 (11:26 +0530)]
clk: add/modify debugfs support for clocks

Update clock debugfs to support the below functionalities.
 - Allow enable/disable a clock.
 - Allow set_rate on a clock.
 - Display the list of enabled_clocks along with prepare_count,
   enable_count and rate.
 - Display the register contents of all the clocks which support
  this clock operation.

Change-Id: Ib67b3a3409c9e7d8adb710bb524f54f543abf712
Signed-off-by: Taniya Das <tdas@codeaurora.org>
7 years agousb: pd: Stop processing SVDM if handler found
Jack Pham [Sat, 5 Nov 2016 16:03:00 +0000 (09:03 -0700)]
usb: pd: Stop processing SVDM if handler found

If a client matching the SVID for an incoming SVDM is found,
assume it has handled the message completely and simply return.
This avoids the case when it handles an Attention message by
queuing another VDM request, only to have it inadvertently
deleted in the generic handling below.

But we also lose tracking of Discover/Enter/Exit Mode
exchanges though that was only used for informational purposes.

Change-Id: Ie23d473302d7fbda9b243a150e5c52d025007e4f
Signed-off-by: Jack Pham <jackp@codeaurora.org>
7 years agotcp: take care of truncations done by sk_filter()
Eric Dumazet [Tue, 15 Nov 2016 20:26:28 +0000 (13:26 -0700)]
tcp: take care of truncations done by sk_filter()

With syzkaller help, Marco Grassi found a bug in TCP stack,
crashing in tcp_collapse()

Root cause is that sk_filter() can truncate the incoming skb,
but TCP stack was not really expecting this to happen.
It probably was expecting a simple DROP or ACCEPT behavior.

We first need to make sure no part of TCP header could be removed.
Then we need to adjust TCP_SKB_CB(skb)->end_seq

Many thanks to syzkaller team and Marco for giving us a reproducer.

CRs-Fixed: 1089895
Change-Id: I84185558fa6e80b13d7d0078bda9d75143680941
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Marco Grassi <marco.gra@gmail.com>
Reported-by: Vladis Dronov <vdronov@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-commit: ac6e780070e30e4c35bd395acfe9191e6268bdd3
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
[subashab@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
7 years agorose: limit sk_filter trim to payload
Willem de Bruijn [Tue, 15 Nov 2016 21:43:27 +0000 (14:43 -0700)]
rose: limit sk_filter trim to payload

Sockets can have a filter program attached that drops or trims
incoming packets based on the filter program return value.

Rose requires data packets to have at least ROSE_MIN_LEN bytes. It
verifies this on arrival in rose_route_frame and unconditionally pulls
the bytes in rose_recvmsg. The filter can trim packets to below this
value in-between, causing pull to fail, leaving the partial header at
the time of skb_copy_datagram_msg.

Place a lower bound on the size to which sk_filter may trim packets
by introducing sk_filter_trim_cap and call this for rose packets.

CRs-Fixed: 1089895
Change-Id: Idc52737bc96097a9220dfe47bb76e94ff1026a05
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-commit: f4979fcea7fd36d8e2f556abef86f80e0d5af1ba
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[subashab@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
7 years agodiag: Set the diag write buffers to busy state on channel close
Sreelakshmi Gownipalli [Fri, 11 Nov 2016 00:29:43 +0000 (16:29 -0800)]
diag: Set the diag write buffers to busy state on channel close

Set the diag forward write buffers to busy state when glink
diag channel receives remote disconnected event.

Change-Id: I3c9422f3a790c0c1633ab64d4213a088faaeb9e5
Signed-off-by: Sreelakshmi Gownipalli <sgownipa@codeaurora.org>
7 years agoARM: dts: msm: ensure contiguous MSI for PCIe on msmcobalt
Tony Truong [Fri, 11 Nov 2016 01:21:13 +0000 (17:21 -0800)]
ARM: dts: msm: ensure contiguous MSI for PCIe on msmcobalt

PCIe MSI have to be contiguous by spec. Relocated
PCIe node so that it receives contiguous MSIs from
GIC driver.

Change-Id: Ia73ab1ba51df7b501d246bb45141018409496d01
Signed-off-by: Tony Truong <truong@codeaurora.org>
7 years agoARM: dts: msm: enable QGIC MSI for PCIe on msmcobalt
Tony Truong [Tue, 4 Oct 2016 20:37:25 +0000 (13:37 -0700)]
ARM: dts: msm: enable QGIC MSI for PCIe on msmcobalt

Add all SPIs for MSI, the base address, and the base SPI
to PCIe node to support and enable QGIC MSI on msmcobalt.

Change-Id: I1e74f1b03c3e15880efdac7ff07aca2f628de99d
Signed-off-by: Tony Truong <truong@codeaurora.org>
7 years agoARM: dts: msm: Add ufs regulators for msmfalcon interposer
Asutosh Das [Mon, 14 Nov 2016 09:26:43 +0000 (14:56 +0530)]
ARM: dts: msm: Add ufs regulators for msmfalcon interposer

Add device tree support for msmcobalt interposer platform
for regulators of UFS.

Change-Id: I78d2c27743d30b90a96e3d8df60859f67db7ddb8
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
7 years agoMerge "msm: ipa3: retry on IPA_HW_CONS_DISABLE_CMD_GSI_STOP_FAILURE"
Linux Build Service Account [Tue, 15 Nov 2016 12:07:58 +0000 (04:07 -0800)]
Merge "msm: ipa3: retry on IPA_HW_CONS_DISABLE_CMD_GSI_STOP_FAILURE"

7 years agoMerge "pinctrl: qcom: msmfalcon: Split function groups based on mirrors"
Linux Build Service Account [Tue, 15 Nov 2016 12:07:57 +0000 (04:07 -0800)]
Merge "pinctrl: qcom: msmfalcon: Split function groups based on mirrors"

7 years agoMerge "pinctrl: qcom: Add all the gpios to pingroups for msmfalcon"
Linux Build Service Account [Tue, 15 Nov 2016 12:07:56 +0000 (04:07 -0800)]
Merge "pinctrl: qcom: Add all the gpios to pingroups for msmfalcon"

7 years agoMerge "msm: pcie: support configurable wr halt size for PCIe"
Linux Build Service Account [Tue, 15 Nov 2016 12:07:55 +0000 (04:07 -0800)]
Merge "msm: pcie: support configurable wr halt size for PCIe"

7 years agoMerge "iio: adc: qcom-tadc: cast raw ADC readings before conversion"
Linux Build Service Account [Tue, 15 Nov 2016 12:07:54 +0000 (04:07 -0800)]
Merge "iio: adc: qcom-tadc: cast raw ADC readings before conversion"

7 years agoMerge "ARM: dts: msm: update TADC ibatt scale for MSMCOBALT"
Linux Build Service Account [Tue, 15 Nov 2016 12:07:54 +0000 (04:07 -0800)]
Merge "ARM: dts: msm: update TADC ibatt scale for MSMCOBALT"

7 years agoMerge "usb: gadget: f_mtp: Increase default TX buffer size"
Linux Build Service Account [Tue, 15 Nov 2016 12:07:53 +0000 (04:07 -0800)]
Merge "usb: gadget: f_mtp: Increase default TX buffer size"

7 years agoMerge "qcom-cpufreq: skip frequencies that round to same rate"
Linux Build Service Account [Tue, 15 Nov 2016 12:07:53 +0000 (04:07 -0800)]
Merge "qcom-cpufreq: skip frequencies that round to same rate"

7 years agoMerge "ARM: dts: msm: Remove min svs level for A540 in msmcobaltv2"
Linux Build Service Account [Tue, 15 Nov 2016 12:07:52 +0000 (04:07 -0800)]
Merge "ARM: dts: msm: Remove min svs level for A540 in msmcobaltv2"

7 years agoMerge "Revert "clk: msm: clock-gpu-cobalt: Update the graphics core clock frequency""
Linux Build Service Account [Tue, 15 Nov 2016 12:07:51 +0000 (04:07 -0800)]
Merge "Revert "clk: msm: clock-gpu-cobalt: Update the graphics core clock frequency""

7 years agoMerge "ARM: dts: msm: update APC0/APC1/GFX aging allowed revisions for msm8998v2"
Linux Build Service Account [Tue, 15 Nov 2016 12:07:50 +0000 (04:07 -0800)]
Merge "ARM: dts: msm: update APC0/APC1/GFX aging allowed revisions for msm8998v2"

7 years agoMerge "core_ctl: Export boost function"
Linux Build Service Account [Tue, 15 Nov 2016 12:07:49 +0000 (04:07 -0800)]
Merge "core_ctl: Export boost function"

7 years agoMerge "msm: pcie: support QGIC MSI for multiple clients"
Linux Build Service Account [Tue, 15 Nov 2016 12:07:48 +0000 (04:07 -0800)]
Merge "msm: pcie: support QGIC MSI for multiple clients"

7 years agoMerge "msm: mdss: Avoid accessing pipe out of the boundaries"
Linux Build Service Account [Tue, 15 Nov 2016 12:07:48 +0000 (04:07 -0800)]
Merge "msm: mdss: Avoid accessing pipe out of the boundaries"

7 years agoMerge "msm: mdss: fix logic to enable secure display/camera"
Linux Build Service Account [Tue, 15 Nov 2016 12:07:47 +0000 (04:07 -0800)]
Merge "msm: mdss: fix logic to enable secure display/camera"

7 years agoMerge "qpnp-fg-gen3: add support to show time to full and empty"
Linux Build Service Account [Tue, 15 Nov 2016 12:07:45 +0000 (04:07 -0800)]
Merge "qpnp-fg-gen3: add support to show time to full and empty"

7 years agoMerge "iommu/arm-smmu: support mapping before enabling S1 translations"
Linux Build Service Account [Tue, 15 Nov 2016 12:07:45 +0000 (04:07 -0800)]
Merge "iommu/arm-smmu: support mapping before enabling S1 translations"

7 years agoMerge "nf: IDLETIMER: Fix use after free condition during work"
Linux Build Service Account [Tue, 15 Nov 2016 12:07:44 +0000 (04:07 -0800)]
Merge "nf: IDLETIMER: Fix use after free condition during work"

7 years agoMerge "net: rmnet_data: Handle buffer bloat for TCP scenarios"
Linux Build Service Account [Tue, 15 Nov 2016 12:07:43 +0000 (04:07 -0800)]
Merge "net: rmnet_data: Handle buffer bloat for TCP scenarios"

7 years agoMerge "msm: vidc: Allow clients to suggest I-frame sizes"
Linux Build Service Account [Tue, 15 Nov 2016 12:07:43 +0000 (04:07 -0800)]
Merge "msm: vidc: Allow clients to suggest I-frame sizes"

7 years agoMerge "msm: vidc: Allocate raw packet memory one time"
Linux Build Service Account [Tue, 15 Nov 2016 12:07:42 +0000 (04:07 -0800)]
Merge "msm: vidc: Allocate raw packet memory one time"