Commit Graph

637722 Commits

Author SHA1 Message Date
Daniel Rosenberg
8e818ff05a ANDROID: sdcardfs: Fix incorrect hash
This adds back the hash calculation removed as part of
the previous patch, as it is in fact necessary.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 35307857
Change-Id: Ie607332bcf2c5d2efdf924e4060ef3f576bf25dc
2017-03-21 12:46:52 -07:00
Daniel Rosenberg
a28be72802 ANDROID: export security_path_chown
Signed-off-by: Daniel Rosenberg <drosen@google.com>
BUG: 35142419
Change-Id: I05a9430a3c1bc624e019055175ad377290b4e774
2017-03-21 12:46:52 -07:00
Daniel Rosenberg
5004c5f31c ANDROID: sdcardfs: Switch strcasecmp for internal call
This moves our uses of strcasecmp over to an internal call so we can
easily change implementations later if we so desire. Additionally,
we leverage qstr's where appropriate to save time on comparisons.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Change-Id: I32fdc4fd0cd3b7b735dcfd82f60a2516fd8272a5
2017-03-21 12:46:52 -07:00
Daniel Rosenberg
52b7768b27 ANDROID: sdcardfs: switch to full_name_hash and qstr
Use the kernel's string hash function instead of rolling
our own. Additionally, save a bit of calculation by using
the qstr struct in place of strings.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Change-Id: I0bbeb5ec2a9233f40135ad632e6f22c30ffa95c1
2017-03-21 12:46:52 -07:00
Daniel Rosenberg
ad90525b8b ANDROID: sdcardfs: Add GID Derivation to sdcardfs
This changes sdcardfs to modify the user and group in the
underlying filesystem depending on its usage. Ownership is
set by Android user, and package, as well as if the file is
under obb or cache. Other files can be labeled by extension.
Those values are set via the configfs interace.

To add an entry,
mkdir -p [configfs root]/sdcardfs/extensions/[gid]/[ext]

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 34262585
Change-Id: I4e030ce84f094a678376349b1a96923e5076a0f4
2017-03-21 12:46:52 -07:00
Daniel Rosenberg
147f8ab2fd ANDROID: sdcardfs: Remove redundant operation
We call get_derived_permission_new unconditionally, so we don't need
to call update_derived_permission_lock, which does the same thing.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Change-Id: I0748100828c6af806da807241a33bf42be614935
2017-03-21 12:46:52 -07:00
Daniel Rosenberg
d8caaf9d95 ANDROID: sdcardfs: add support for user permission isolation
This allows you to hide the existence of a package from
a user by adding them to an exclude list. If a user
creates that package's folder and is on the exclude list,
they will not see that package's id.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 34542611
Change-Id: I9eb82e0bf2457d7eb81ee56153b9c7d2f6646323
2017-03-21 12:46:52 -07:00
Daniel Rosenberg
f48ace1432 ANDROID: sdcardfs: Refactor configfs interface
This refactors the configfs code to be more easily extended.
It will allow additional files to be added easily.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 34542611
Bug: 34262585
Change-Id: I73c9b0ae5ca7eb27f4ebef3e6807f088b512d539
2017-03-21 12:46:52 -07:00
Daniel Rosenberg
83d1cad3a1 ANDROID: sdcardfs: Allow non-owners to touch
This modifies the permission checks in setattr to
allow for non-owners to modify the timestamp of
files to things other than the current time.
This still requires write access, as enforced by
the permission call, but relaxes the requirement
that the caller must be the owner, allowing those
with group permissions to change it as well.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 11118565
Change-Id: Ied31f0cce2797675c7ef179eeb4e088185adcbad
2017-03-21 12:46:52 -07:00
Martijn Coenen
8b451dc2bb ANDROID: binder: add padding to binder_fd_array_object.
binder_fd_array_object starts with a 4-byte header,
followed by a few fields that are 8 bytes when
ANDROID_BINDER_IPC_32BIT=N.

This can cause alignment issues in a 64-bit kernel
with a 32-bit userspace, as on x86_32 an 8-byte primitive
may be aligned to a 4-byte address. Pad with a __u32
to fix this.

