New issue
Advanced search Search tips

Issue 612862 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Re-sync kernel 4.4 with latest Android 4.4 common changes

Project Member Reported by briannorris@chromium.org, May 18 2016

Issue description

There've been quite a few recent commits to android's tree that fix issues with their earlier code. Let's review and pull them in.
 
For patches android already labelled as 'UPSTREAM', should I just keep it as 'UPSTREAM:'? Or should it be 'ANDROID: UPSTREAM:'? (Similar for FROMLIST?)
A quick summary: I'm cherry-picking everything except these:

Conflicts:

7475611ceceb... UPSTREAM: dm verity: separate function for parsing opt args
3ec912f8ef37... UPSTREAM: dm verity: factor out structures and functions useful to separate object
890b7865c5f5... UPSTREAM: dm verity: factor out verity_for_bv_block()
83c1827e5887... UPSTREAM: dm verity: add support for forward error correction
f75998fe8443... UPSTREAM: dm verity: add ignore_zero_blocks feature
e7d40d2bf8b2... ANDROID: dm verity fec: add sysfs attribute fec/corrected

Conflicts because we already had them, and pushed them to android, where they changed slightly (?):
2ebb4d97e0c9... cpufreq: interactive: fix policy locking
440a57717bcc... cpufreq: interactive: only apply interactive boost when enabled

There were others that just fell away because we already had them. I didn't examine them closely.

Will upload soon.
One more thing: I'm syncing up to here, for posterity:

8f2aea82ca66 UPSTREAM: mac80211: fix "warning: ‘target_metric’ may be used uninitialized"

Comment 4 by groeck@chromium.org, May 18 2016

Should we revert the two cpufreq patches, then reapply the Android version ?
Any idea why the verity patches create conflicts ?

I don't desire to revert the cpufreq patches. They are necessary for real work right now. And I'm rebasing (not merging) anyway, as suggested by Olof, so there's no need IMO.

We patches the verity stuff significantly to work with our noinitrd environment, using our old (?) kernel parameter style. I think if we made the effort to switch over to the now-upstream stuff, we could drop some of our patches.

How about this: I'll drop these two related dm-verity commits as well (they're not very useful on their own), and you can feel free to examine the whole package yourself:

6558fe3cbe58 UPSTREAM: dm verity: move dm-verity.c to dm-verity-target.c
ab14138e109c UPSTREAM: dm verity: clean up duplicate hashing code
https://chromium-review.googlesource.com/345684 ANDROID: FROMLIST: drivers: char: random: add get_random_long()
https://chromium-review.googlesource.com/345685 ANDROID: FROMLIST: mm: ASLR: use get_random_long()
https://chromium-review.googlesource.com/345686 ANDROID: FROMLIST: mmc: block: fix ABI regression of mmc_blk_ioctl
https://chromium-review.googlesource.com/345687 ANDROID: CHROMIUM: usb: gadget: f_mtp: Add SuperSpeed support
https://chromium-review.googlesource.com/345688 ANDROID: CHROMIUM: usb: gadget: f_mtp: fix usb_ss_ep_comp_descriptor
https://chromium-review.googlesource.com/345689 ANDROID: CHROMIUM: usb: gadget: audio_source: add .free_func callback
https://chromium-review.googlesource.com/345850 ANDROID: CHROMIUM: usb: gadget: f_accessory: add .raw_request callback
https://chromium-review.googlesource.com/345851 ANDROID: usb: gadget: Add support for MTP OS desc
https://chromium-review.googlesource.com/345852 ANDROID: Included sdcardfs source code for kernel 3.0
https://chromium-review.googlesource.com/345853 ANDROID: Port of sdcardfs to 4.4
https://chromium-review.googlesource.com/345854 ANDROID: Changed type-casting in packagelist management
https://chromium-review.googlesource.com/345855 ANDROID: sdcardfs: Bring up to date with Android M permissions:
https://chromium-review.googlesource.com/345856 ANDROID: vfs: add d_canonical_path for stacked filesystem support
https://chromium-review.googlesource.com/345857 ANDROID: sdcardfs: Add support for d_canonical_path
https://chromium-review.googlesource.com/345858 ANDROID: trace: cpufreq: fix typo in min/max cpufreq
https://chromium-review.googlesource.com/345859 ANDROID: fs: sdcardfs: Declare LOOKUP_CASE_INSENSITIVE unconditionally
https://chromium-review.googlesource.com/345860 ANDROID: inotify: Fix erroneous update of bit count 
https://chromium-review.googlesource.com/345861 ANDROID: sdcardfs: remove effectless config option
https://chromium-review.googlesource.com/345862 ANDROID: fs: Export d_absolute_path
https://chromium-review.googlesource.com/345863 ANDROID: sdcardfs: Remove unused code
https://chromium-review.googlesource.com/345864 ANDROID: sdcardfs: remove unneeded __init and __exit
https://chromium-review.googlesource.com/345865 ANDROID: mm: Export do_munmap 
https://chromium-review.googlesource.com/345866 ANDROID: UPSTREAM: dm: don't save and restore bi_private
https://chromium-review.googlesource.com/345867 ANDROID: android: base-cfg: enable CONFIG_DM_VERITY_FEC
https://chromium-review.googlesource.com/345868 ANDROID: android: base-cfg: Add CONFIG_INET_DIAG_DESTROY
https://chromium-review.googlesource.com/345869 ANDROID: mmc: Add CONFIG_MMC_SIMULATE_MAX_SPEED
https://chromium-review.googlesource.com/345870 ANDROID: android: base-cfg: enable CONFIG_QUOTA
https://chromium-review.googlesource.com/345871 ANDROID: BACKPORT: selinux: restrict kernel module loading
https://chromium-review.googlesource.com/345872 ANDROID: base-cfg: enable CONFIG_IP_NF_NAT
https://chromium-review.googlesource.com/345873 ANDROID: Revert "drivers: switch: remove S_IWUSR from dev_attr" 
https://chromium-review.googlesource.com/345874 ANDROID: Revert "switch: switch class and GPIO drivers." 
https://chromium-review.googlesource.com/345875 ANDROID: android: base-cfg: remove CONFIG_SWITCH
https://chromium-review.googlesource.com/345876 ANDROID: Revert "tcp: Fix IPV6 module build errors"
https://chromium-review.googlesource.com/345877 ANDROID: Revert "Don't kill IPv4 sockets when killing IPv6 sockets was ...
https://chromium-review.googlesource.com/345878 ANDROID: Revert "net: fix crash in tcp_nuke_addr()"
https://chromium-review.googlesource.com/345879 ANDROID: Revert "net: fix iterating over hashtable in tcp_nuke_addr()"
https://chromium-review.googlesource.com/345880 ANDROID: Revert "net: socket ioctl to reset connections matching local address"
https://chromium-review.googlesource.com/345881 ANDROID: Revert "misc: uid_stat: Include linux/atomic.h instead of asm/atomic.h"
https://chromium-review.googlesource.com/345882 ANDROID: Revert "misc seq_printf fixes for 4.4"
https://chromium-review.googlesource.com/345883 ANDROID: Revert "misc: uidstat: Remove use of obsolete create_proc_read_entry...
https://chromium-review.googlesource.com/345884 ANDROID: Revert "misc: uidstat: avoid create_stat() race and blockage."
https://chromium-review.googlesource.com/345885 ANDROID: Revert "net: activity_stats: Stop using obsolete create_proc_read_en...
https://chromium-review.googlesource.com/345886 ANDROID: Revert "net: activity_stats: Add statistics for network transmission...
https://chromium-review.googlesource.com/345887 ANDROID: Revert "misc: uidstat: Adding uid stat driver to collect network ...
https://chromium-review.googlesource.com/345888 ANDROID: netfilter: xt_qtaguid: seq_printf fixes
https://chromium-review.googlesource.com/345889 ANDROID: android: recommended.cfg: remove CONFIG_UID_STAT
https://chromium-review.googlesource.com/345890 ANDROID: vfs: change d_canonical_path to take two paths 
https://chromium-review.googlesource.com/345891 ANDROID: fuse: Add support for d_canonical_path
https://chromium-review.googlesource.com/345892 ANDROID: Revert "SELinux: build fix for 4.1"
https://chromium-review.googlesource.com/345893 ANDROID: Revert "SELinux: Enable setting security contexts on rootfs inodes."
https://chromium-review.googlesource.com/345894 Revert "CHROMIUM: kernel panic when reading /sys/kernel/debug/shrinker"
https://chromium-review.googlesource.com/345895 ANDROID: Revert "mm: vmscan: Add a debug file for shrinkers"
https://chromium-review.googlesource.com/345896 ANDROID: xt_qtaguid: Fix panic caused by synack processing
https://chromium-review.googlesource.com/345897 ANDROID: Revert "HID: steelseries: validate output report details"
https://chromium-review.googlesource.com/345898 ANDROID: Revert "hid-multitouch: Filter collections by application usage."
https://chromium-review.googlesource.com/345899 ANDROID: quick selinux support for tracefs
https://chromium-review.googlesource.com/345900 ANDROID: Revert "mmc: Add status IRQ and status callback function to mmc ...
https://chromium-review.googlesource.com/345901 ANDROID: usb: dual-role: make stub functions inline
https://chromium-review.googlesource.com/345902 ANDROID: Revert "ARM: Add 'card_present' state to mmc_platfrom_data"
https://chromium-review.googlesource.com/345903 ANDROID: Revert "Recreate asm/mach/mmc.h include file"
https://chromium-review.googlesource.com/345904 ANDROID: fiq_debugger: Add option to apply uart overlay by FIQ_DEBUGGER_UART_...
https://chromium-review.googlesource.com/345905 ANDROID: Revert "drivers: power: Add watchdog timer to catch drivers which ... 
https://chromium-review.googlesource.com/345906 ANDROID: FROMLIST: wlcore: Disable filtering in AP role
https://chromium-review.googlesource.com/345907 ANDROID: UPSTREAM: procfs: fixes pthread cross-thread naming if !PR_DUMPABLE
https://chromium-review.googlesource.com/345908 ANDROID: fiq_debugger: Add fiq_debugger.disable option
https://chromium-review.googlesource.com/345909 ANDROID: xt_qtaguid: Fix panic caused by processing non-full socket.
https://chromium-review.googlesource.com/345910 ANDROID: Revert "drivers: power: use 'current' instead of 'get_current()'"
https://chromium-review.googlesource.com/345911 ANDROID: UPSTREAM: mac80211: fix "warning: ‘target_metric’ may be used ...

Comment 7 by groeck@chromium.org, May 18 2016

