Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Twrp - #16

Merged
128 commits merged into
twrpfrom
lineage-15.1
Jul 1, 2018
Merged

Twrp#16
128 commits merged into
twrpfrom
lineage-15.1

Conversation

@ghost

@ghost ghost commented Jul 1, 2018

Copy link
Copy Markdown

No description provided.

Vinayak Menon and others added 30 commits March 31, 2018 15:03
Make sure there are no stale tlb entries when
dma_unremap returns, thus preventing speculative
fetches.

Change-Id: I22070de282f25fe5ea20177e67a6d629123e29a4
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Ramesh Gupta Guntha <rgguntha@codeaurora.org>
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
After commit da60ce9 (cpufreq: call cpufreq_driver->get() after
calling ->init()) __cpufreq_add_dev() sometimes fails for CPUs handled
by intel_pstate, because that driver may return 0 from its ->get()
callback if it has not run long enough to collect enough samples on the
given CPU.  That didn't happen before commit da60ce9 which added
policy->cur initialization to __cpufreq_add_dev() to help reduce code
duplication in other cpufreq drivers.

However, the code added by commit da60ce9 need not be executed
for cpufreq drivers having the ->setpolicy callback defined, because
the subsequent invocation of cpufreq_set_policy() will use that
callback to initialize the policy anyway and it doesn't need
policy->cur to be initialized upfront.  The analogous code in
cpufreq_update_policy() is also unnecessary for cpufreq drivers
having ->setpolicy set and may be skipped for them as well.

Since intel_pstate provides ->setpolicy, skipping the upfront
policy->cur initialization for cpufreq drivers with that callback
set will cover intel_pstate and the problem it's been having after
commit da60ce9 will be addressed.

Fixes: da60ce9 (cpufreq: call cpufreq_driver->get() after calling ->init())
Change-Id: Ie51ddf53138e489fd057044fc8c11bea5a6ea915
References: https://bugzilla.kernel.org/show_bug.cgi?id=71931
Reported-and-tested-by: Patrik Lundquist <patrik.lundquist@gmail.com>
Acked-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Cc: 3.13+ <stable@vger.kernel.org> # 3.13+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
Commit bd0fa9b introduced a failure path to cpufreq_update_policy() if
cpufreq_driver->get(cpu) returns NULL.  However, it jumps to the 'no_policy'
label, which exits without unlocking any of the locks the function acquired
earlier.  This causes later calls into cpufreq to hang.

Fix this by creating a new 'unlock' label and jumping to that instead.

Fixes: bd0fa9b ("cpufreq: Return error if ->get() failed in cpufreq_update_policy()")
Change-Id: I5c9f8e4776b3d4027eca68c8c514c296c1798882
Link: https://devtalk.nvidia.com/default/topic/751903/kernel-3-15-and-nv-drivers-337-340-failed-to-initialize-the-nvidia-kernel-module-gtx-550-ti-/
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Cc: 3.15+ <stable@vger.kernel.org> # 3.15+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
cpufreq_suspend is now a function in core CPUfreq framework. Rename
qcom-cpufreq's local per-cpu variable to suspend_data.

Change-Id: I2f567f0c04271d728d4e6a17b61cea2152c4d8f7
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
commit fc9e50f upstream.

The start callback allows the caller to set up a context for the
dump callbacks. Presumably, the context can then be destroyed in
the done callback.

Signed-off-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 142afbc)

Change-Id: Ibaaffde651e76be2defeaa081ae56ca9e8f93602
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
An independent security researcher, Mohamed Ghannam, has reported
this vulnerability to Beyond Security's SecuriTeam Secure Disclosure
program.

The xfrm_dump_policy_done function expects xfrm_dump_policy to
have been called at least once or it will crash.  This can be
triggered if a dump fails because the target socket's receive
buffer is full.

This patch fixes it by using the cb->start mechanism to ensure that
the initialisation is always done regardless of the buffer situation.

Change-Id: Id41cdd41c4e43e0c3ac30c5d03c15b8046d70845
Fixes: 12a169e ("ipsec: Put dumpers on the dump list")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
On systems that use mark-based routing it may be necessary for
routing lookups to use marks in order for packets to be routed
correctly. An example of such a system is Android, which uses
socket marks to route packets via different networks.

Currently, routing lookups in tunnel mode always use a mark of
zero, making routing incorrect on such systems.

This patch adds a new output_mark element to the xfrm state and
a corresponding XFRMA_OUTPUT_MARK netlink attribute. The output
mark differs from the existing xfrm mark in two ways:

1. The xfrm mark is used to match xfrm policies and states, while
   the xfrm output mark is used to set the mark (and influence
   the routing) of the packets emitted by those states.