Change-Id: I4374ed2cc3ccd3c6a1474cb7209b53ebfd91077b
Signed-off-by: Martijn Coenen <maco@android.com>
2017-03-21 17:41:50 +00:00
Martijn Coenen
872c26eb07 ANDROID: binder: use group leader instead of open thread
The binder allocator assumes that the thread that
called binder_open will never die for the lifetime of
that proc. That thread is normally the group_leader,
however it may not be. Use the group_leader instead
of current.

Bug: 35707103
Test: Created test case to open with temporary thread

Change-Id: Id693f74b3591f3524a8c6e9508e70f3e5a80c588
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Martijn Coenen <maco@android.com>
2017-03-21 17:41:40 +00:00
Jungseung Lee
a02c7541b7 BACKPORT: mmc: core: Export device lifetime information through sysfs
In the eMMC 5.0 version of the spec, several EXT_CSD fields about
device lifetime are added.

 - Two types of estimated indications reflected by averaged wear out of memory
 - An indication reflected by average reserved blocks

Export the information through sysfs.

Signed-off-by: Jungseung Lee <js07.lee@samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2017-03-20 22:23:42 +00:00
Badhri Jagan Sridharan
9b7246ebf0 ANDROID: android-verity: do not compile as independent module
dm-android-verity depends on optional kernel command line parameters.
When compiled as module the __setup macro ends up being a no-op
resulting in the following warnings:

/work/build/batch/drivers/md/dm-android-verity.c:91:19: warning: 'verity_buildvariant' defined but not used [-Wunused-function]
 static int __init verity_buildvariant(char *line)
                   ^~~~~~~~~~~~~~~~~~~
/work/build/batch/drivers/md/dm-android-verity.c:83:19: warning: 'verity_keyid_param' defined but not used [-Wunused-function]
 static int __init verity_keyid_param(char *line)
                   ^~~~~~~~~~~~~~~~~~
/work/build/batch/drivers/md/dm-android-verity.c:75:19: warning: 'verity_mode_param' defined but not used [-Wunused-function]
 static int __init verity_mode_param(char *line)
                   ^~~~~~~~~~~~~~~~~
/work/build/batch/drivers/md/dm-android-verity.c:67:19: warning: 'verified_boot_state_param' defined but not used [-Wunused-function]
 static int __init verified_boot_state_param(char *line)
                   ^~~~~~~~~~~~~~~~~~~~~~~~~
Tested with allmodconfig.

Change-Id: Idfe0c97b216bb620cc7264e968b494eb3a765157
Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
2017-03-20 15:06:35 -07:00
Todd Kjos
23b839a4ab resolve merge conflicts of 8fed8fc188 to android-4.4
Change-Id: I743e23d01785febb1e6285e8ebfcf80a488917c5
2017-03-20 09:15:32 -07:00
Sean Young
9ead931464 rc: raw decoder for keymap protocol is not loaded on register
am: 39df5977fd

Change-Id: I01431f5b64836454789cfb846c3a7c99a35cf771
2017-03-18 11:37:05 +00:00
Mikulas Patocka
04ab239838 dm: flush queued bios when process blocks to avoid deadlock
am: 21582cd0b6

Change-Id: I23e32d9f39d07a9a6178688aa78f7b0a10718408
2017-03-18 11:36:57 +00:00
Jintack Lim
f2b56a7662 KVM: arm/arm64: Let vcpu thread modify its own active state
am: d29e6215e5

Change-Id: Ie850ee7a02d3d66511b57b48eee7d80e03f630ad
2017-03-18 11:36:48 +00:00
Janosch Frank
8b551ea6ba KVM: s390: Fix guest migration for huge guests resulting in panic
am: 9d89c20f3b

Change-Id: I3a3b215e0e9254f87ccb05ee17a2bc7881fdd272
2017-03-18 11:36:38 +00:00
Krzysztof Kozlowski
06e68c07cd serial: samsung: Continue to work if DMA request fails
am: ce8ab5f168