I can not really comment much on the verity patches. Whatever makes sense.

For the cpufreq patches, I suggested to revert our version and apply the Android version to ensure that the code is in sync, and to simplify subsequent rebases/syncs/merges. If that is not a concern, I have no problems.

The version we applied was already picked from Android. I don't know what you're talking about.

Comment 9 by groeck@chromium.org, May 18 2016

Conflicts because we already had them, and pushed them to android, where they changed slightly (?):
2ebb4d97e0c9... cpufreq: interactive: fix policy locking
440a57717bcc... cpufreq: interactive: only apply interactive boost when enabled

Ah, I thought you were talking about the bugfixes (reverts) that we recently landed.

Feel free to look at syncing cpufreq-interactive yourself.
One more, to normalize the configs:

https://chromium-review.googlesource.com/345577
Cc: snanda@chromium.org
+ Sameer

Anyone want to volunteer themselves or others to review these ANDROID cherry-picks? Guenter has done some already. I don't know if we want to track down real reviewers for everything, or if it's OK if I just do a cursory review of them myself.
Can you send me a pointer to a branch with all patches ?

The last one I noted contains all of the patches:

https://chromium-review.googlesource.com/#/c/345577/

So if you go to that Gerrit page, the Download drop-down will give you instructinos for 'git pull'-ing the whole thing. i.e.:

git pull https://chromium.googlesource.com/chromiumos/third_party/kernel refs/changes/77/345577/1
Ousted as gerrit novice again ;-).

I don't think it makes sense to individually review the entire series. I'll pull it later today and give it a test run through my builder. I'll also glance through it to see if there is anything obvious. If the test passes, and if nothing catches my eye, I'll mark the patches as reviewed.

I pulled the patches and ran a build on my test system. No problems discovered. I glanced through the patches, depending on the patch with more or less detail. I did not find anything catching my eyes, so I marked all patches in the series as reviewed+2. Let me know if I missed anything.

Comment 17 by olofj@chromium.org, May 27 2016

Cc: -olofj@chromium.org
Project Member

Comment 18 by bugdroid1@chromium.org, May 27 2016

Labels: merge-merged-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/55c6f88cc1621fb41239c590d5e5348925ca9c44

commit 55c6f88cc1621fb41239c590d5e5348925ca9c44
Author: Amit Pundir <amit.pundir@linaro.org>
Date: Tue Apr 26 10:21:20 2016

ANDROID: Revert "SELinux: Enable setting security contexts on rootfs inodes."

This reverts commit 78d36d2111cd4ca722a602846f7db8f54a0b074c.

Drop this duplicate patch. This patch is already upstreamed in v4.4. Commits
5c73fceb8c70 (SELinux: Enable setting security contexts on rootfs inodes.),
12f348b9dcf6 (SELinux: rename SE_SBLABELSUPP to SBLABEL_MNT), and
b43e725d8d38 (SELinux: use a helper function to determine seclabel),
for reference.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 66daa5f5e2b9078a7cecf37e896385aeee520005)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I33a21e77e071476def37e31daf94a27c0eb89d22
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345893
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/55c6f88cc1621fb41239c590d5e5348925ca9c44/security/selinux/hooks.c

Project Member

Comment 19 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/5adcd34742e0e6186d4056195101744f4eebee76

commit 5adcd34742e0e6186d4056195101744f4eebee76
Author: Amit Pundir <amit.pundir@linaro.org>
Date: Tue Apr 26 10:21:06 2016

ANDROID: Revert "SELinux: build fix for 4.1"

This reverts commit 43e1b4f528e1654fadd1097f7cc5c50be6e45b77.

This patch is part of code which is already upstreamed in v4.4. Commits
5c73fceb8c70 (SELinux: Enable setting security contexts on rootfs inodes.),
12f348b9dcf6 (SELinux: rename SE_SBLABELSUPP to SBLABEL_MNT), and
b43e725d8d38 (SELinux: use a helper function to determine seclabel).
for reference.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 5a0725f49f3ab0ebada002e1d4b13943c3a35d18)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I8e9148664f38de03a631064fba45e365de79b0f5
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345892
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/5adcd34742e0e6186d4056195101744f4eebee76/security/selinux/hooks.c

Project Member

Comment 20 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/7060a01b39e42a741bb1c81826b1bf4b79e2d7e5

commit 7060a01b39e42a741bb1c81826b1bf4b79e2d7e5
Author: Daniel Rosenberg <drosen@google.com>
Date: Fri Apr 22 07:00:48 2016

ANDROID: fuse: Add support for d_canonical_path

Allows FUSE to report to inotify that it is acting
as a layered filesystem. The userspace component
returns a string representing the location of the
underlying file. If the string cannot be resolved
into a path, the top level path is returned instead.

bug: 23904372
Signed-off-by: Daniel Rosenberg <drosen@google.com>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 00ee836d89c5756b4e937eae58c9d0d1d7ffe560)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Iabdca0bbedfbff59e9c820c58636a68ef9683d9f
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345891
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/7060a01b39e42a741bb1c81826b1bf4b79e2d7e5/include/uapi/linux/fuse.h
[modify] https://crrev.com/7060a01b39e42a741bb1c81826b1bf4b79e2d7e5/fs/fuse/dev.c
[modify] https://crrev.com/7060a01b39e42a741bb1c81826b1bf4b79e2d7e5/fs/fuse/dir.c
[modify] https://crrev.com/7060a01b39e42a741bb1c81826b1bf4b79e2d7e5/fs/fuse/fuse_i.h

Project Member

Comment 21 by bugdroid1@chromium.org, May 27 2016

Labels: merge-merged-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/c18901ec10a08a67c8d027b95dd0666041179f73

commit c18901ec10a08a67c8d027b95dd0666041179f73
Author: Daniel Rosenberg <drosen@google.com>
Date: Fri Apr 22 07:00:14 2016

ANDROID: vfs: change d_canonical_path to take two paths

bug: 23904372
Signed-off-by: Daniel Rosenberg <drosen@google.com>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 4b7de8375299c9f0e330ce521a956bc35bf1d12c)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I4a686d64b6de37decf60019be1718e1d820193e6
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345890
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/c18901ec10a08a67c8d027b95dd0666041179f73/fs/sdcardfs/dentry.c
[modify] https://crrev.com/c18901ec10a08a67c8d027b95dd0666041179f73/fs/notify/inotify/inotify_user.c
[modify] https://crrev.com/c18901ec10a08a67c8d027b95dd0666041179f73/include/linux/dcache.h

Project Member

Comment 22 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/bca2abde883886383dd1eea02eba2bbffeac7871

commit bca2abde883886383dd1eea02eba2bbffeac7871
Author: Amit Pundir <amit.pundir@linaro.org>
Date: Mon Apr 25 18:25:44 2016

ANDROID: android: recommended.cfg: remove CONFIG_UID_STAT

Remove UID Stat driver.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 5e00c3098bbfbf22086e7ce350cc63ea913a1c15)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Ifc9d2c6fe27900f30e6407398f5b24222518bffc
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345889
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/bca2abde883886383dd1eea02eba2bbffeac7871/android/configs/android-recommended.cfg

Project Member

Comment 23 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/efd9a6be5b982e9b5d44434e2c100a1a26103137

commit efd9a6be5b982e9b5d44434e2c100a1a26103137
Author: Amit Pundir <amit.pundir@linaro.org>
Date: Thu Oct 01 05:14:36 2015

ANDROID: netfilter: xt_qtaguid: seq_printf fixes

Update seq_printf() usage in xt_qtaguid to align
with changes from mainline commit 6798a8caaf64
"fs/seq_file: convert int seq_vprint/seq_printf/etc...
returns to void".

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 7c79aca516a51401a66b28ca68bd370ed7e9db0b)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I16d2c7e3402aaf4fe586019abdce4078dc9525f2
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345888
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/efd9a6be5b982e9b5d44434e2c100a1a26103137/net/netfilter/xt_qtaguid.c

Project Member

Comment 26 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/b4aeb9390519076b1ba85099d3f7a2dc8481189a

commit b4aeb9390519076b1ba85099d3f7a2dc8481189a
Author: Amit Pundir <amit.pundir@linaro.org>
Date: Mon Apr 25 11:30:57 2016

ANDROID: Revert "net: activity_stats: Stop using obsolete create_proc_read_entry api"

This reverts commit 7c121720fa14889d59e933aad0a8b9ce948a39ae.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 5c0d8ae10ab777417eefc39cd5f84d64c6f34622)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Ibbae1f1dbd5057881b1fe3cd79ac6e96947aceef
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345885
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/b4aeb9390519076b1ba85099d3f7a2dc8481189a/net/activity_stats.c

Project Member

Comment 27 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/f3f31adc173023fe32330eb073fceffecc92ce9e

commit f3f31adc173023fe32330eb073fceffecc92ce9e
Author: Amit Pundir <amit.pundir@linaro.org>
Date: Mon Apr 25 11:30:43 2016

ANDROID: Revert "misc: uidstat: avoid create_stat() race and blockage."

This reverts commit f7a812174033fe620509e6e8ca7022abd924b1c4.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit cded5596a31db1b1e7fa914b4b47fb488dbd819c)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I109d58c4c8657557719ea69f23cb30243b56c922
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345884
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/f3f31adc173023fe32330eb073fceffecc92ce9e/drivers/misc/uid_stat.c

Project Member

Comment 28 by bugdroid1@chromium.org, May 27 2016

Labels: merge-merged-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/e695aa2c005cbbc77617ab6a68403182311c0e5f

commit e695aa2c005cbbc77617ab6a68403182311c0e5f
Author: Amit Pundir <amit.pundir@linaro.org>
Date: Mon Apr 25 11:30:31 2016

ANDROID: Revert "misc: uidstat: Remove use of obsolete create_proc_read_entry api"

This reverts commit fccab646d33381af63e4f4c0d4f309a1d2b4b0c3.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 1ada37dc073ab6e49fd71d2fdc2be2e4f87c56cd)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Ie091fce87b13bbe1edf7fbb5ce61068debcfd222
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345883
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/e695aa2c005cbbc77617ab6a68403182311c0e5f/drivers/misc/uid_stat.c

Project Member

Comment 29 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/32c1554d7bf40449279bba8e849f6b4cf7d57983

commit 32c1554d7bf40449279bba8e849f6b4cf7d57983
Author: Amit Pundir <amit.pundir@linaro.org>
Date: Mon Apr 25 11:30:08 2016

ANDROID: Revert "misc seq_printf fixes for 4.4"