2. The existing mark is constrained to be a subset of the bits of
   the originating socket or transformed packet, but the output
   mark is arbitrary and depends only on the state.

The use of a separate mark provides additional flexibility. For
example:

- A packet subject to two transforms (e.g., transport mode inside
  tunnel mode) can have two different output marks applied to it,
  one for the transport mode SA and one for the tunnel mode SA.
- On a system where socket marks determine routing, the packets
  emitted by an IPsec tunnel can be routed based on a mark that
  is determined by the tunnel, not by the marks of the
  unencrypted packets.
- Support for setting the output marks can be introduced without
  breaking any existing setups that employ both mark-based
  routing and xfrm tunnel mode. Simply changing the code to use
  the xfrm mark for routing output packets could xfrm mark could
  change behaviour in a way that breaks these setups.

If the output mark is unspecified or set to zero, the mark is not
set or changed.

[backport of upstream 077fbac]

Bug: 63589535
Test: https://android-review.googlesource.com/452776/ passes
Tested: make allyesconfig; make -j64
Tested: https://android-review.googlesource.com/452776
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Change-Id: I76120fba036e21780ced31ad390faf491ea81e52
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
commit 1137b5e upstream.

This is a fix for CVE-2017-16939 suitable for older stable branches.
The upstream fix is commit 1137b5e,
from which the following explanation is taken:

    An independent security researcher, Mohamed Ghannam, has reported
    this vulnerability to Beyond Security's SecuriTeam Secure Disclosure
    program.

    The xfrm_dump_policy_done function expects xfrm_dump_policy to
    have been called at least once or it will crash.  This can be
    triggered if a dump fails because the target socket's receive
    buffer is full.

It was not possible to define a 'start' callback for netlink dumps
until Linux 4.5, so instead add a check for the initialisation flag in
the 'done' callback.

Change-Id: Id8a129889b11800178c37374ff9fee5af68ccff9
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
We now use the lower filesystem's getattr for time and size related
information.

Change-Id: I3dd05614a0c2837a13eeb033444fbdf070ddce2a
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 72007585
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
This reverts commit fd825dd8ffd9c4873f80438c3030dd21c204512d.

Instead of calling notify within sdcardfs, which reverse the
order of notifications during an open with truncate, we'll
make fs_notify worry about it.

Change-Id: Ic634401c0f223500066300a4df8b1453a0b35b60
Bug: 70706497
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
If the filesystem being watched supports d_canonical_path,
notify the lower filesystem of the open as well.

Change-Id: I2b1739e068afbaf5eb39950516072bff8345ebfe
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 70706497
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
If the top is changed while we're attempting to use it, it's
possible that the reference will be put while we are in the
process of grabbing a reference.

Now we grab a spinlock to protect grabbing our reference count.

Additionally, we now set the inode_info's top value to point to
it's own data when initializing, which makes tracking changes
easier.

Change-Id: If15748c786ce4c0480ab8c5051a92523aff284d2
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
When we call i_size_write, we must be holding i_mutex to avoid
possible lockups on 32 bit/SMP architectures. This is not
necessary on 64 bit architectures.

Change-Id: Ic3b946507c54d81b5c9046f9b57d25d4b0f9feef
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 73287721
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
Without this patch when you delete an extension from configfs
it still exists in the hash table data structures and we are
unable to delete it or change it's group.
This happens because during deletion the key & value is taken from
extension_details, and was not properly set.

Fix it by this patch.

Change-Id: I7c20cb1ab4d99e6aceadcb5ef850f0bb47f18be8
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 73055997
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
This reverts commit d43fa69.

Change-Id: I315e206b228f828c1a2e0ff5c5c15260a39b4774
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
This reverts commit 91bca269f649061eb5a54510f466d06c3b5ca1fb.

Change-Id: Ib298dafdcfad95f6815c46bb80202267bd23d485
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
This reverts commit c688d2c.

Change-Id: I90508f23fcacfe9de6eb256affdd3ff839051b05
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
Change-Id: I2ab8557a9d10b88ef5d0bf0aa55e00b8fb67200a
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
Change-Id: I0833d298a6568cb490ac87561e884552cb1d0488
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
Change-Id: I29d8a2a3dc7adff734bdbbd0e9969323b86e461f
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
Change-Id: Ic43b0fcd869d12768b2b421d2e235cfbf32b7cba
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
Change-Id: I0c47844e47d0396e4f241d4472e904b1ee7dc1bc
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
Set freed pointers to NULL to avoid double free
in msm_compr_playback_open and msm_compr_playback_free
functions of the compress driver.