Change-Id: I2ac930cd8593ea523462b1a1634951275d112daf
2017-03-18 11:36:29 +00:00
Johan Hovold
a0dd42a283 USB: serial: io_ti: fix information leak in completion handler
am: d0ef6ecee8

Change-Id: I982f042fae1fc32c79f2e2df0260dba3eadb25ae
2017-03-18 11:36:21 +00:00
Johan Hovold
3c522b5860 USB: serial: io_ti: fix NULL-deref in interrupt callback
am: 449b0bb237

Change-Id: If2459faa559e8d5963e9d149ca148819cfdaee6a
2017-03-18 11:36:11 +00:00
Johan Hovold
e082896be7 USB: iowarrior: fix NULL-deref in write
am: f06b17020a

Change-Id: I2ba9bd81a176394bdf8b43e2e0fa77eca0e90ab2
2017-03-18 11:36:02 +00:00
Johan Hovold
6c0dcf8695 USB: iowarrior: fix NULL-deref at probe
am: 653418adaf

Change-Id: I1345deaf740389416299a5d772b8c313baa4ef6d
2017-03-18 11:35:53 +00:00
Johan Hovold
912a046e77 USB: serial: omninet: fix reference leaks at open
am: 6d6c5895f4

Change-Id: I305e7244ba3e9f6ad4519d38163be81938dc4a7a
2017-03-18 11:35:45 +00:00
Johan Hovold
6a85adbea5 USB: serial: safe_serial: fix information leak in completion handler
am: 0ab90ddba7

Change-Id: Id1d59a85bcec9ebc9a7307843c5cfd70179d9a59
2017-03-18 11:35:36 +00:00
Guenter Roeck
384a102db6 usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci controllers
am: 24db1c5a1c

Change-Id: I90e3e3aea8ae3d7a3e25067039815fe87c421a9b
2017-03-18 11:35:28 +00:00
Peter Chen
6aabbf668d usb: host: xhci-dbg: HCIVERSION should be a binary number
am: d863767907

Change-Id: I7d5c0b69905a4f53c9ab2a0001d5bb615d723ec0
2017-03-18 11:35:19 +00:00
Roger Quadros
bc1d6eb5d0 Revert "usb: gadget: uvc: Add missing call for additional setup data"
am: 03123df08e

Change-Id: Ica069c59aaddb9d6fe21218e873f9963cbeb57d0
2017-03-18 11:35:10 +00:00
Felipe Balbi
b35506702c usb: gadget: function: f_fs: pass companion descriptor along
am: 5ce2e4ce4a

Change-Id: Id9a3ad5a46abd4c67239369f79a7f3bef4a6124e
2017-03-18 11:35:01 +00:00
Jelle Martijn Kok
4e9e3bbf88 usb: ohci-at91: Do not drop unhandled USB suspend control requests
am: 40192c9666

Change-Id: I33901103122b32cfb69af983456ba1666e791d94
2017-03-18 11:34:52 +00:00
Roger Quadros
4709f3ee23 usb: dwc3-omap: Fix missing break in dwc3_omap_set_mailbox()
am: accadd8164

Change-Id: Ifdb587bf137b1154495b47aebae8760aed2cf060
2017-03-18 11:34:42 +00:00
Felipe Balbi
b8faeb2d45 usb: dwc3: gadget: make Set Endpoint Configuration macros safe
am: 808ee146d7

Change-Id: I63d636f62f55d12407c8423c10b3924e52b62e62
2017-03-18 11:34:33 +00:00
Peter Chen
9234bb51d0 usb: gadget: dummy_hcd: clear usb_gadget region before registration
am: de90394b0c

Change-Id: I376b8c03eb0d948434745c667067549b44b9dde2
2017-03-18 11:34:23 +00:00
Ethan Zhao
7298ebf711 PCI: Prevent VPD access for QLogic ISP2722
am: ed99f5a09c

Change-Id: I58f0f9ec91795e325983ec5baecda4580459344a
2017-03-18 11:34:13 +00:00
Balbir Singh
9ba6c38ed4 powerpc/xics: Work around limitations of OPAL XICS priority handling
am: 1ced52ead2