This reverts commit 5c7566a29bff14166d952f2ea525d5231546f821.

This patch revert some changes in net/netfilter/xt_qtaguid.c as well.
I'll submit another patch to restore those changes.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit cdb6973ae15c5f62947ea7afc29fc1175ecb3172)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Ieba839248f5e6246efcb3122856c80ec9295f229
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345882
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/32c1554d7bf40449279bba8e849f6b4cf7d57983/drivers/misc/uid_stat.c
[modify] https://crrev.com/32c1554d7bf40449279bba8e849f6b4cf7d57983/net/activity_stats.c
[modify] https://crrev.com/32c1554d7bf40449279bba8e849f6b4cf7d57983/net/netfilter/xt_qtaguid.c

Project Member

Comment 30 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/f2b7da4af7421e7e7aa64504303731d5a840a3a8

commit f2b7da4af7421e7e7aa64504303731d5a840a3a8
Author: Amit Pundir <amit.pundir@linaro.org>
Date: Mon Apr 25 11:28:20 2016

ANDROID: Revert "misc: uid_stat: Include linux/atomic.h instead of asm/atomic.h"

This reverts commit 8d3a6c1538fb021448c4f6381f6191061f947ba1.

This series of patches revert AOSP UID_STAT and NET_ACTIVITY_STATS drivers.
I could not find any meaningful usage of these interfaces in AOSP master.

UID_STAT driver expose "/proc/uid_stat/*" interfaces but it is only
used in AOSP master as in what appears be an out of date bandwidth
test in frameworks/base and in somewhat recent battery utils test
in external/chromium-trace project.

NET_ACTIVITY_STATS driver expose "/proc/net/stat/activity" interface
but I can not track its usage anywhere in AOSP at all.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit a7eabf90aea68842b735193f0df703f659b45715)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I4143bc70c4e75dd438a4de97db6879f45466d58d
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345881
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/f2b7da4af7421e7e7aa64504303731d5a840a3a8/drivers/misc/uid_stat.c

Project Member

Comment 32 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/46940a6dca006a33ce5049ebfce52737de56a00e

commit 46940a6dca006a33ce5049ebfce52737de56a00e
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Thu Apr 21 22:44:25 2016

ANDROID: Revert "net: fix iterating over hashtable in tcp_nuke_addr()"

This reverts commit 4747299b2c8e8778927b3df0501023d76fe4f2d5.

(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 20de1c6bc4d1b4636314fd1a372533b45af809b5)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Ic2ab86dee0880fc35537b2f35ceb41b054478b9d
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345879
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/46940a6dca006a33ce5049ebfce52737de56a00e/net/ipv4/tcp.c

Project Member

Comment 33 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/a735958162ea2d5acecaab51a1d453a4e37e96e1

commit a735958162ea2d5acecaab51a1d453a4e37e96e1
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Thu Apr 21 22:44:11 2016

ANDROID: Revert "net: fix crash in tcp_nuke_addr()"

This reverts commit 08f7c4280cd5efe9e274240c42177f459431bac2.

(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 9826b2ec8383b14a82f9d1d545a8573986c16abe)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I3577e3e5511a934c1aec80793e45c7973d717d8b
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345878
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/a735958162ea2d5acecaab51a1d453a4e37e96e1/net/ipv4/tcp.c

Project Member

Comment 34 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/d50c334882911ac6e1dfd0b99c3793a6cfc18af5

commit d50c334882911ac6e1dfd0b99c3793a6cfc18af5
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Thu Apr 21 22:43:58 2016

ANDROID: Revert "Don't kill IPv4 sockets when killing IPv6 sockets was requested."

This reverts commit 8bf4413b4f54e24120b90ecbfee426beeddc3ff0.

(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 215856823c282d0339acdad8c7f154abc30d1027)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I99092100ae901adda02aae9cf0627fdfd0142bb5
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345877
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/d50c334882911ac6e1dfd0b99c3793a6cfc18af5/net/ipv4/tcp.c

Project Member

Comment 35 by bugdroid1@chromium.org, May 27 2016

Labels: merge-merged-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/1f6103e3b3505838b5a7ef471dd26c976d718b00

commit 1f6103e3b3505838b5a7ef471dd26c976d718b00
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Thu Apr 21 22:43:29 2016

ANDROID: Revert "tcp: Fix IPV6 module build errors"

This reverts commit 3823c8136f2170b3ac5e6a5f8b857746a786e845.

(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 24c4a0f75c51c1f42cc0125a024b7c262e664ff7)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I3778d429f902a82757529cf86aaf1e7a909f20ba
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345876
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/1f6103e3b3505838b5a7ef471dd26c976d718b00/net/ipv4/tcp.c

Project Member

Comment 36 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/bd9588bef3c94d488a135e303a1fe5ee876dc3ef

commit bd9588bef3c94d488a135e303a1fe5ee876dc3ef
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Tue Apr 19 19:44:42 2016

ANDROID: android: base-cfg: remove CONFIG_SWITCH

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit a9de5129787db0d135eab61359b820c783fb5676)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I3fd1aa7a54fe3a8d3ad5537cbc61386e52f41ea0
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345875
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/bd9588bef3c94d488a135e303a1fe5ee876dc3ef/android/configs/android-base.cfg

Project Member

Comment 37 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/29d4b1dbf96e0b8db5d12f1981d483c8f9051bc9

commit 29d4b1dbf96e0b8db5d12f1981d483c8f9051bc9
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Tue Apr 19 19:37:47 2016

ANDROID: Revert "switch: switch class and GPIO drivers."

Drivers should use extcon moving forward.
Documentation/extcon/porting-android-switch-class describes
how to port existing switch class drivers to extcon.

This reverts commit e4b8e66e0ae2e78e913d7b86f2507fdb0aa731b4.

(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 00c13787f8275d7ff3e232a0e06a3c26478811e0)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I5b622c7ab4c0cb9670f8903f259a99888f503c1a
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345874
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[delete] https://crrev.com/b7da7357ef0b602be7503d33a43ce45bacf35f00/drivers/switch/Makefile
[modify] https://crrev.com/29d4b1dbf96e0b8db5d12f1981d483c8f9051bc9/drivers/Kconfig
[delete] https://crrev.com/b7da7357ef0b602be7503d33a43ce45bacf35f00/drivers/switch/switch_class.c
[delete] https://crrev.com/b7da7357ef0b602be7503d33a43ce45bacf35f00/include/linux/switch.h
[delete] https://crrev.com/b7da7357ef0b602be7503d33a43ce45bacf35f00/drivers/switch/switch_gpio.c
[modify] https://crrev.com/29d4b1dbf96e0b8db5d12f1981d483c8f9051bc9/drivers/Makefile
[delete] https://crrev.com/b7da7357ef0b602be7503d33a43ce45bacf35f00/drivers/switch/Kconfig

Project Member

Comment 38 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/b7da7357ef0b602be7503d33a43ce45bacf35f00

commit b7da7357ef0b602be7503d33a43ce45bacf35f00
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Tue Apr 19 19:37:31 2016

ANDROID: Revert "drivers: switch: remove S_IWUSR from dev_attr"

This reverts commit dc66dee02dcd6ea774e3ed4ae32e88b0f3b4bee7.

(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit ea20f758a0f688b713920e1b6c455ab3f0983c9e)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I4e7ae4b5b3076e8b3266d7f42ac7723eb30251cd
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345873
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/b7da7357ef0b602be7503d33a43ce45bacf35f00/drivers/switch/switch_class.c

Project Member

Comment 39 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/768050c823019b47ea806611f93cff75be8e97ea

commit 768050c823019b47ea806611f93cff75be8e97ea
Author: Amit Pundir <amit.pundir@linaro.org>
Date: Mon Apr 11 19:49:24 2016

ANDROID: base-cfg: enable CONFIG_IP_NF_NAT

IP_NF_TARGET_{MASQUERADE,NETMAP,REDIRECT} configs,
already enabled in android-base.cfg for tethering,
are of no use if CONFIG_IP_NF_NAT is not enabled.

Don't rely on platform config for that and enable
CONFIG_IP_NF_NAT in android-base.cfg as well.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 9f6bbb427fc67e5caceec70741def34234078f97)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Ic72bcebbd925b142b09539466bf963188c83108a
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345872
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/768050c823019b47ea806611f93cff75be8e97ea/android/configs/android-base.cfg

Project Member

Comment 40 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/1e335a0e1c86684be24ca9b6b5c7a6fe007427f7

commit 1e335a0e1c86684be24ca9b6b5c7a6fe007427f7
Author: Jeff Vander Stoep <jeffv@google.com>
Date: Tue Apr 05 20:06:27 2016

ANDROID: BACKPORT: selinux: restrict kernel module loading

Backport notes:
Backport uses kernel_module_from_file not kernel_read_file hook.
kernel_read_file replaced kernel_module_from_file in the 4.6 kernel.
There are no inode_security_() helper functions (also introduced in
4.6) so the inode lookup is done using the file_inode() helper which
is standard for kernel version < 4.6.

(Cherry picked from commit 61d612ea731e57dc510472fb746b55cdc017f371)

Utilize existing kernel_read_file hook on kernel module load.
Add module_load permission to the system class.

Enforces restrictions on kernel module origin when calling the
finit_module syscall. The hook checks that source type has
permission module_load for the target type.
Example for finit_module:

allow foo bar_file:system module_load;

Similarly restrictions are enforced on kernel module loading when
calling the init_module syscall. The hook checks that source
type has permission module_load with itself as the target object
because the kernel module is sourced from the calling process.
Example for init_module:

allow foo foo:system module_load;

Bug: 27824855
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 00526cde6b4a4154e4ea528f8a0cea1017abbc1c)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I64bf3bd1ab2dc735321160642dc6bbfa996f8068
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345871
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/1e335a0e1c86684be24ca9b6b5c7a6fe007427f7/security/selinux/include/classmap.h
[modify] https://crrev.com/1e335a0e1c86684be24ca9b6b5c7a6fe007427f7/security/selinux/hooks.c

Project Member

Comment 41 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/bca52e0f0b68f265dde1d75fe7a98c62b8064ab6

commit bca52e0f0b68f265dde1d75fe7a98c62b8064ab6
Author: Rom Lemarchand <romlem@android.com>
Date: Thu Apr 07 14:19:34 2016

ANDROID: android: base-cfg: enable CONFIG_QUOTA

Bug: 28032718
(cherry picked from commit e1b53a388e9cfcf870520a6899a37456cf1ae2c6)
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit a354cef9805bef94bb6fb6bd7887447846fee737)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I7cb6b641f72085e69b90dca11d2ea68adcd02390
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345870
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/bca52e0f0b68f265dde1d75fe7a98c62b8064ab6/android/configs/android-base.cfg