CRs-Fixed: 2142216
Bug: 68664502
Change-Id: Ifd011dd85dd9f610c7b69dd460f73d26e006cd66
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
Default IPA header is added or deleted from the driver
directly and not by user space application. This change
prevents adding/deleting it from user application which
may cause inconsistencies in the driver. Also the change
fixes the header reset function to skip on the correct
default header.

Bug: 72957269
Change-Id: Ic813433655411f1447db8b0c15efdf64038d8c26
CRs-fixed: 2151146
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
Add boundary checks for APR port received from ADSP.

CRs-Fixed: 2143207
Bug: 72956842
Change-Id: I9a7fa39ee223e1859323caa6eb74c1c8a26a041d
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
[ Upstream commit 8f659a0 ]

inet->hdrincl is racy, and could lead to uninitialized stack pointer
usage, so its value should be read only once.

Bug: 71500434
Change-Id: Ic02fa0f7b8f8525739996be2e0309ad2fa5b97dc
Fixes: c008ba5 ("ipv4: Avoid reading user iov twice after raw_probe_proto_opt")
Signed-off-by: Mohamed Ghannam <simo.ghannam@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jonathan Solnit <jsolnit@google.com>
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>

# Conflicts:
#	net/ipv4/raw.c
With the 'encrypted' key type it was possible for userspace to provide a
data blob ending with a master key description shorter than expected,
e.g. 'keyctl add encrypted desc "new x" @s'.  When validating such a
master key description, validate_master_desc() could read beyond the end
of the buffer.  Fix this by using strncmp() instead of memcmp().  [Also
clean up the code to deduplicate some logic.]

Cc: linux-stable <stable@vger.kernel.org> # 3.18.y
Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>
Bug: 70526974
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Jin Qian <jinqian@google.com>
Signed-off-by: Steve Pfetsch <spfetsch@google.com>
Change-Id: I2cc3af94f855e66f2014dd1dced4425ed8a41f29
(cherry picked from commit 794b4bc)
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
Andrey Konovalov reported a possible out-of-bounds problem for the
cdc_parse_cdc_header function.  He writes:
	It looks like cdc_parse_cdc_header() doesn't validate buflen
	before accessing buffer[1], buffer[2] and so on. The only check
	present is while (buflen > 0).

So fix this issue up by properly validating the buffer length matches
what the descriptor says it is.

(cherry picked from commit 2e1c423)

(The original patch fixed the generic cdc_parser_cdc_header function.
That generic function did not exist in 3.10 but there are a couple
cdc parsers that suffer from the same underlying problem.)

Bug: 69052594
Change-Id: Ib251469de39e51b0ed7c1a1b88873270afccd90f
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Marissa Wall <marissaw@google.com>
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
Define a policy for packet pattern attributes in order to fix a
potential read over the end of the buffer during nla_get_u32()
of the NL80211_WOWLAN_PKTPAT_OFFSET attribute.

Note that the data there can always be read due to SKB allocation
(with alignment and struct skb_shared_info at the end), but the
data might be uninitialized. This could be used to leak some data
from uninitialized vmalloc() memory, but most drivers don't allow
an offset (so you'd just get -EINVAL if the data is non-zero) or
just allow it with a fixed value - 100 or 128 bytes, so anything
above that would get -EINVAL. With brcmfmac the limit is 1500 so
(at least) one byte could be obtained.

Cc: stable@kernel.org
Bug: 64403015
Signed-off-by: Peng Xu <pxu@qti.qualcomm.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
[rewrite description based on SKB allocation knowledge]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Git-commit: ad67023
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
CRs-fixed: 2116387
Change-Id: Ia84ca10f85507fe3ddbbb518388ca7b453fd8453
[Backport: Fix conflicts]
Signed-off-by: Vidyullatha Kanchanapally <vidyullatha@codeaurora.org>
Signed-off-by: Peng Xu <pxu@codeaurora.org>
Signed-off-by: Srinivas Dasari <dasaris@codeaurora.org>
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
There is a race condition be observed
on global variable num_q6_rule used in
ipa wan-driver. The fix is to add lock
to prevent different threads are accessing
it at the same time.

Bug: 68992477
Change-Id: Ia9190c60361cb5605b61963309beca3acdeac89d
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
This reverts commit 149d879.

Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
This reverts commit 83cf0ca.

Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
This reverts commit a697915.

Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
This reverts commit 31ad612.

Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
…ckpatch.pl"

This reverts commit 5cef770.

Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
…sing features"

This reverts commit 7069726.

Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
This reverts commit 84c996b.

Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
This reverts commit d85c56f.

Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
Change-Id: Ia4c44765f1864e7ea4544a09f26628d1aec27a02
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
@ghost
ghost merged commit a1f8364 into twrp Jul 1, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.