aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ANDROID: sdcardfs: Use seq_puts over seq_printfDaniel Rosenberg2017-04-131-1/+1
| | | | | | Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 35331000 Change-Id: I3795ec61ce61e324738815b1ce3b0e09b25d723f
* ANDROID: sdcardfs: Use to kstroutDaniel Rosenberg2017-04-131-1/+7
| | | | | | | | Switch from deprecated simple_strtoul to kstrout Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 35331000 Change-Id: If18bd133b4d2877f71e58b58fc31371ff6613ed5
* ANDROID: sdcardfs: Use pr_[...] instead of printkDaniel Rosenberg2017-04-138-50/+43
| | | | | | Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 35331000 Change-Id: Ibc635ec865750530d32b87067779f681fe58a003
* ANDROID: sdcardfs: remove unneeded null checkDaniel Rosenberg2017-04-133-6/+3
| | | | | | | | | As pointed out by checkpatch, these functions already handle null inputs, so the checks are not needed. Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 35331000 Change-Id: I189342f032dfcefee36b27648bb512488ad61d20
* ANDROID: sdcardfs: Fix style issues with commentsDaniel Rosenberg2017-04-133-22/+5
| | | | | | Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 35331000 Change-Id: I8791ef7eac527645ecb9407908e7e5ece35b8f80
* ANDROID: sdcardfs: Fix formattingDaniel Rosenberg2017-04-1310-259/+312
| | | | | | | | | This fixes various spacing and bracket related issues pointed out by checkpatch. Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 35331000 Change-Id: I6e248833a7a04e3899f3ae9462d765cfcaa70c96
* ANDROID: sdcardfs: correct order of descriptorsDaniel Rosenberg2017-04-131-1/+3
| | | | | | Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 35331000 Change-Id: Ia6d16b19c8c911f41231d2a12be0740057edfacf
* ANDROID: sdcardfs: Fix gid issueDaniel Rosenberg2017-04-132-14/+6
| | | | | | | | | | We were already calculating most of these values, and erroring out because the check was confused by this. Instead of recalculating, adjust it as needed. Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 36160015 Change-Id: I9caf3e2fd32ca2e37ff8ed71b1d392f1761bc9a9
* ANDROID: sdcardfs: Use tabs instead of spaces in multiuser.hDaniel Rosenberg2017-04-131-11/+11
| | | | | | Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 35331000 Change-Id: Ic7801914a7dd377e270647f81070020e1f0bab9b
* ANDROID: sdcardfs: Remove uninformative printsDaniel Rosenberg2017-04-134-30/+1
| | | | | | | | | At best these prints do not provide useful information, and at worst, some allow userspace to abuse the kernel log. Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 36138424 Change-Id: I812c57cc6a22b37262935ab77f48f3af4c36827e
* ANDROID: sdcardfs: move path_put outside of spinlockDaniel Rosenberg2017-04-131-1/+6
| | | | | | Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 35643557 Change-Id: Ib279ebd7dd4e5884d184d67696a93e34993bc1ef
* ANDROID: sdcardfs: Use case insensitive hash functionDaniel Rosenberg2017-04-131-1/+10
| | | | | | | | | Case insensitive comparisons don't help us much if we hash to different buckets... Signed-off-by: Daniel Rosenberg <drosen@google.com> bug: 36004503 Change-Id: I91e00dbcd860a709cbd4f7fd7fc6d855779f3285
* ANDROID: sdcardfs: declare MODULE_ALIAS_FSDaniel Rosenberg2017-04-131-0/+1
| | | | | | | | From commit ee616b78aa87 ("Wrapfs: declare MODULE_ALIAS_FS") Signed-off-by: Daniel Rosenberg <drosen@google.com> bug: 35766959 Change-Id: Ia4728ab49d065b1d2eb27825046f14b97c328cba
* ANDROID: sdcardfs: Get the blocksize from the lower fsDaniel Rosenberg2017-04-131-12/+9
| | | | | | | | | | This changes sdcardfs to be more in line with the getattr in wrapfs, which calls the lower fs's getattr to get the block size Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 34723223 Change-Id: I1c9e16604ba580a8cdefa17f02dcc489d7351aed
* ANDROID: sdcardfs: Use d_invalidate instead of drop_recurisveDaniel Rosenberg2017-04-133-41/+1
| | | | | | | | | | | drop_recursive did not properly remove stale dentries. Instead, we use the vfs's d_invalidate, which does the proper cleanup. Additionally, remove the no longer used drop_recursive, and fixup_top_recursive that that are no longer used. Signed-off-by: Daniel Rosenberg <drosen@google.com> Change-Id: Ibff61b0c34b725b024a050169047a415bc90f0d8
* ANDROID: sdcardfs: Switch to internal case insensitive compareDaniel Rosenberg2017-04-134-13/+10
| | | | | | | | | | | | | | | There were still a few places where we called into a case insensitive lookup that was not defined by sdcardfs. Moving them all to the same place will allow us to switch the implementation in the future. Additionally, the check in fixup_perms_recursive did not take into account the length of both strings, causing extraneous matches when the name we were looking for was a prefix of the child name. Signed-off-by: Daniel Rosenberg <drosen@google.com> Change-Id: I45ce768cd782cb4ea1ae183772781387c590ecc2
* ANDROID: sdcardfs: Use spin_lock_nestedDaniel Rosenberg2017-04-131-2/+2
| | | | | | Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 36007653 Change-Id: I805d5afec797669679853fb2bb993ee38e6276e4
* ANDROID: sdcardfs: Replace get/put with d_lockDaniel Rosenberg2017-04-131-13/+19
| | | | | | | | | dput cannot be called with a spin_lock. Instead, we protect our accesses by holding the d_lock. Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 35643557 Change-Id: I22cf30856d75b5616cbb0c223724f5ab866b5114
* ANDROID: sdcardfs: rate limit warning printDaniel Rosenberg2017-04-131-2/+3
| | | | | | Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 35848445 Change-Id: Ida72ea0ece191b2ae4a8babae096b2451eb563f6
* ANDROID: sdcardfs: Fix case insensitive lookupDaniel Rosenberg2017-04-131-17/+51
| | | | | | | | | | The previous case insensitive lookup relied on the entry being present in the dcache. This instead uses iterate_dir to find the correct case. Signed-off-by: Daniel Rosenberg <drosen@google.com bug: 35633782 Change-Id: I556f7090773468c1943c89a5e2aa07f746ba49c5
* staging: android: ashmem: add missing includeRom Lemarchand2017-04-131-0/+1
| | | | | | | Include <linux/types.h> into ashmem.h to ensure referenced types are defined Signed-off-by: Rom Lemarchand <romlem@android.com> Change-Id: Iac18ed86dd47296d02a269607b1514724aaa9958
* defconfig: enable SHA512 for android 7.1.2 preparationMister Oyster2017-04-131-1/+1
|
* defconfig: remove config_has_wakelock, only 3.10 wifi drivers used it, ↵Mister Oyster2017-04-131-1/+0
| | | | has_wakelock is useless since we use 3.18 wifi kernel drivers
* power: Remove HAS_WAKELOCK config and document WAKELOCKDylan Reid2017-04-131-5/+6
| | | | | | | | | | Remove the HAS_WAKELOCK config as it doesn't seem to have been used in the 3.10 or 3.14 kernels. Add some Documentation to CONFIG_WAKELOCK so that it is selectable and can be disabled is desired. Signed-off-by: Dylan Reid <dgreid@chromium.org>
* wakeup_reason: use vsnprintf instead of snsprintf for vargs.Ruchi Kandoi2017-04-131-1/+1
| | | | | Bug: 22368519 Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
* power: wakeup_reason: fix suspend time reportingAmit Pundir2017-04-131-16/+25
| | | | | | | | | | | | | | | | | Suspend time reporting Change-Id: I2cb9a9408a5fd12166aaec11b935a0fd6a408c63 (Power: Report suspend times from last_suspend_time), is broken on 3.16+ kernels because get_xtime_and_monotonic_and_sleep_offset() hrtimer helper routine is removed from kernel timekeeping. The replacement helper routines ktime_get_update_offsets_{tick,now}() are private to core kernel timekeeping so we can't use them, hence using ktime_get() and ktime_get_boottime() instead and sampling the time twice. Idea is to use Monotonic boottime offset to calculate total time spent in last suspend state and CLOCK_MONOTONIC to calculate time spent in last suspend-resume process. Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
* alarmtimer: Export symbols of functions declared in linux/alarmtimer.hMarcus Gelderie2017-04-131-1/+9
| | | | | | | | | | | Export symbols so they can be used by drivers/staging/android/alarm-dev.c if it is built as a module. So far alarm-dev is built-in but module support is planned (see drivers/staging/android/TODO). Signed-off-by: Marcus Gelderie <redmnic@gmail.com> [jstultz: tweaked commit message, also export newly added functions] Signed-off-by: John Stultz <john.stultz@linaro.org>
* drivers/rtc/interface.c: fix infinite loop in initializing the alarmAles Novak2017-04-131-2/+12
| | | | | | | | | | | | | | | | In __rtc_read_alarm(), if the alarm time retrieved by rtc_read_alarm_internal() from the device contains invalid values (e.g. month=2,mday=31) and the year not set (=-1), the initialization will loop infinitely because the year-fixing loop expects the time being invalid due to leap year. Fix reduces the loop to the leap years and adds final validity check. Signed-off-by: Ales Novak <alnovak@suse.cz> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Reported-by: Jiri Bohac <jbohac@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* alarmtimer: Export symbols of alarmtimer_get_rtcdevPramod Gurav2017-04-131-1/+1
| | | | | | | | | | | Export symbol of alarmtimer_get_rtcdev so that it is used by any driver when built as module like, drivers/staging/android/alarm-dev.c. CC: John Stultz <john.stultz@linaro.org> CC: Marcus Gelderie <redmnic@gmail.com> Signed-off-by: Pramod Gurav <pramod.gurav.etc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers/rtc/rtc-efi.c: check for invalid data coming back from UEFIJan Beulich2017-04-131-5/+27
| | | | | | | | | | | | | | | | | | | | In particular seeing zero in eft->month is problematic, as it results in -1 (converted to unsigned int, i.e. yielding 0xffffffff) getting passed to rtc_year_days(), where the value gets used as an array index (normally resulting in a crash). This was observed with the driver enabled on x86 on some Fujitsu system (with possibly not up to date firmware, but anyway). Perhaps efi_read_alarm() should not fail if neither enabled nor pending are set, but the returned time is invalid? Signed-off-by: Jan Beulich <jbeulich@suse.com> Reported-by: Raymund Will <rw@suse.de> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Jingoo Han <jg1.han@samsung.com> Acked-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drivers/rtc/interface.c: check the error after __rtc_read_time()Hyogi Gim2017-04-131-0/+2
| | | | | | | | | | | | | In __rtc_set_alarm(), the error after __rtc_read_time() is not checked. If rtc device fail to read time, we cannot guarantee the following process. Add the verification code for returned __rtc_read_time() error. Signed-off-by: Hyogi Gim <hyogi.gim@lge.com> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* docs: Procfs -- Document timerfd outputCyrill Gorcunov2017-04-131-0/+19
| | | | | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Michael Kerrisk <mtk.manpages@gmail.com> Cc: Andrey Vagin <avagin@openvz.org> Cc: Pavel Emelyanov <xemul@parallels.com> Cc: Vladimir Davydov <vdavydov@parallels.com> Link: http://lkml.kernel.org/r/20140715215703.199905126@openvz.org Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* timerfd: Remove an always true checkDan Carpenter2017-04-131-2/+1
| | | | | | | | | | We would have returned -EINVAL earlier if ticks wasn't set. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Link: http://lkml.kernel.org/r/20140801082848.GF28869@mwanda Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* timerfd: Implement timerfd_ioctl method to restore timerfd_ctx::ticks, v3Cyrill Gorcunov2017-04-131-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The read() of timerfd files allows to fetch the number of timer ticks while there is no way to set it back from userspace. To restore the timer's state as it was at checkpoint moment we need a path to bring @ticks back. Initially I thought about writing ticks back via write() interface but it seems such API is somehow obscure. Instead implement timerfd_ioctl() method with TFD_IOC_SET_TICKS command which allows to adjust @ticks into non-zero value waking up the waiters. I wrapped code with CONFIG_CHECKPOINT_RESTORE which can be dropped off if there users except c/r camp appear. v2 (by akpm@): - Use define timerfd_ioctl NULL for non c/r config v3: - Use copy_from_user for @ticks fetching since not all arch support get_user for 8 byte argument Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Michael Kerrisk <mtk.manpages@gmail.com> Cc: Andrey Vagin <avagin@openvz.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christopher Covington <cov@codeaurora.org> Cc: Pavel Emelyanov <xemul@parallels.com> Cc: Vladimir Davydov <vdavydov@parallels.com> Link: http://lkml.kernel.org/r/20140715215703.285617923@openvz.org Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* timerfd: Implement show_fdinfo methodCyrill Gorcunov2017-04-131-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For checkpoint/restore of timerfd files we need to know how exactly the timer were armed, to be able to recreate it on restore stage. Thus implement show_fdinfo method which provides enough information for that. One of significant changes I think is the addition of @settime_flags member. Currently there are two flags TFD_TIMER_ABSTIME and TFD_TIMER_CANCEL_ON_SET, and the second can be found from @might_cancel variable but in case if the flags will be extended in future we most probably will have to somehow remember them explicitly anyway so I guss doing that right now won't hurt. To not bloat the timerfd_ctx structure I've converted @expired to short integer and defined @settime_flags as short too. v2 (by avagin@, vdavydov@ and tglx@): - Add it_value/it_interval fields - Save flags being used in timerfd_setup in context v3 (by tglx@): - don't forget to use CONFIG_PROC_FS v4 (by akpm@): -Use define timerfd_show NULL for non c/r config Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Michael Kerrisk <mtk.manpages@gmail.com> Cc: Andrey Vagin <avagin@openvz.org> Cc: Pavel Emelyanov <xemul@parallels.com> Cc: Vladimir Davydov <vdavydov@parallels.com> Link: http://lkml.kernel.org/r/20140715215703.114365649@openvz.org Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* ANDROID: Put KUSER_HELPERS disable behind configmspector2017-04-132-4/+22
| | | | | | | | | | | | | This change puts the KUSER_HELPERS selective disable behind the KCONFIG KUSER_HELPERS_SELECTIVE_DISABLE. Original patch adding KUSER_HELPERS: 2bed8acb3c3d44c66d979fed9bdd4ea69cb8650b I8d6d75cc8e1b2280f2436fd3334ff3779ae3539a Signed-off-by: mspector <mspector@google.com> Change-Id: I54c606f1f39823abf0a754eef69569cbfb63f8af Bug: 34815073
* ANDROID: Fixing incorrect return value on errormspector2017-04-131-2/+6
| | | | | | | | | | | | This fixes an incorrect return value from should_call_arch_setup_additional_pages when kernel_read returns a different length than expected, the length is returned. The fix is to return -EIO instead. Signed-off-by: mspector <mspector@google.com> Bug: 34749002 Change-Id: I484ad801ce114b4dfe9f62b8b83c960cb693c9b6
* ANDROID: Fix for building non-arm64mspector2017-04-131-0/+2
| | | | | | | | This patch fixes the build break for arch=um Signed-off-by: mspector <mspector@google.com> Bug: 33689037 Change-Id: I245cd39a5ed41c884422b69720afcba7a55b42e1
* ANDROID: Support to disable arm32 Kuser_Helpersmspector2017-04-131-5/+102
| | | | | | | | | | This patch adds support to disable kuser_helpers from being mapped into 32 bit processes on arm64. It also adds an ELF note that tells the kernel to map the page in for the specific process. Signed-off-by: mspector <mspector@google.com> Bug: 33689037 Change-Id: I8d6d75cc8e1b2280f2436fd3334ff3779ae3539a
* ANDROID: base-cfg: enable CONFIG_IP_NF_NATAmit Pundir2017-04-131-0/+1
| | | | | | | | | | | | | | 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. Change-Id: Ic72bcebbd925b142b09539466bf963188c83108a Signed-off-by: Amit Pundir <amit.pundir@linaro.org> (cherry picked from commit 9f6bbb427fc67e5caceec70741def34234078f97) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* android: base-cfg: Add CONFIG_INET_DIAG_DESTROYDmitry Shmidt2017-04-131-0/+1
| | | | | | | Change-Id: I67430b05eca8fd520d2795d3db60faf2ec0fab9e Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> (cherry picked from commit 03fbd079bac71e15a414082cb5aee980ce2935be) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* defconfig: remove CONFIG_IPV6_PRIVACYMister Oyster2017-04-131-1/+0
|
* config/android: Remove CONFIG_IPV6_PRIVACYBorislav Petkov2017-04-131-1/+0
| | | | | | | | | | | | | Option is long gone, see commit 5d9efa7ee99e ("ipv6: Remove privacy config option.") Link: http://lkml.kernel.org/r/20160811170340.9859-1-bp@alien8.de Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Rob Herring <robh@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit a2c6a235dbf4318fc7f7981932478e6c47f093ab) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* ipv6: Remove privacy config option.David S. Miller2017-04-134-62/+4
| | | | | | | | The code for privacy extentions is very mature, and making it configurable only gives marginal memory/code savings in exchange for obfuscation and hard to read code via CPP ifdef'ery. Signed-off-by: David S. Miller <davem@davemloft.net>
* defconfig: regenMister Oyster2017-04-131-13/+17
|
* f2fs: use __set{__clear}_bit_leJaegeuk Kim2017-04-131-3/+3
| | | | | | | This patch uses __set{__clear}_bit_le for highter speed. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: update_free_nid_bitmap() can be statickbuild test robot2017-04-131-2/+2
| | | | | Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: __update_nat_bits() can be statickbuild test robot2017-04-131-1/+1
| | | | | Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: le16_to_cpu for xattr->e_value_sizeJaegeuk Kim2017-04-131-1/+3
| | | | | | | This patch fixes missing le16 conversion, reported by kbuild test robot. Fixes: 5f35a2cd5 ("f2fs: Don't update the xattr data that same as the exist") Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
* f2fs: don't overwrite node block by SSRJaegeuk Kim2017-04-131-0/+6
| | | | | | | | | This patch fixes that SSR can overwrite previous warm node block consisting of a node chain since the last checkpoint. Fixes: 5b6c6be2d878 ("f2fs: use SSR for warm node as well") Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>