Project Member

Comment 42 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/90a4bac388543fcd32089d04c18710b565c81ca0

commit 90a4bac388543fcd32089d04c18710b565c81ca0
Author: Mark Salyzyn <salyzyn@google.com>
Date: Thu Jan 28 19:12:25 2016

ANDROID: mmc: Add CONFIG_MMC_SIMULATE_MAX_SPEED

When CONFIG_MMC_SIMULATE_MAX_SPEED is enabled, Expose max_read_speed,
max_write_speed and cache_size default module parameters and sysfs
controls to simulate a slow eMMC device. Default values are 0 (off),
0 (off) and 4 MB respectively.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 26976972
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit d68354b3b7ef8b8a1d9cf0ba071123ed62fe567f)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I342bfbd8b85f9b790e3f0e1e4e51a900ae07e05d
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345869
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Mark Salyzyn <salyzyn@google.com>

[modify] https://crrev.com/90a4bac388543fcd32089d04c18710b565c81ca0/Documentation/block/00-INDEX
[modify] https://crrev.com/90a4bac388543fcd32089d04c18710b565c81ca0/drivers/mmc/card/queue.h
[modify] https://crrev.com/90a4bac388543fcd32089d04c18710b565c81ca0/drivers/mmc/card/Kconfig
[add] https://crrev.com/90a4bac388543fcd32089d04c18710b565c81ca0/Documentation/block/mmc-max-speed.txt
[modify] https://crrev.com/90a4bac388543fcd32089d04c18710b565c81ca0/drivers/mmc/card/block.c

Project Member

Comment 43 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/04525f53afec9508846ce4eac9978710502bb6b5

commit 04525f53afec9508846ce4eac9978710502bb6b5
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Thu Mar 31 20:21:09 2016

ANDROID: android: base-cfg: Add CONFIG_INET_DIAG_DESTROY

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 03fbd079bac71e15a414082cb5aee980ce2935be)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I67430b05eca8fd520d2795d3db60faf2ec0fab9e
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345868
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/04525f53afec9508846ce4eac9978710502bb6b5/android/configs/android-base.cfg

Project Member

Comment 44 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/b6b0add6177c4050c9c6a6d4b5597f3b0d8b4eed

commit b6b0add6177c4050c9c6a6d4b5597f3b0d8b4eed
Author: Sami Tolvanen <samitolvanen@google.com>
Date: Wed Dec 16 16:23:49 2015

ANDROID: android: base-cfg: enable CONFIG_DM_VERITY_FEC

Bug: 21893453
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
(cherry picked from commit 9408350ed80005174918ce5147490035b2cf451b)
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit fcd614efb6c4dd4c4f543feefa6be7f8e49dcc09)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Idd0dfe4e3e527df2eff2f0d734effc40dce294c7
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345867
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/b6b0add6177c4050c9c6a6d4b5597f3b0d8b4eed/android/configs/android-base.cfg

Project Member

Comment 45 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/33b8cdad9fa11676a9ec2b51aa63f64d267a6e6e

commit 33b8cdad9fa11676a9ec2b51aa63f64d267a6e6e
Author: Mikulas Patocka <mpatocka@redhat.com>
Date: Wed Nov 25 21:03:31 2015

ANDROID: UPSTREAM: dm: don't save and restore bi_private

Device mapper used the field bi_private to point to dm_target_io. However,
since kernel 3.15, the bi_private field is unused, and so the targets do
not need to save and restore this field.

This patch removes code that saves and restores bi_private from dm-cache,
dm-snapshot and dm-verity.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
(cherry picked from commit fe3265b180d6282648f03bc6ac3958c733df01c2)
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit a9c7ddcf0347675f8bc681830d21d27df2ed8cb1)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Ic72905ccb6d58ff94eafaa47ba54b2688d92d3d1
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345866
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/33b8cdad9fa11676a9ec2b51aa63f64d267a6e6e/drivers/md/dm-snap.c
[modify] https://crrev.com/33b8cdad9fa11676a9ec2b51aa63f64d267a6e6e/drivers/md/dm-verity.c
[modify] https://crrev.com/33b8cdad9fa11676a9ec2b51aa63f64d267a6e6e/drivers/md/dm-cache-target.c

Project Member

Comment 46 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/2f6842d57e02d3736a4a7d1b01b097682475dab8

commit 2f6842d57e02d3736a4a7d1b01b097682475dab8
Author: Guenter Roeck <groeck@chromium.org>
Date: Thu Mar 24 17:39:14 2016

ANDROID: mm: Export do_munmap

The 0-day build bot reports the following build error, seen if SDCARD_FS
is built as module.

ERROR: "do_munmap" undefined!

Fixes: 84a1b7d3d312 ("Included sdcardfs source code for kernel 3.0")
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Guenter Roeck <groeck@chromium.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit de679b3bbe8b810b01929b1f27665ede5eb54f37)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Ifab8f6da895e6c7acedcf3f698c5355021ba3157
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345865
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/2f6842d57e02d3736a4a7d1b01b097682475dab8/mm/mmap.c

Project Member

Comment 47 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/106d5a318089807db9d0a865b35ec65b777e2096

commit 106d5a318089807db9d0a865b35ec65b777e2096
Author: Daniel Rosenberg <drosen@google.com>
Date: Mon Mar 28 23:00:34 2016

ANDROID: sdcardfs: remove unneeded __init and __exit

(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 73fbdac21118062150d729c8a93e80c09f8a3521)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I2a2d45d52f891332174c3000e8681c5167c1564f
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345864
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/106d5a318089807db9d0a865b35ec65b777e2096/fs/sdcardfs/packagelist.c

Project Member

Comment 48 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/20331e9f4550f3bbf14c2982e41243fcd5d70541

commit 20331e9f4550f3bbf14c2982e41243fcd5d70541
Author: Daniel Rosenberg <drosen@google.com>
Date: Mon Mar 28 22:00:20 2016

ANDROID: sdcardfs: Remove unused code

(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit a5aa95121d126ce2bde0d53d47c5d6641c900948)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Ie97cba27ce44818ac56cfe40954f164ad44eccf6
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345863
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/20331e9f4550f3bbf14c2982e41243fcd5d70541/fs/sdcardfs/main.c

Project Member

Comment 49 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/4d0b1dddd1a463f4e10f1ca87c859d6cc97898fa

commit 4d0b1dddd1a463f4e10f1ca87c859d6cc97898fa
Author: Guenter Roeck <groeck@chromium.org>
Date: Thu Mar 24 17:32:35 2016

ANDROID: fs: Export d_absolute_path

The 0-day build bot reports the following build error, seen if SDCARD_FS
is built as module.

ERROR: "d_absolute_path" undefined!

Fixes: 84a1b7d3d312 ("Included sdcardfs source code for kernel 3.0")
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Guenter Roeck <groeck@chromium.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit cdaa7dcb05f7955e855fa816c21c3210088ca2b8)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I23236a22fe92a21c1f640ffa5dac29150e0c7766
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345862
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/4d0b1dddd1a463f4e10f1ca87c859d6cc97898fa/fs/dcache.c

Project Member

Comment 50 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/cb4f12e531a9408c45d2d3007347f38c3332a9fc

commit cb4f12e531a9408c45d2d3007347f38c3332a9fc
Author: Daniel Rosenberg <drosen@google.com>
Date: Wed Mar 23 23:39:30 2016

ANDROID: sdcardfs: remove effectless config option

CONFIG_SDCARD_FS_CI_SEARCH only guards a define for
LOOKUP_CASE_INSENSITIVE, which is never used in the
kernel. Remove both, along with the option matching
that supports it.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 7581abb2ceff034995e098de33282f4c7c8dd0c7)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I363a8f31de8ee7a7a934d75300cc9ba8176e2edf
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345861
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/cb4f12e531a9408c45d2d3007347f38c3332a9fc/fs/sdcardfs/Kconfig
[modify] https://crrev.com/cb4f12e531a9408c45d2d3007347f38c3332a9fc/include/linux/namei.h
[modify] https://crrev.com/cb4f12e531a9408c45d2d3007347f38c3332a9fc/fs/sdcardfs/main.c
[modify] https://crrev.com/cb4f12e531a9408c45d2d3007347f38c3332a9fc/fs/sdcardfs/lookup.c
[modify] https://crrev.com/cb4f12e531a9408c45d2d3007347f38c3332a9fc/fs/sdcardfs/sdcardfs.h

Project Member

Comment 51 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/1edc2a8fd89df49856d53beb8e5d2382010aed1f

commit 1edc2a8fd89df49856d53beb8e5d2382010aed1f
Author: Daniel Rosenberg <drosen@google.com>
Date: Wed Mar 23 19:09:25 2016

ANDROID: inotify: Fix erroneous update of bit count

Patch "vfs: add d_canonical_path for stacked filesystem support"
erroneously updated the ALL_INOTIFY_BITS count. This changes it back

(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 2dea38519013642e4cdba450151f8328a0763fad)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Idb04edc736da276159d30f04c40cff9d6b1e070f
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345860
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/1edc2a8fd89df49856d53beb8e5d2382010aed1f/fs/notify/inotify/inotify_user.c

Project Member

Comment 52 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/31433109089d74ff6362524fdbfadbc8f6541c1c

commit 31433109089d74ff6362524fdbfadbc8f6541c1c
Author: Guenter Roeck <groeck@chromium.org>
Date: Wed Mar 23 15:32:23 2016

ANDROID: fs: sdcardfs: Declare LOOKUP_CASE_INSENSITIVE unconditionally

Attempts to build sdcardfs as module fail with

fs/sdcardfs/lookup.c: In function '__sdcardfs_lookup':
fs/sdcardfs/lookup.c:243:5: error: 'LOOKUP_CASE_INSENSITIVE' undeclared

This occurs because the define is enclosed with #ifdef
CONFIG_SDCARD_FS_CI_SEARCH. If SDCARD_FS_CI_SEARCH is configured to be
built as module, this does not work. Alternatives would be to use #if
IS_ENABLED(CONFIG_SDCARD_FS_CI_SEARCH), or to declare SDCARD_FS_CI_SEARCH
as bool, but that does not work because the define is used unconditionally
in the source.

Note that LOOKUP_CASE_INSENSITIVE is only set but not evaluated in the
current source code, so setting the flag has no real effect.