Change-Id: I30f63b7a7acaec17a4207821bbee8e94ff45aa87
2017-03-18 11:34:04 +00:00
Ravi Bangoria
182cdba404 powerpc: Emulation support for load/store instructions on LE
am: bc8d2eefe6

Change-Id: I38716fa0ffafed7528028b6422e934b980b36762
2017-03-18 11:33:54 +00:00
Qi Hou
ff8d132f05 i2c: add missing of_node_put in i2c_mux_del_adapters
am: ac4666a7fd

Change-Id: Ie22e63b6caf80fea9a4e0c254d5fd026880d03b6
2017-03-18 11:33:43 +00:00
Jonathan McDowell
7d6d9cc3fe dw2102: don't do DMA on stack
am: 06996254a6

Change-Id: Icd8feef0a97b7f6e04ec3b11b6c6d60993576ee8
2017-03-18 11:33:32 +00:00
Ard Biesheuvel
aa41ab12bc efi/arm: Fix boot crash with CONFIG_CPUMASK_OFFSTACK=y
am: 56d91e106b

Change-Id: Icae9067f39868600db4e4af8f272f8cb281759d6
2017-03-18 11:33:19 +00:00
Eric W. Biederman
4ee06d54ee ucount: Remove the atomicity from ucount->count
am: ee6f7ee1e4

Change-Id: I222bf26458f918b2481e0c14ce2b0bf5fd3c85d8
2017-03-18 11:33:08 +00:00
Rik van Riel
86791b193d tracing: Add #undef to fix compile error
am: 8bb208d02a

Change-Id: I0843add52207bee4705ac543ea4dca0f6d9370a1
2017-03-18 11:32:56 +00:00
Arnd Bergmann
2196850046 cpmac: remove hopeless #warning
am: b72ae5ca7a

Change-Id: If2cb8eea83efff5ac55cfa2534343c166a961b3a
2017-03-18 11:32:44 +00:00
Arnd Bergmann
df53f11d30 bcm63xx_enet: avoid uninitialized variable warning
am: 04275d2a8a

Change-Id: Iaa44475569e8d1ac6c52ee5a430b50513ecd9860
2017-03-18 11:32:33 +00:00
Arnd Bergmann
fa52efea65 MIPS: ralink: Remove unused rt*_wdt_reset functions
am: b7e968da04

Change-Id: I2758abfd66aff5cbb8b83efd7273b2a73a7fd192
2017-03-18 11:32:21 +00:00
Arnd Bergmann
4cd1d6980e MIPS: ralink: Remove unused timer functions
am: dd2419e1ce

Change-Id: Ib164f449eb5dc589d8218a200f32e0b654ee1222
2017-03-18 11:32:10 +00:00
John Crispin
fc19565dfd MIPS: ralink: Cosmetic change to prom_init().
am: f34064186f

Change-Id: Ic7f53d3408caec9d5826c81a8b4f26a049eb747b
2017-03-18 11:31:58 +00:00
Arnd Bergmann
1e11f0b721 mtd: pmcmsp: use kstrndup instead of kmalloc+strncpy
am: 7b767f6b51

Change-Id: I51e1de17cb27e46a91d8b5d973c7cf886fde8654
2017-03-18 11:31:45 +00:00
Arnd Bergmann
cc88525bcc MIPS: Update lemote2f_defconfig for CPU_FREQ_STAT change
am: 976e40d7f6

Change-Id: I0aef806afeb5903816cf34ed667755dcfebe3bee
2017-03-18 11:31:34 +00:00
Arnd Bergmann
562751500f MIPS: ip22: Fix ip28 build for modern gcc
am: dd2ef28eb7

Change-Id: I4d741866ee9e03dd8044b2da4a592e2adf791a0a
2017-03-18 11:31:23 +00:00
Arnd Bergmann
f5c4bd1df7 MIPS: Update ip27_defconfig for SCSI_DH change
am: aff853abd2

Change-Id: Ide9c94948cbb7867f76f64dfd83da842a40d028b
2017-03-18 11:31:14 +00:00