Fixes: 84a1b7d3d312 ("Included sdcardfs source code for kernel 3.0")
Cc: Daniel Rosenberg <drosen@google.com>
Signed-off-by: Guenter Roeck <groeck@chromium.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 3f3b4c799d2c9c706d68c2db31b332e5a548cf53)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Ifc0c333064be34b29eaad7d612731dcbba70fb3d
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345859
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/31433109089d74ff6362524fdbfadbc8f6541c1c/include/linux/namei.h

Project Member

Comment 53 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/2dd273f96ddf31fd85abd29235e56e9b03ec0af4

commit 2dd273f96ddf31fd85abd29235e56e9b03ec0af4
Author: Thierry Strudel <tstrudel@google.com>
Date: Wed Mar 23 17:02:15 2016

ANDROID: trace: cpufreq: fix typo in min/max cpufreq

Signed-off-by: Thierry Strudel <tstrudel@google.com>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 87977cb3223256f62b18c31bc580715332ddce86)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Ieed402d3a912b7a318826e101efe2c24b07ebfe4
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345858
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/2dd273f96ddf31fd85abd29235e56e9b03ec0af4/include/trace/events/power.h

Project Member

Comment 54 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/4bf4acba0ac61359bf09dc33f1b5fea0df2a9e95

commit 4bf4acba0ac61359bf09dc33f1b5fea0df2a9e95
Author: Daniel Rosenberg <drosen@google.com>
Date: Fri Feb 12 00:53:36 2016

ANDROID: sdcardfs: Add support for d_canonical_path

Signed-off-by: Daniel Rosenberg <drosen@google.com>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit f06e869f936e548fd3fd78ddcbebe171f0defadb)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I5d6f0e71b8ca99aec4b0894412f1dfd1cfe12add
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345857
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/4bf4acba0ac61359bf09dc33f1b5fea0df2a9e95/fs/sdcardfs/dentry.c

Project Member

Comment 55 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/195bdd41c9faff4c8d5218df52e8d05dd2d1fdf4

commit 195bdd41c9faff4c8d5218df52e8d05dd2d1fdf4
Author: Daniel Rosenberg <drosen@google.com>
Date: Fri Feb 12 00:44:15 2016

ANDROID: vfs: add d_canonical_path for stacked filesystem support

Inotify does not currently know when a filesystem
is acting as a wrapper around another fs. This means
that inotify watchers will miss any modifications to
the base file, as well as any made in a separate
stacked fs that points to the same file.
d_canonical_path solves this problem by allowing the fs
to map a dentry to a path in the lower fs. Inotify
can use it to find the appropriate place to watch to
be informed of all changes to a file.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 530d9c5fc268b0c90ffbca40384f9ee657076724)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I09563baffad1711a045e45c1bd0bd8713c2cc0b6
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345856
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/195bdd41c9faff4c8d5218df52e8d05dd2d1fdf4/fs/notify/inotify/inotify_user.c
[modify] https://crrev.com/195bdd41c9faff4c8d5218df52e8d05dd2d1fdf4/include/linux/dcache.h

Project Member

Comment 56 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/cd826631b2d9a4205b0093ef67b2421b56a26552

commit cd826631b2d9a4205b0093ef67b2421b56a26552
Author: Daniel Rosenberg <drosen@google.com>
Date: Thu Feb 04 05:08:21 2016

ANDROID: sdcardfs: Bring up to date with Android M permissions:

In M, the workings of sdcardfs were changed significantly.
This brings sdcardfs into line with the changes.

(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 1e2d3bbcf3f5a603e62dfa0514a43e13ee679d4f)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I10e91a84a884c838feef7aa26c0a2b21f02e052e
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345855
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/cd826631b2d9a4205b0093ef67b2421b56a26552/fs/sdcardfs/Kconfig
[modify] https://crrev.com/cd826631b2d9a4205b0093ef67b2421b56a26552/fs/sdcardfs/packagelist.c
[modify] https://crrev.com/cd826631b2d9a4205b0093ef67b2421b56a26552/fs/sdcardfs/sdcardfs.h
[modify] https://crrev.com/cd826631b2d9a4205b0093ef67b2421b56a26552/fs/sdcardfs/file.c
[modify] https://crrev.com/cd826631b2d9a4205b0093ef67b2421b56a26552/fs/sdcardfs/lookup.c
[modify] https://crrev.com/cd826631b2d9a4205b0093ef67b2421b56a26552/fs/sdcardfs/super.c
[modify] https://crrev.com/cd826631b2d9a4205b0093ef67b2421b56a26552/fs/sdcardfs/main.c
[modify] https://crrev.com/cd826631b2d9a4205b0093ef67b2421b56a26552/fs/sdcardfs/derived_perm.c
[delete] https://crrev.com/c1b34188bea7661409b6b7bed40cda7848e9c6eb/fs/sdcardfs/strtok.h
[modify] https://crrev.com/cd826631b2d9a4205b0093ef67b2421b56a26552/fs/sdcardfs/inode.c

Project Member

Comment 57 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/c1b34188bea7661409b6b7bed40cda7848e9c6eb

commit c1b34188bea7661409b6b7bed40cda7848e9c6eb
Author: Daniel Campello <campello@google.com>
Date: Mon Jul 20 23:33:46 2015

ANDROID: Changed type-casting in packagelist management

Fixed existing type-casting in packagelist management code. All
warnings at compile time were taken care of.

Signed-off-by: Daniel Campello <campello@google.com>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit a1590fbeed5f259e5dc75f3b08f58eb5409815b2)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I1ea97786d1d1325f31b9f09ae966af1f896a2af5
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345854
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/c1b34188bea7661409b6b7bed40cda7848e9c6eb/fs/sdcardfs/packagelist.c

Project Member

Comment 58 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/565b487c7d4e0ae1d117d8839467eca487072259

commit 565b487c7d4e0ae1d117d8839467eca487072259
Author: Daniel Campello <campello@google.com>
Date: Mon Jul 20 23:27:37 2015

ANDROID: Port of sdcardfs to 4.4

Signed-off-by: Daniel Rosenberg <drosen@google.com>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit e76fbcd41aba68de594ec481a7d847982da81388)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I25b99ecf214e72ebf6a57ec3085972542a8d7951
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345853
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/565b487c7d4e0ae1d117d8839467eca487072259/fs/sdcardfs/dentry.c
[modify] https://crrev.com/565b487c7d4e0ae1d117d8839467eca487072259/fs/sdcardfs/Kconfig
[modify] https://crrev.com/565b487c7d4e0ae1d117d8839467eca487072259/fs/sdcardfs/packagelist.c
[modify] https://crrev.com/565b487c7d4e0ae1d117d8839467eca487072259/fs/sdcardfs/sdcardfs.h
[modify] https://crrev.com/565b487c7d4e0ae1d117d8839467eca487072259/fs/sdcardfs/file.c
[modify] https://crrev.com/565b487c7d4e0ae1d117d8839467eca487072259/include/linux/namei.h
[modify] https://crrev.com/565b487c7d4e0ae1d117d8839467eca487072259/fs/sdcardfs/lookup.c
[modify] https://crrev.com/565b487c7d4e0ae1d117d8839467eca487072259/fs/sdcardfs/mmap.c
[modify] https://crrev.com/565b487c7d4e0ae1d117d8839467eca487072259/fs/sdcardfs/super.c
[delete] https://crrev.com/67d947e977fec93cdaff9ee50b93579482df5b06/fs/sdcardfs/hashtable.h
[modify] https://crrev.com/565b487c7d4e0ae1d117d8839467eca487072259/fs/sdcardfs/inode.c
[modify] https://crrev.com/565b487c7d4e0ae1d117d8839467eca487072259/fs/sdcardfs/main.c

Project Member

Comment 59 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/67d947e977fec93cdaff9ee50b93579482df5b06

commit 67d947e977fec93cdaff9ee50b93579482df5b06
Author: Daniel Campello <campello@google.com>
Date: Mon Jul 20 23:23:50 2015

ANDROID: Included sdcardfs source code for kernel 3.0

Only included the source code as is for kernel 3.0. Following patches
take care of porting this file system to version 3.10.

Signed-off-by: Daniel Campello <campello@google.com>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 84a1b7d3d3121e86fac74ae570311556c10b9c31)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I09e76db77cd98a059053ba5b6fd88572a4b75b5b
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345852
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[add] https://crrev.com/67d947e977fec93cdaff9ee50b93579482df5b06/fs/sdcardfs/dentry.c
[add] https://crrev.com/67d947e977fec93cdaff9ee50b93579482df5b06/fs/sdcardfs/Kconfig
[modify] https://crrev.com/67d947e977fec93cdaff9ee50b93579482df5b06/fs/Makefile
[add] https://crrev.com/67d947e977fec93cdaff9ee50b93579482df5b06/fs/sdcardfs/multiuser.h
[add] https://crrev.com/67d947e977fec93cdaff9ee50b93579482df5b06/fs/sdcardfs/sdcardfs.h
[add] https://crrev.com/67d947e977fec93cdaff9ee50b93579482df5b06/fs/sdcardfs/file.c
[add] https://crrev.com/67d947e977fec93cdaff9ee50b93579482df5b06/fs/sdcardfs/Makefile
[modify] https://crrev.com/67d947e977fec93cdaff9ee50b93579482df5b06/include/linux/namei.h
[add] https://crrev.com/67d947e977fec93cdaff9ee50b93579482df5b06/fs/sdcardfs/hashtable.h
[add] https://crrev.com/67d947e977fec93cdaff9ee50b93579482df5b06/fs/sdcardfs/mmap.c
[add] https://crrev.com/67d947e977fec93cdaff9ee50b93579482df5b06/fs/sdcardfs/super.c
[add] https://crrev.com/67d947e977fec93cdaff9ee50b93579482df5b06/fs/sdcardfs/main.c
[modify] https://crrev.com/67d947e977fec93cdaff9ee50b93579482df5b06/include/uapi/linux/magic.h
[add] https://crrev.com/67d947e977fec93cdaff9ee50b93579482df5b06/fs/sdcardfs/packagelist.c
[add] https://crrev.com/67d947e977fec93cdaff9ee50b93579482df5b06/fs/sdcardfs/lookup.c
[add] https://crrev.com/67d947e977fec93cdaff9ee50b93579482df5b06/fs/sdcardfs/derived_perm.c
[add] https://crrev.com/67d947e977fec93cdaff9ee50b93579482df5b06/fs/sdcardfs/strtok.h
[add] https://crrev.com/67d947e977fec93cdaff9ee50b93579482df5b06/fs/sdcardfs/inode.c
[modify] https://crrev.com/67d947e977fec93cdaff9ee50b93579482df5b06/fs/Kconfig

Project Member

Comment 60 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/2e54c33a1f6db56e191a3e9f6778abbd3b4684e8

commit 2e54c33a1f6db56e191a3e9f6778abbd3b4684e8
Author: Badhri Jagan Sridharan <Badhri@google.com>
Date: Wed Oct 07 03:32:01 2015

ANDROID: usb: gadget: Add support for MTP OS desc

Windows requires OS specific descriptors for automatic
install of drivers for MTP devices.

https://msdn.microsoft.com/en-us/library/windows/
hardware/gg463179.aspx

BUG=24583401
BUG=chrome-os-partner:43409

Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Reviewed-on: https://chromium-review.googlesource.com/304346
Commit-Ready: Andrew Bresticker <abrestic@chromium.org>
Tested-by: Andrew Bresticker <abrestic@chromium.org>
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 80780775bfb28ca293e674157bb0278b94adc754)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I9397072ca3d183efbc9571c6cde3790f10d8851e
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345851
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/2e54c33a1f6db56e191a3e9f6778abbd3b4684e8/drivers/usb/gadget/function/f_mtp.c

Project Member

Comment 61 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/153851e354045fafb89b4c0373a4b355570cdf14

commit 153851e354045fafb89b4c0373a4b355570cdf14
Author: Mark Kuo <mkuo@nvidia.com>
Date: Mon Jan 11 11:07:12 2016

ANDROID: CHROMIUM: usb: gadget: f_accessory: add .raw_request callback

After this upstream commit: 3c86726cfe38952f0366f86acfbbb025813ec1c2,
.raw_request is mandatory in hid_ll_driver structure, hence add an empty
raw_request() function.

BUG=chrome-os-partner:49140
TEST=none

Signed-off-by: Mark Kuo <mkuo@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/321038
Commit-Ready: Andrew Bresticker <abrestic@chromium.org>
Tested-by: Andrew Bresticker <abrestic@chromium.org>
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit aa1d916a3b462b0dc797b506b0a257935c1cef3f)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Idd0bbe6960aad2c557376e4a24827d7e1df8e023
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345850
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/153851e354045fafb89b4c0373a4b355570cdf14/drivers/usb/gadget/function/f_accessory.c

Project Member

Comment 62 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/b2d20a351aa457ccacfbe4a66044121862984fa0

commit b2d20a351aa457ccacfbe4a66044121862984fa0
Author: Mark Kuo <mkuo@nvidia.com>
Date: Mon Jan 11 09:49:16 2016

ANDROID: CHROMIUM: usb: gadget: audio_source: add .free_func callback

When userspace unbinds gadget functions through configfs, the
.free_func() callback is always invoked. (in config_usb_cfg_unlink())
Implement it as a no-op to avoid the following crash:

[ 68.125679] configfs-gadget gadget: unbind function 'accessory'/ffffffc0720bf000
[ 68.133202] configfs-gadget gadget: unbind function 'audio_source'/ffffffc0012ca3c0
[ 68.142668] tegra-xudc 700d0000.usb-device: ep 0 disabled
[ 68.148186] Bad mode in Synchronous Abort handler detected, code 0x86000006
[ 68.155144] CPU: 2 PID: 1 Comm: init Tainted: G    U W 3.18.0-09419-g87296c3-dirty #561
[ 68.163743] Hardware name: Google Tegra210 Smaug Rev 1,3+ (DT)
[ 68.169566] task: ffffffc0bc8d0000 ti: ffffffc0bc8bc000 task.ti: ffffffc0bc8bc000
[ 68.177039] PC is at 0x0
[ 68.179577] LR is at usb_put_function+0x14/0x1c
....

BUG=chrome-os-partner:49140
TEST="setprop sys.usb.config accessory,audio_source" on A44 and then
switch back to default: "setprop sys.usb.config mtp,adb", no crash will
be seen.

Signed-off-by: Mark Kuo <mkuo@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/321013
Commit-Ready: Andrew Bresticker <abrestic@chromium.org>
Tested-by: Andrew Bresticker <abrestic@chromium.org>
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 555f387a43cad7e922254a2e06e3a670bb536957)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I5b6141964aab861e86e3afb139ded02d4d122dab
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345689
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/b2d20a351aa457ccacfbe4a66044121862984fa0/drivers/usb/gadget/function/f_audio_source.c

Project Member

Comment 63 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/39f46573c63b44741ac539d74327883a7a0236a0

commit 39f46573c63b44741ac539d74327883a7a0236a0
Author: Mark Kuo <mkuo@nvidia.com>
Date: Fri Sep 11 08:12:59 2015

ANDROID: CHROMIUM: usb: gadget: f_mtp: fix usb_ss_ep_comp_descriptor

wBytesPerInterval in SuperSpeed Endpoint Companion Descriptor needs
to be set large enough to reserve enough bus time for associated
periodic endpoint.

Originally, wBytesPerInterval for mtp's interrupt IN endpoint is set
to 2 and its single interrupt transfer will be split into many 2 bytes
interrupt transfers. So, we change wBytesPerInterval to INTR_BUFFER_SIZE
to ensure interrupt transfer will not be split.

BUG=none
TEST=Smaug works as a MTP device

Signed-off-by: Henry Lin <henryl@nvidia.com>
Signed-off-by: Mark Kuo <mkuo@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/299091
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 588dc2e55280d5601e65ade2826dd606a0bbff7a)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I49c0df892b2d9e0193a684eef23f73664ced9f91
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345688
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/39f46573c63b44741ac539d74327883a7a0236a0/drivers/usb/gadget/function/f_mtp.c

Project Member

Comment 64 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/3685229666c4860dc820c011fcfc3e088620f82d

commit 3685229666c4860dc820c011fcfc3e088620f82d
Author: Mark Kuo <mkuo@nvidia.com>
Date: Thu Aug 20 05:01:46 2015

ANDROID: CHROMIUM: usb: gadget: f_mtp: Add SuperSpeed support

Add SuperSpeed endpoint and companion descriptors.

BUG=chrome-os-partner:43682
TEST=Smaug enumerates as a SuperSpeed device.

Signed-off-by: Hui Fu <hfu@nvidia.com>
Signed-off-by: Henry Lin <henryl@nvidia.com>
Signed-off-by: Mark Kuo <mkuo@nvidia.com>
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/294950
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 17fe2ea84ddda272ab4a382186916213965201db)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I2bf3125d180fcb07222a5740fa67f3526cf3e95c
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345687
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/3685229666c4860dc820c011fcfc3e088620f82d/drivers/usb/gadget/function/f_mtp.c

Project Member

Comment 65 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/1da8fbcbfe463430ac8bef37f22244d736cf35a0

commit 1da8fbcbfe463430ac8bef37f22244d736cf35a0
Author: Shawn Lin <shawn.lin@rock-chips.com>
Date: Wed Mar 16 10:15:47 2016

ANDROID: FROMLIST: mmc: block: fix ABI regression of mmc_blk_ioctl

If mmc_blk_ioctl returns -EINVAL, blkdev_ioctl continues to
work without returning err to user-space. But now we check
CAP_SYS_RAWIO firstly, so we return -EPERM to blkdev_ioctl,
which make blkdev_ioctl return -EPERM to user-space directly.
So this will break all the ioctl with BLKROSET. Now we find
Android-adb suffer it for the following log:

remount of /system failed;
couldn't make block device writable: Operation not permitted
openat(AT_FDCWD, "/dev/block/platform/ff420000.dwmmc/by-name/system", O_RDONLY) = 3
ioctl(3, BLKROSET, 0)  = -1 EPERM (Operation not permitted)

Fixes: a5f5774c55a2 ("mmc: block: Add new ioctl to send multi commands")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 13c44727fb66fc1d57eb716a2225daaa4bd200e0)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Ie9ba728e366abf4ab73fd6102d2a2aa0d4ee5c66
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345686
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/1da8fbcbfe463430ac8bef37f22244d736cf35a0/drivers/mmc/card/block.c

Project Member

Comment 66 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/e6f631d760e3e3f774aefddeb9f11af3137556df

commit e6f631d760e3e3f774aefddeb9f11af3137556df
Author: dcashman <dcashman@google.com>
Date: Wed Feb 24 21:31:22 2016

ANDROID: FROMLIST: mm: ASLR: use get_random_long()

(cherry picked from commit https://lkml.org/lkml/2016/2/4/833)

Replace calls to get_random_int() followed by a cast to (unsigned long)
with calls to get_random_long().  Also address shifting bug which, in case
of x86 removed entropy mask for mmap_rnd_bits values > 31 bits.

Bug: 26963541
Signed-off-by: Daniel Cashman <dcashman@android.com>
Signed-off-by: Daniel Cashman <dcashman@google.com>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit b471fcdaec3d419ddcbe416568f3f9ce7f1e9ef8)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I36c156c9b8d7d157134895fddd4cd6efddcbee86
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345685
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/e6f631d760e3e3f774aefddeb9f11af3137556df/arch/arm64/mm/mmap.c
[modify] https://crrev.com/e6f631d760e3e3f774aefddeb9f11af3137556df/arch/sparc/kernel/sys_sparc_64.c
[modify] https://crrev.com/e6f631d760e3e3f774aefddeb9f11af3137556df/arch/mips/mm/mmap.c
[modify] https://crrev.com/e6f631d760e3e3f774aefddeb9f11af3137556df/arch/x86/mm/mmap.c
[modify] https://crrev.com/e6f631d760e3e3f774aefddeb9f11af3137556df/arch/arm/mm/mmap.c
[modify] https://crrev.com/e6f631d760e3e3f774aefddeb9f11af3137556df/arch/powerpc/mm/mmap.c
[modify] https://crrev.com/e6f631d760e3e3f774aefddeb9f11af3137556df/fs/binfmt_elf.c
[modify] https://crrev.com/e6f631d760e3e3f774aefddeb9f11af3137556df/arch/powerpc/kernel/process.c

Project Member

Comment 67 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/d72c1e3d3af005fa66637ea6b61f3d8635b83aed

commit d72c1e3d3af005fa66637ea6b61f3d8635b83aed
Author: dcashman <dcashman@google.com>
Date: Wed Feb 24 21:27:06 2016

ANDROID: FROMLIST: drivers: char: random: add get_random_long()

(cherry picked from commit https://lkml.org/lkml/2016/2/4/831)

d07e22597d1d355 ("mm: mmap: add new /proc tunable for mmap_base ASLR")
added the ability to choose from a range of values to use for entropy
count in generating the random offset to the mmap_base address.  The
maximum value on this range was set to 32 bits for 64-bit x86 systems, but
this value could be increased further, requiring more than the 32 bits of
randomness provided by get_random_int(), as is already possible for arm64.
Add a new function: get_random_long() which more naturally fits with the
mmap usage of get_random_int() but operates exactly the same as
get_random_int().

Also, fix the shifting constant in mmap_rnd() to be an unsigned long so
that values greater than 31 bits generate an appropriate mask without
overflow.  This is especially important on x86, as its shift instruction
uses a 5-bit mask for the shift operand, which meant that any value for
mmap_rnd_bits over 31 acts as a no-op and effectively disables mmap_base
randomization.

Finally, replace calls to get_random_int() with get_random_long() where
appropriate.

Bug: 26963541
Signed-off-by: Daniel Cashman <dcashman@android.com>
Signed-off-by: Daniel Cashman <dcashman@google.com>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 9a3fe392e468775da2b63a813f60b923eb6476c5)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I5b45621088666d5d1dfbf43952f25ea0798b10ba
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345684
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/d72c1e3d3af005fa66637ea6b61f3d8635b83aed/drivers/char/random.c
[modify] https://crrev.com/d72c1e3d3af005fa66637ea6b61f3d8635b83aed/include/linux/random.h

Project Member

Comment 68 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/8f55571f7be8b88801cc78058e9bac55a14404f8

commit 8f55571f7be8b88801cc78058e9bac55a14404f8
Author: Jeff Mahoney <jeffm@suse.com>
Date: Mon Apr 04 18:15:23 2016

ANDROID: UPSTREAM: mac80211: fix "warning: target_metric may be used uninitialized"

(This cherry-picks b4201cc4fc6e1c57d6d306b1f787865043d60129 upstream)

This fixes:

net/mac80211/mesh_hwmp.c:603:26: warning: target_metric may be used uninitialized in this function

target_metric is only consumed when reply = true so no bug exists here,
but not all versions of gcc realize it.  Initialize to 0 to remove the
warning.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
[jstultz: Cherry-picked to android-4.4]
Signed-off-by: John Stultz <john.stultz@linaro.org>

(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 8f2aea82ca669025419a4c9ab23b94f97c1ee170)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I13923fda9d314f48196c29e4354133dfe01f5abd
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345911
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/8f55571f7be8b88801cc78058e9bac55a14404f8/net/mac80211/mesh_hwmp.c

Project Member

Comment 69 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/59bed48cb71c3f781ac81adf421516a910ccaf01

commit 59bed48cb71c3f781ac81adf421516a910ccaf01
Author: Amit Pundir <amit.pundir@linaro.org>
Date: Tue May 17 10:36:17 2016

ANDROID: Revert "drivers: power: use 'current' instead of 'get_current()'"

This reverts commit e1b5d103894d097fb630aebc3c1fdaf257f7c9bb.

This patch fixed the aosp commit ad86cc8ad632 (drivers: power:
Add watchdog timer to catch drivers which lockup during suspend.),
which we dropped in Change Id Ic72a87432e27844155467817600adc6cf0c2209c,
so we no longer need this fix. A part of this patch is already reverted
in above mentioned Change Id.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 9a326f6c084b089765ed8ee903b76a5e8251b0b3)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I110c278b395fb42128fd6f572ccb6a160c704ab1
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345910
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/59bed48cb71c3f781ac81adf421516a910ccaf01/drivers/base/power/main.c

Project Member

Comment 70 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/c86167926c7c3ee802a06c4c6b71fa2685561e42

commit c86167926c7c3ee802a06c4c6b71fa2685561e42
Author: John Stultz <john.stultz@linaro.org>
Date: Thu May 12 18:17:52 2016

ANDROID: xt_qtaguid: Fix panic caused by processing non-full socket.

In an issue very similar to 4e461c777e3 (xt_qtaguid: Fix panic
caused by synack processing), we were seeing panics on occasion
in testing.

In this case, it was the same issue, but caused by a different
call path, as the sk being returned from qtaguid_find_sk() was
not a full socket. Resulting in the sk->sk_socket deref to fail.

This patch adds an extra check to ensure the sk being retuned
is a full socket, and if not it returns NULL.

Reported-by: Milosz Wasilewski <milosz.wasilewski@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit cc0063b8eb44f08bb899fb47d562c67d73b7245b)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I4561472faa2d91ad07e7f0c3794352d2a8c1ff41
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345909
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/c86167926c7c3ee802a06c4c6b71fa2685561e42/net/netfilter/xt_qtaguid.c

Project Member

Comment 71 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/4016b2d9d87cc1e91d325de91c329fdd2410b6e9

commit 4016b2d9d87cc1e91d325de91c329fdd2410b6e9
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Wed May 11 18:01:02 2016

ANDROID: fiq_debugger: Add fiq_debugger.disable option

This change allows to use same kernel image with
different console options for uart and fiq_debugger.
If fiq_debugger.disable will be set to 1/y/Y,
fiq_debugger will not be initialized.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 239dd543887daf9337567e68e4de7f42efa53a48)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I71fda54f5f863d13b1437b1f909e52dd375d002d
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345908
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/4016b2d9d87cc1e91d325de91c329fdd2410b6e9/drivers/staging/android/fiq_debugger/fiq_debugger.c

Project Member

Comment 72 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/ec2c9a727243aa30efd4209137c2a3d5ab2a706b

commit ec2c9a727243aa30efd4209137c2a3d5ab2a706b
Author: Janis Danisevskis <jdanis@google.com>
Date: Thu Apr 14 12:57:03 2016

ANDROID: UPSTREAM: procfs: fixes pthread cross-thread naming if !PR_DUMPABLE

The PR_DUMPABLE flag causes the pid related paths of the
proc file system to be owned by ROOT. The implementation
of pthread_set/getname_np however needs access to
/proc/<pid>/task/<tid>/comm.
If PR_DUMPABLE is false this implementation is locked out.

This patch installs a special permission function for
the file "comm" that grants read and write access to
all threads of the same group regardless of the ownership
of the inode. For all other threads the function falls back
to the generic inode permission check.

Signed-off-by: Janis Danisevskis <jdanis@google.com>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 92c4fc6f0946e846dee50b79b5dd061fe795dfaf)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I669534b14abaaf0990d93f1ef8119c26dca933e5
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345907
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/ec2c9a727243aa30efd4209137c2a3d5ab2a706b/fs/proc/base.c

Project Member

Comment 73 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/56b452a4853efda4c1a79ff44462811777e0b050

commit 56b452a4853efda4c1a79ff44462811777e0b050
Author: Jimmy Perchet <jimmy.perchet@parrot.com>
Date: Mon May 09 17:32:04 2016

ANDROID: FROMLIST: wlcore: Disable filtering in AP role

When you configure (set it up) a STA interface, the driver
install a multicast filter. This is normal behavior, when
one application subscribe to multicast address the filter
is updated. When Access Point interface is configured, there
is no filter installation and the "filter update" path is
disabled in the driver.

The problem happens when you switch an interface from STA
type to AP type. The filter is installed but there are no
means to update it.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit e9253e876087accdab8edb763cfa4c3a48a8ce66)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Ied22323af831575303abd548574918baa9852dd0
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345906
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/56b452a4853efda4c1a79ff44462811777e0b050/drivers/net/wireless/ti/wlcore/init.c

Project Member

Comment 74 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/da9d890c1338548b6f3fb67f69f173fd0ac24995

commit da9d890c1338548b6f3fb67f69f173fd0ac24995
Author: Lianwei Wang <lianwei.wang@gmail.com>
Date: Fri May 06 07:17:57 2016

ANDROID: Revert "drivers: power: Add watchdog timer to catch drivers which lockup during suspend."

This reverts commit ad86cc8ad63229eeeba0628e99f2f59df55a25fd.

Commit 70fea60d888d ("PM / Sleep: Detect device suspend/resume lockup...")
added a suspend/resume watchdog timer to catch the lockup. Let's revert the
duplicate one.

Signed-off-by: Lianwei Wang <lianwei.wang@gmail.com>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit e3b53389cf2313172034123a84d760984c4efd71)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Ic72a87432e27844155467817600adc6cf0c2209c
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345905
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/da9d890c1338548b6f3fb67f69f173fd0ac24995/drivers/base/power/main.c

Project Member

Comment 75 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/06a75313589e59c22a9d24f1b3c28210f27ccd06

commit 06a75313589e59c22a9d24f1b3c28210f27ccd06
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Wed May 04 20:51:38 2016

ANDROID: fiq_debugger: Add option to apply uart overlay by FIQ_DEBUGGER_UART_OVERLAY

fiq_debugger is taking over uart, so it is necessary to disable
original uart in DT file. It can be done manually or by overlay.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit f355b21139b26c70f38ae3cc19388c513a75242c)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I9f50ec15b0e22e602d73b9f745fc8666f8925d09
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345904
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/06a75313589e59c22a9d24f1b3c28210f27ccd06/drivers/staging/android/fiq_debugger/Kconfig
[modify] https://crrev.com/06a75313589e59c22a9d24f1b3c28210f27ccd06/drivers/staging/android/fiq_debugger/fiq_debugger.c

Project Member

Comment 76 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/f5b963654efed07cddf57c69b99b82decbe1e67c

commit f5b963654efed07cddf57c69b99b82decbe1e67c
Author: Amit Pundir <amit.pundir@linaro.org>
Date: Wed May 04 05:44:16 2016

ANDROID: Revert "Recreate asm/mach/mmc.h include file"

This reverts commit 5b42ae3edab6c39c1337d36881d29350bb36dcff.

This recereated arch/arm/include/asm/mach/mmc.h include file has
no active user in android-4.x kernels. Also all the necessary bits
are already moved to include/linux/amba/mmci.h.

6ef297f86b62 (ARM: 5720/1: Move MMCI header to amba include dir)

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit b2cee99f2bada8a9da66cd29b71a79aaf52227ce)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Ibf258b355d17f54f49b777a8f6e0089e9b59a3a5
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345903
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[delete] https://crrev.com/d09a7657c60a01c86a4bb1a60b08e03a99f084e6/arch/arm/include/asm/mach/mmc.h

Project Member

Comment 77 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/d09a7657c60a01c86a4bb1a60b08e03a99f084e6

commit d09a7657c60a01c86a4bb1a60b08e03a99f084e6
Author: Amit Pundir <amit.pundir@linaro.org>
Date: Wed May 04 05:35:15 2016

ANDROID: Revert "ARM: Add 'card_present' state to mmc_platfrom_data"

This reverts commit 541632275e983573b8250fcd4402f772d7bd1e6f.

mmc_platform_data (or arch/arm/include/asm/mach/mmc.h in general)
has no active user in android-4.x kernels. Also all the necessary
bits are already moved to include/linux/amba/mmci.h.

6ef297f86b62 (ARM: 5720/1: Move MMCI header to amba include dir)

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 8b43e279a24727794cf6dd61fcad956f532002d3)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Iff384eb527327bf88543408e0257241c1fd99a43
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345902
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/d09a7657c60a01c86a4bb1a60b08e03a99f084e6/arch/arm/include/asm/mach/mmc.h

Project Member

Comment 78 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/ce4de072a48ed4767a8fbd808a39d0d7a5fbbfc7

commit ce4de072a48ed4767a8fbd808a39d0d7a5fbbfc7
Author: Jack Pham <jackp@codeaurora.org>
Date: Wed Mar 23 20:18:03 2016

ANDROID: usb: dual-role: make stub functions inline

If CONFIG_DUAL_ROLE_USB_INTF is disabled but the exported functions
are referenced, the build will result in warnings such as:

	In file included from include/linux/usb/class-dual-role.h:112:13:
	warning: dual_role_instance_changed defined but not used
	[-Wunused-function]

These stub functions should be static inline.

Signed-off-by: Jack Pham <jackp@codeaurora.org>
(cherry picked from commit 2d152dbb0743526b21d6bbefe097f874c027f860)
(cherry picked from commit 8ad66cafaa10e6ba94ff79a8dbc2cc437c6bfe93)
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit d114f2c3570fc63019656b6870e4fcc506852334)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I5a9ef58dca32306fac5a4c7f28cdaa36fa8ae078
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345901
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/ce4de072a48ed4767a8fbd808a39d0d7a5fbbfc7/include/linux/usb/class-dual-role.h

Project Member

Comment 79 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/d008be17b529da455b719debe7a5f37bd997b799

commit d008be17b529da455b719debe7a5f37bd997b799
Author: Amit Pundir <amit.pundir@linaro.org>
Date: Mon May 02 10:02:15 2016

ANDROID: Revert "mmc: Add status IRQ and status callback function to mmc platform data"

This reverts commit 91fa97e1e5c001d52f6c993d37be08d1e84f47b7.

This patch is no longer valid. There are no users for this status irq and
callback in android-4.x. The Qcom platform (mach-msm/qsd8x50, HTC Dream..)
and SDCC controller (msm_sdcc) using this status IRQ and callback are
dropped from mainline sometime back.

27842bb18b00(mmc: Remove msm_sdcc driver)
c0c89fafa289 (ARM: Remove mach-msm and associated ARM architecture code)

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit f24888af18176246638498325fb1ecd49e0ef00e)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Ia38e42a06dc184395f79c1ec1d306bf9775704d5
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345900
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/d008be17b529da455b719debe7a5f37bd997b799/include/linux/amba/mmci.h

Project Member

Comment 80 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/7394e1c9edb3d1e435cff96b5dc50986e8000f22

commit 7394e1c9edb3d1e435cff96b5dc50986e8000f22
Author: Yongqin Liu <yongqin.liu@linaro.org>
Date: Thu Apr 28 05:53:36 2016

ANDROID: quick selinux support for tracefs

Here is just the quick fix for tracefs with selinux.
just add tracefs to the list of whitelisted filesystem
types in selinux_is_sblabel_mnt(), but the right fix would be to
generalize this logic as described in the last item on the todo list,
https://bitbucket.org/seandroid/wiki/wiki/ToDo

Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 3a343a1540d4376d838c0a29bd5462d4e961e766)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I2aa803ccffbcd2802a7287514da7648e6b364157
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345899
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/7394e1c9edb3d1e435cff96b5dc50986e8000f22/security/selinux/hooks.c

Project Member

Comment 81 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/974c56ee0dcccbb68411b87130ca88edd692c315

commit 974c56ee0dcccbb68411b87130ca88edd692c315
Author: Amit Pundir <amit.pundir@linaro.org>
Date: Tue Apr 26 09:17:53 2016

ANDROID: Revert "hid-multitouch: Filter collections by application usage."

This reverts commit 0840b80cb9626906b57df54e7229db60f9aea4f2.

This patch is already upstreamed in v4.4, commit
658d4aed59b3 (HID: hid-multitouch: Filter collections by application usage.),
and further fixed/cleaned up afterwards in commits
c2ef8f21ea8f (HID: multitouch: add support for trackpads),
76f5902aebda (HID: hid-multitouch: Simplify setup and frame synchronization) et al.

By having this duplicate patch in AOSP we are doing redundant
checks for Touchscreen and Touchpad devices.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 9fc7b46c3d3ffdd135c601e5c28a6bb316f3a011)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I07fe7a237f43a7593c37c59fbc5466968342ff35
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345898
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/974c56ee0dcccbb68411b87130ca88edd692c315/drivers/hid/hid-multitouch.c

Project Member

Comment 82 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/bee24b75cd029067c5aaf8813aee9197a432020b

commit bee24b75cd029067c5aaf8813aee9197a432020b
Author: Amit Pundir <amit.pundir@linaro.org>
Date: Tue Apr 26 09:44:35 2016

ANDROID: Revert "HID: steelseries: validate output report details"

This reverts commit 90037b2720acffa6da2269a10ecf24ec2dace89b.

Remove duplicate code. This patch is already upstreamed in v4.4,
commit 41df7f6d4372 (HID: steelseries: validate output report details).

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 379cf6e8ddb187ad202bf05d22251e280fee26d1)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I04bc54caaa0ae8b286ca093fd44b335356a2f37b
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345897
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/bee24b75cd029067c5aaf8813aee9197a432020b/drivers/hid/hid-steelseries.c

Project Member

Comment 83 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/7240176a6417d0148cca60a25e1b41d74187eb71

commit 7240176a6417d0148cca60a25e1b41d74187eb71
Author: John Stultz <john.stultz@linaro.org>
Date: Sat Apr 23 00:12:57 2016

ANDROID: xt_qtaguid: Fix panic caused by synack processing

In upstream commit ca6fb06518836ef9b65dc0aac02ff97704d52a05
(tcp: attach SYNACK messages to request sockets instead of
listener)
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ca6fb0651883

The building of synack messages was changed, which made it so
the skb->sk points to a casted request_sock. This is problematic,
as there is no sk_socket in a request_sock. So when the qtaguid_mt
function tries to access the sk->sk_socket, it accesses uninitialized
memory.

After looking at how other netfilter implementations handle this,
I realized there was a skb_to_full_sk() helper added, which the
xt_qtaguid code isn't yet using.

This patch adds its use, and resovles panics seen when accessing
uninitialzed memory when processing synack packets.

Reported-by: YongQin Liu <yongquin.liu@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit 4e461c777e345727aa2988377774c996d303ac46)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I12a66e98bd0c2c1ad303a385411f1d9424a99ea4
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345896
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/7240176a6417d0148cca60a25e1b41d74187eb71/net/netfilter/xt_qtaguid.c

Project Member

Comment 84 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/d06a0b8927ecd6e36671a4de2c16af545bfb6ce4

commit d06a0b8927ecd6e36671a4de2c16af545bfb6ce4
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Mon Apr 25 21:28:30 2016

ANDROID: Revert "mm: vmscan: Add a debug file for shrinkers"

Kernel panic when type "cat /sys/kernel/debug/shrinker"

Unable to handle kernel paging request at virtual address 0af37d40
pgd = d4dec000
[0af37d40] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[<c0bb8f24>] (_raw_spin_lock) from [<c020aa08>] (list_lru_count_one+0x14/0x28)
[<c020aa08>] (list_lru_count_one) from [<c02309a8>] (super_cache_count+0x40/0xa0)
[<c02309a8>] (super_cache_count) from [<c01f6ab0>] (debug_shrinker_show+0x50/0x90)
[<c01f6ab0>] (debug_shrinker_show) from [<c024fa5c>] (seq_read+0x1ec/0x48c)
[<c024fa5c>] (seq_read) from [<c022e8f8>] (__vfs_read+0x20/0xd0)
[<c022e8f8>] (__vfs_read) from [<c022f0d0>] (vfs_read+0x7c/0x104)
[<c022f0d0>] (vfs_read) from [<c022f974>] (SyS_read+0x44/0x9c)
[<c022f974>] (SyS_read) from [<c0107580>] (ret_fast_syscall+0x0/0x3c)
Code: e1a04000 e3a00001 ebd66b39 f594f000 (e1943f9f)
---[ end trace 60c74014a63a9688 ]---
Kernel panic - not syncing: Fatal exception

shrink_control.nid is used but not initialzed, same for
shrink_control.memcg.

This reverts commit b0e7a582b2264cdf75874dcd8df915b6b4427755.

Reported-by: Xiaowen Liu <xiaowen.liu@freescale.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
(cherry picked from https://android.googlesource.com/kernel/common android-4.4
 commit ad95c12f66df9efae04b15d5c4d0d0ba56ab2620)

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: I108de88fa4baaef99a53c4e4c6a1d8c4b4804157
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345895
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/d06a0b8927ecd6e36671a4de2c16af545bfb6ce4/mm/vmscan.c

Project Member

Comment 85 by bugdroid1@chromium.org, May 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/b2ccb0abe730f78ec7eea75d219ae1dbd6a4572e

commit b2ccb0abe730f78ec7eea75d219ae1dbd6a4572e
Author: Brian Norris <briannorris@chromium.org>
Date: Wed May 18 01:33:21 2016

Revert "CHROMIUM: kernel panic when reading /sys/kernel/debug/shrinker"

This reverts commit f0a02f5eaa135dacc09483e0756ca95f2f1488fa.

We're going to remove this debug file entirely, since android-common did
so (due to the same bug we fixed).

BUG= chromium:612862 
TEST=build and boot on a few devices

Change-Id: Ie631b7866e25934f0755b9deb5aa95ccbd68c1c7
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/345894
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/b2ccb0abe730f78ec7eea75d219ae1dbd6a4572e/mm/vmscan.c

Status: Archived (was: Started)

Comment 87 by ketakid@google.com, Mar 18 2017

Status: Available (was: Archived)
Activating. Please assign to the right owner and the appropriate priority.
Project Member

Comment 88 by sheriffbot@chromium.org, Apr 13 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Fixed (was: Untriaged)
This is an ever-moving target, and it's not really that useful/important given how long 4.4 has been running in the wild now. I'm sure we'll pull things in again (and have been already) when needed. I'll call this one fixed, as of roughly May 2016 ;)

Sign in to add a comment