OSDN Git Service
Chih-Wei Huang [Wed, 31 Dec 2014 15:03:41 +0000 (23:03 +0800)]
android: support 32-bit binder in 64-bit kernel
Chih-Wei Huang [Thu, 25 Dec 2014 19:03:16 +0000 (03:03 +0800)]
android-x86: add defconfig for android-x86 and android-x86_64
Robert Mazur [Tue, 23 Dec 2014 06:51:17 +0000 (07:51 +0100)]
SSSE3 emulation for invalid opcode
Use SSEPlus reference implementation of SSSE3 instructions.
For CPUs without SSSE3 support.
Signed-off-by: Robert Mazur <robert.mazur.mazur@gmail.com>
Chih-Wei Huang [Sun, 28 Dec 2014 18:36:05 +0000 (02:36 +0800)]
Merge branch 'google' into android-3.18
Chih-Wei Huang [Sun, 28 Dec 2014 18:35:51 +0000 (02:35 +0800)]
Merge branch 'fedora' into android-3.18
Alan Wu [Tue, 4 Nov 2014 02:26:12 +0000 (18:26 -0800)]
HID: add support for MS Surface Pro 3 Type Cover
Surface Pro 3 Type Cover that works with Ubuntu (and possibly Arch) from this thread. Both trackpad and keyboard work after compiling my own kernel.
http://ubuntuforums.org/showthread.php?t=
2231207&page=2&s=
44910e0c56047e4f93dfd9fea58121ef
Also includes Jarrad Whitaker's message which sources
http://winaero.com/blog/how-to-install-linux-on-surface-pro-3/
which he says is sourced from a Russian site
Signed-off-by: Alan Wu <alan.c.wu@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Hans de Goede [Fri, 24 Oct 2014 09:30:19 +0000 (11:30 +0200)]
i8042: Add notimeout quirk for Fujitsu Lifebook A544 and Lifebook AH544
These models need i8042.notimeout, otherwise the touchpad will not work.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=69731
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1111138
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Stanislaw Gruszka [Wed, 22 Oct 2014 12:32:52 +0000 (14:32 +0200)]
asus-nb-wmi: Add wapf4 quirk for the X550VB
As reported here: http://bugzilla.redhat.com/show_bug.cgi?id=
1089731#c23
the X550VB needs wapf=4 too.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Hans de Goede [Mon, 2 Jun 2014 15:40:59 +0000 (17:40 +0200)]
samsung-laptop: Add broken-acpi-video quirk for NC210/NC110
Reported (and tested) here:
https://bugzilla.redhat.com/show_bug.cgi?id=861573
Bugzilla: 861573
Upstream-status: Waiting for feedback from reporter
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Adam Jackson [Wed, 13 Nov 2013 15:17:24 +0000 (10:17 -0500)]
drm/i915: hush check crtc state
This is _by far_ the most common backtrace for i915 on retrace.fp.o, and
it's mostly useless noise. There's not enough context when it's generated
to know if something actually went wrong. Downgrade the message to
KMS debugging so we can still get it if we want it.
Bugzilla:
1027037 1028785
Upstream-status: http://lists.freedesktop.org/archives/intel-gfx/2013-November/035948.html
kernel-team@fedoraproject.org [Wed, 6 Feb 2013 14:57:47 +0000 (09:57 -0500)]
ath9k: rx dma stop check
Peter Jones [Thu, 25 Sep 2008 20:23:33 +0000 (16:23 -0400)]
input: silence i8042 noise
Don't print an error message just because there's no i8042 chip.
Some systems, such as EFI-based Apple systems, won't necessarily have an
i8042 to initialize. We shouldn't be printing an error message in this
case, since not detecting the chip is the correct behavior.
Bugzilla: N/A
Upstream-status: Fedora mustard
Chih-Wei Huang [Sun, 28 Dec 2014 08:04:01 +0000 (16:04 +0800)]
Merge branch 'intel' into android-3.18
Chih-Wei Huang [Mon, 1 Dec 2014 17:03:18 +0000 (01:03 +0800)]
staging: binder: correct ptr handling
The bug occurs if CONFIG_ANDROID_BINDER_IPC_32BIT
is not defined in 32-bit kernel.
lan,Tianyu [Sun, 23 Nov 2014 13:22:54 +0000 (21:22 +0800)]
ACPI: Add _DEP(Operation Region Dependencies) support to fix battery issue on the Asus T100TA
ACPI 5.0 introduces _DEP to designate device objects that OSPM should
assign a higher priority in start ordering due to future operation region
accesses.
On Asus T100TA, ACPI battery info are read from a I2C slave device via
I2C operation region. Before I2C operation region handler is installed,
battery _STA always returns 0. There is a _DEP method of designating
start order under battery device node.
This patch is to implement _DEP feature to fix battery issue on the Asus T100TA.
Introducing acpi_dep_list and adding dep_unmet count in the struct
acpi_device. During ACPI namespace scan, create struct acpi_dep_data for a
valid pair of master (device pointed to by _DEP)/slave(device with _DEP), record
master's and slave's ACPI handle in it and put it into acpi_dep_list. The dep_unmet
count will increase by one if there is a device under its _DEP. Driver's probe() should
return EPROBE_DEFER when find dep_unmet is larger than 0. When I2C operation
region handler is installed, remove all struct acpi_dep_data on the acpi_dep_list
whose master is pointed to I2C host controller and decrease slave's dep_unmet.
When dep_unmet decreases to 0, all _DEP conditions are met and then do acpi_bus_attach()
for the device in order to resolve battery _STA issue on the Asus T100TA.
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=69011
Tested-by: Jan-Michael Brummer <jan.brummer@tabos.org>
Tested-by: Adam Williamson <adamw@happyassassin.net>
Tested-by: Michael Shigorin <shigorin@gmail.com>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Chih-Wei Huang [Mon, 17 Nov 2014 12:14:41 +0000 (20:14 +0800)]
android-x86: add an empty Android.mk
It prevents findleaves.py from searching into the subdirectories.
Bastien Nocera [Fri, 31 Oct 2014 16:26:16 +0000 (09:26 -0700)]
Input: add driver for the Goodix touchpanel
Add a driver for the Goodix touchscreen panel found in Onda v975w tablets.
The driver is based off the Android driver gt9xx.c found in some Android
code dumps, but now bears no resemblance to the original driver.
The driver was tested on the aforementioned tablet.
Signed-off-by: Bastien Nocera <hadess@hadess.net>
Tested-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Abbas Raza [Fri, 12 Sep 2014 16:39:06 +0000 (00:39 +0800)]
mmc: card: Skip regular block io operations for RPMB partitions
Idea behind this patch is to skip all the regular block io operations
for RPMB partitions because these are not regular partitions and require
a different command sequence for reading and writing. RPMB partitions
should only be accessed via ioctl. Without this patch we see following
issues with some eMMC devices
dd if=/dev/mmcblk1rpmb of=/dev/null bs=1 count=1
[ 124.185513] mmcblk1rpmb: error -110 transferring data, sector 0, nr 32, cmd response 0x900, card status 0xb00
[ 124.195506] mmcblk1rpmb: retrying using single block read
[ 124.201035] mmcblk1rpmb: timed out sending r/w cmd command, card status 0x400900
[ 124.208559] mmcblk1rpmb: timed out sending r/w cmd command, card status 0x400900
[ 124.216049] mmcblk1rpmb: timed out sending r/w cmd command, card status 0x400900
[ 124.223567] mmcblk1rpmb: timed out sending r/w cmd command, card status 0x400900
[ 124.231087] mmcblk1rpmb: timed out sending r/w cmd command, card status 0x400900
[ 124.238600] mmcblk1rpmb: timed out sending r/w cmd command, card status 0x400900
[ 124.246012] end_request: I/O error, dev mmcblk1rpmb, sector 0
[ 124.251773] Buffer I/O error on device mmcblk1rpmb, logical block 0
[ 124.258065] end_request: I/O error, dev mmcblk1rpmb, sector 8
[ 124.263822] Buffer I/O error on device mmcblk1rpmb, logical block 1
[ 124.270102] end_request: I/O error, dev mmcblk1rpmb, sector 16
[ 124.275944] Buffer I/O error on device mmcblk1rpmb, logical block 2
[ 124.282222] end_request: I/O error, dev mmcblk1rpmb, sector 24
[ 124.288064] Buffer I/O error on device mmcblk1rpmb, logical block 3
[ 129.717711] mmcblk1rpmb: error -110 transferring data, sector 0, nr 8, cmd response 0x900, card status 0xb00
[ 129.727590] mmcblk1rpmb: retrying using single block read
[ 129.733088] mmcblk1rpmb: timed out sending r/w cmd command, card status 0x400900
[ 129.740605] mmcblk1rpmb: timed out sending r/w cmd command, card status 0x400900
[ 129.748121] mmcblk1rpmb: timed out sending r/w cmd command, card status 0x400900
[ 129.755612] mmcblk1rpmb: timed out sending r/w cmd command, card status 0x400900
[ 129.763125] mmcblk1rpmb: timed out sending r/w cmd command, card status 0x400900
[ 129.770639] mmcblk1rpmb: timed out sending r/w cmd command, card status 0x400900
[ 129.778073] end_request: I/O error, dev mmcblk1rpmb, sector 0
[ 129.783834] Buffer I/O error on device mmcblk1rpmb, logical block 0
dd: /dev/mmcblk1rpmb: Input/output error
Chih-Wei Huang [Fri, 12 Sep 2014 13:48:27 +0000 (21:48 +0800)]
HID: input: add asus vendor keys
Adam Williamson [Wed, 10 Sep 2014 00:26:15 +0000 (17:26 -0700)]
support Dell OEM chipset found in Venue 8 Pro (SDIO ID 0271:0418)
Feng Tang [Sun, 12 Jan 2014 23:17:00 +0000 (07:17 +0800)]
x86, tsc: Set the NONSTOP_TSC_S3 feature for ValleyView Soc
BZ: 164108
As it has the same feature as MFLD/CLV/MRFLD.
Change-Id: Ia08c0f4ed0f5bcedf6249d0ee05f5a8a35092e34
Signed-off-by: Feng Tang <feng.tang@intel.com>
Zhang Yanmin [Mon, 17 Jun 2013 22:33:07 +0000 (06:33 +0800)]
init: enable X86_FEATURE_NONSTOP_TSC_S3 on Merrifield platform
BZ: 116849
Change-Id: I2962ac8eb389131d061e79d7a5cf7285ea1c5c8f
Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Reviewed-on: http://android.intel.com:8080/139069
Reviewed-by: Ernst, Eric <eric.ernst@intel.com>
Reviewed-by: Yang, Fei <fei.yang@intel.com>
Tested-by: Ng, Cheon-woei <cheon-woei.ng@intel.com>
Reviewed-by: cactus <cactus@intel.com>
Tested-by: cactus <cactus@intel.com>
Srinivas Pandruvada [Mon, 14 Oct 2013 17:41:32 +0000 (10:41 -0700)]
iio: hid-sensors: Add connection type
Some sensor hub firmware are very strict about the connection type
setting. The connection type specifies whether it is an integrated
or external sensor hub.
By default choosing integrated type unless changed via a module
param.
Change-Id: I32cb8346f048af52a54a5831f129d3bde5d60cd6
For: AXIA-3283
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Signed-off-by: Joakim Nordell <joakim.nordell@intel.com>
Adriana Reus [Tue, 16 Jul 2013 13:32:23 +0000 (16:32 +0300)]
Make sure accelerometer driver returns accordingly if attempted frequency is not valid.
This is a workaround for a suspected firmware issue.
If a bigger value than supported is attempted to be set it is
silently discarded, and the write function in the driver returns normally
even though it was unsuccessfull.
This patch double checks a value by also reading the field and checking if it was
set accordingly.
Issue: AXIA-3061
Change-Id: Ief11af31994e26f4bc9c4d6b05023623192aaa2f
Original-Change-Id: I1b52a1a176079962caedc4f084e57f9765c7f45b
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Chih-Wei Huang [Fri, 5 Sep 2014 13:07:38 +0000 (21:07 +0800)]
HACK: drm: disable GPU authentication
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Chih-Wei Huang [Fri, 8 Aug 2014 19:41:54 +0000 (19:41 +0000)]
HID: ntrig: revert to older version
It is said the version works better for android-x86.
It's provided by Yo Abe <abe.geel@gmail.com>.
Chih-Wei Huang [Thu, 23 Jan 2014 02:47:22 +0000 (10:47 +0800)]
usbnet: [TEMP HACK] force the interface name to ethX
Currently the android framework only recognizes ethX as the
Ethernet interface name.
Chih-Wei Huang [Fri, 1 Nov 2013 10:52:32 +0000 (18:52 +0800)]
ACPICA: Add Android-IA string for _OSI method
This change adds a new _OSI string "Android-IA" for ASUS BIOS
to query if the OS supports Android features.
Per Persson [Fri, 17 Jan 2014 14:48:33 +0000 (13:48 -0100)]
REVERTME: hid-sensors: Set default unit of measure
For PROP_REPORT_INTERVAL, the default unit of measure is set to
milliseconds instead of zero.
This patch is a workaround, which changes the default value if it is
zero. The proper solution should be to initiate with correct default
value. There might be other parameters that need a change in default
value as well. How that is best done needs to be investigated further.
Tracked-By: APDEV-1124
Issue: APDEV-1000
Change-Id: I6df27a7612499f93d65b4cccecf9677005315eb7
Signed-off-by: Per Persson <per.persson@intel.com>
juntingwang [Mon, 7 Jan 2013 10:22:57 +0000 (18:22 +0800)]
Camera: Fix camera problem when reboot
Fix problem camera led remains active after reboot
The camera is an USB camera. When system reboot the usb
bus is not powered off, so camera remains active. Camera
led will be closed untill the system init and reset devices.
To resolve this bug, we need to register a reboot notifier
in camera driver, so that camera can receive "restart" notifier
when system reboot, it will call notifier callback function
to close the camera led.
Issue: AXIA-1417
Change-Id: Ia6cc19d645419f7dfea9e3fa4ebb67b583eaddda
Signed-off-by: juntingwang <Junting.Wang@windriver.com>
Daniel Leung [Fri, 4 Jan 2013 19:26:54 +0000 (11:26 -0800)]
iio: hid-sensor-accel-3d: add alternate sensitivity property
The sensor hub on some devices (e.g. Acer W700 tablet) advertises
another property as the sensitivity change control. This property
is also defined in the HID sensor hub document HUTRR39b.
This patch lets the sensor driver picks the new property to use
as sensitivity if the original one does not exist.
For: AXIA-1451
Change-Id: I9369c0e908be9f999de437ad6ba40712fc902f3d
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Daniel Leung [Fri, 4 Jan 2013 17:38:23 +0000 (09:38 -0800)]
HID: hid-sensor-hub: do not process feature reports in raw_event
In sensor_hub_raw_event(), feature reports are ignored but are still
marked as processed. This causes the in-kernel struct not to be
updated. Any non-updated fields in the feature reports are zero, and
they are being sent to the device. This causes confusion in the sensor
hub firmware, and some sensors are not powered up as a result.
This changes the raw_event rountine to only process input reports,
and let the hid core handle the incoming feature reports.
For: AXIA-1451
Change-Id: I0f246afd1d773aa9c07a4333ccf2e7f2a2c35278
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Daniel Leung [Thu, 12 Jul 2012 22:09:34 +0000 (15:09 -0700)]
Enable compat_ioctl for Android alarm dev
The compat_ioctl is missing in Android alarm dev for 32/64-bit
compatibility.
Change-Id: I85712950a37ce1092b8820f5eabed83ead5ab271
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Daniel Leung [Thu, 30 Aug 2012 20:06:16 +0000 (13:06 -0700)]
[DO NOT UPSTREAM] Skip creating subsystem/ in sysfs nodes
Some not-so-well-designed Android apps try to recursively read
the sysfs nodes, e.g., cpu information. The subsystem/ node
sometimes is a symlink back to itself, and this causes these
apps to run out of memory iterating all the nodes.
This patch skips the creation of the subsystem nodes if it is
building for Android devices. There should not be any ill-effects
as Android userspace does not look at the subsystem nodes.
Issue: AXIA-629
Change-Id: I748c8b2fde85161e55b006319d46e8e6bbe4eb43
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
srinivas pandruvada [Fri, 3 Aug 2012 20:50:08 +0000 (13:50 -0700)]
ACPI: Power button event after resume
When system is resumed because of user pressed a power button,
this event is not passed to user space. This event is important
to resume user mode in some systems like Android.
This is built on the patch from "Daniel Drake" for OLPC.
We need some mechanism where user space doesn't have to use polling.
If we resort to polling to get the wake up source, because of
auto-suspend mode system sleep before user mode can complete polling.
Change-Id: I2901f543492d1454b0ceefc96da740215f3a3b10
Signed-off-by: srinivas pandruvada <srinivas.pandruvada@intel.com>
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Andy Ross [Thu, 28 Mar 2013 18:29:41 +0000 (11:29 -0700)]
binder: handle syscall restart in BINDER_WRITE_READ ioctl
The blocking wait in the "read" half of the ioctl could wake up on
signal delivery, and the default ERESTARTSYS handling would cause the
whole syscall to restart resulting in a doubled write.
Issue: AXIA-1880
Change-Id: Id49e4a088d08feca63bff43d28be6530820d9c3d
Signed-off-by: Andy Ross <andy.ross@windriver.com>
Matt Gumbel [Fri, 18 Jan 2013 17:42:11 +0000 (09:42 -0800)]
efibc: EFI Bootloader control driver
Android userspace tells the kernel that it wants to boot into recovery
or some other non-default OS environment by passing a string argument
to reboot(). It is left to the OEM to hook this up to their specific
bootloader.
This driver uses an EFI variable to communicate the next boot target.
It is the bootloader's job to guard against this variable being
uninitialzed or containing invalid data, and just boot normally if that
is the case.
Signed-off-by: Matt Gumbel <matthew.k.gumbel@intel.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Andy Ross [Thu, 6 Dec 2012 21:27:34 +0000 (13:27 -0800)]
vt: add init_hide parameter to suppress boot output
When vt.init_hide=1 is set, suppress output on newly created consoles
until an affirmative switched to that console. This prevents boot
output from displaying (and clobbering splash screens, etc...) without
disabling the console entirely.
For: AXIA-453
Change-Id: I6bb121bb64a7e2e55e6bfcc9b95e2c0446dd850d
Signed-off-by: Andy Ross <andy.ross@windriver.com>
Ruchi Kandoi [Wed, 15 Oct 2014 00:43:21 +0000 (17:43 -0700)]
power: Avoids bogus error messages for the suspend aborts.
Avoids printing bogus error message "tasks refusing to freeze", in cases
where pending wakeup source caused the suspend abort.
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
Change-Id: I913ad290f501b31cd536d039834c8d24c6f16928
AKASHI Takahiro [Thu, 4 Sep 2014 14:34:14 +0000 (15:34 +0100)]
asm-generic: add generic seccomp.h for secure computing mode 1
Note: This patch is from v6 of Takahiro's proposed
"arm64: add seccomp support" patchset (leecam@google.com)
Those values (__NR_seccomp_*) are used solely in secure_computing()
to identify mode 1 system calls. If compat system calls have different
syscall numbers, asm/seccomp.h may override them.
Acked-by: Arnd Bergmann <arnd <at> arndb.de>
Signed-off-by: AKASHI Takahiro <takahiro.akashi <at> linaro.org>
Greg Hackmann [Mon, 15 Sep 2014 22:34:55 +0000 (15:34 -0700)]
android: base-cfg: enable ARMV7_COMPAT
Enables backwards-compatibility features on arm64, and has no effect
(does not exist) on other architectures
Change-Id: I6fc2f6567437750a0032f8a39a9cde1fb92d4ef4
Signed-off-by: Greg Hackmann <ghackmann@google.com>
JP Abgrall [Thu, 4 Sep 2014 00:36:44 +0000 (17:36 -0700)]
android: base-cfg: enforce the needed XFRM_MODE_TUNNEL (for VPN)
Change-Id: I587023d56877d32806079676790751155c768982
Signed-off-by: JP Abgrall <jpa@google.com>
Laura Abbott [Fri, 24 Jan 2014 23:19:49 +0000 (15:19 -0800)]
staging: android: ashmem: Avoid deadlock with mmap/shrink
Both ashmem_mmap and ashmem_shrink take the ashmem_lock. It may
be possible for ashmem_mmap to invoke ashmem_shrink:
-000|mutex_lock(lock = 0x0)
-001|ashmem_shrink(?, sc = 0x0) <--- try to take ashmem_mutex again
-002|shrink_slab(shrink = 0xDA5F1CC0, nr_pages_scanned = 0, lru_pages
-002|=
-002|124)
-003|try_to_free_pages(zonelist = 0x0, ?, ?, ?)
-004|__alloc_pages_nodemask(gfp_mask = 21200, order = 1, zonelist =
-004|0xC11D0940,
-005|new_slab(s = 0xE4841E80, ?, node = -1)
-006|__slab_alloc.isra.43.constprop.50(s = 0xE4841E80, gfpflags =
-006|
2148925462, ad
-007|kmem_cache_alloc(s = 0xE4841E80, gfpflags = 208)
-008|shmem_alloc_inode(?)
-009|alloc_inode(sb = 0xE480E800)
-010|new_inode_pseudo(?)
-011|new_inode(?)
-012|shmem_get_inode(sb = 0xE480E800, dir = 0x0, ?, dev = 0, flags =
-012|187)
-013|shmem_file_setup(?, ?, flags = 187)
-014|ashmem_mmap(?, vma = 0xC5D64210) <---- Acquire ashmem_mutex
-015|mmap_region(file = 0xDF8E2C00, addr =
1772974080, len = 233472,
-015|flags = 57,
-016|sys_mmap_pgoff(addr = 0, len = 230400, prot = 3, flags = 1, fd =
-016|157, pgoff
-017|ret_fast_syscall(asm)
-->|exception
-018|NUR:0x40097508(asm)
---|end of frame
Avoid this deadlock by using mutex_trylock in ashmem_shrink; if the mutex
is already held, do not attempt to shrink.
Change-Id: I222bbf55856d5849da813b730de0636c80966c8e
Reported-by: Matt Wagantall <mattw@codeaurora.org>
Reported-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Reported-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
Reported-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
JP Abgrall [Wed, 23 Jul 2014 23:55:07 +0000 (16:55 -0700)]
ext4: Add support for FIDTRIM, a best-effort ioctl for deep discard trim
* What
This provides an interface for issuing an FITRIM which uses the
secure discard instead of just a discard.
Only the eMMC command is "secure", and not how the FS uses it:
due to the fact that the FS might reassign a region somewhere else,
the original deleted data will not be affected by the "trim" which only
handles un-used regions.
So we'll just call it "deep discard", and note that this is a
"best effort" cleanup.
* Why
Once in a while, We want to be able to cleanup most of the unused blocks
after erasing a bunch of files.
We don't want to constantly secure-discard via a mount option.
From an eMMC spec perspective, it tells the device to really get rid of
all the data for the specified blocks and not just put them back into the
pool of free ones (unlike the normal TRIM). The eMMC spec says the
secure trim handling must make sure the data (and metadata) is not available
anymore. A simple TRIM doesn't clear the data, it just puts blocks in the
free pool.
JEDEC Standard No. 84-A441
7.6.9 Secure Erase
7.6.10 Secure Trim
From an FS perspective, it is acceptable to leave some data behind.
- directory entries related to deleted files
- databases entries related to deleted files
- small-file data stored in inode extents
- blocks held by the FS waiting to be re-used (mitigated by sync).
- blocks reassigned by the FS prior to FIDTRIM.
Change-Id: I676a1404a80130d93930c84898360f2e6fb2f81e
Signed-off-by: Geremy Condra <gcondra@google.com>
Signed-off-by: JP Abgrall <jpa@google.com>
Daniel Rosenberg [Fri, 27 Jun 2014 23:39:35 +0000 (16:39 -0700)]
input: Made keyreset more robust
Switched do_restart to run in a seperate workqueue to handle
cases where kernel_restart hangs.
Change-Id: I1ecd61f8d0859f1a86d37c692351d644b5db9c69
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Stephen Smalley [Tue, 23 Jul 2013 21:38:41 +0000 (17:38 -0400)]
SELinux: Enable setting security contexts on rootfs inodes.
rootfs (ramfs) can support setting of security contexts
by userspace due to the vfs fallback behavior of calling
the security module to set the in-core inode state
for security.* attributes when the filesystem does not
provide an xattr handler. No xattr handler required
as the inodes are pinned in memory and have no backing
store.
This is useful in allowing early userspace to label individual
files within a rootfs while still providing a policy-defined
default via genfs.
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
Mark Salyzyn [Fri, 6 Jun 2014 19:06:42 +0000 (12:06 -0700)]
android: base-cfg: disable LOGGER
Bug:
15384806
Change-Id: If8d324ffdb4ebd56e5d68876f8e229547e20eaf4
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Daniel Rosenberg [Wed, 7 May 2014 21:17:47 +0000 (14:17 -0700)]
input: Changed keyreset to act as a wrapper for keycombo.
keyreset now registers a keycombo driver that acts as the old
keyreset driver acted.
Change-Id: I08f5279e3a33b267571b699697f9f54508868983
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Daniel Rosenberg [Wed, 7 May 2014 23:52:10 +0000 (16:52 -0700)]
input: add keycombo, a general key combo driver.
Keycombo lets you provide a key up and key down function, and an
optional time delay for key down. The driver will call the key
down function after the specified key combo has been held for the
speicified time delay. After you release the combo, if the key down
has happened, it calls key up.
Change-Id: I6a9a94e96a8f58fadd908fd1dc7944b9102a089f
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Arve Hjønnevåg [Sat, 3 May 2014 03:23:21 +0000 (20:23 -0700)]
pstore/ram: Add ramoops_console_write_buf api
Allow writing into the ramoops console buffer.
Change-Id: Iff0d69b562e4dae33ea7f8d19412227bebb17e47
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Ruchi Kandoi [Thu, 24 Apr 2014 21:31:57 +0000 (14:31 -0700)]
Power: Changes the permission to read only for sysfs file
/sys/kernel/wakeup_reasons/last_resume_reason
Change-Id: I8ac568a7cb58c31decd379195de517ff3c6f9c65
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
Colin Cross [Thu, 7 Mar 2013 03:10:29 +0000 (19:10 -0800)]
of: fix CONFIG_CMDLINE_EXTEND
strlcat takes the size of the buffer, not the number of characters
to concatenate. If the size of the device tree command line p is
larger than the CONFIG_CMDLINE string data, then strcat(data, p, l)
will hit a BUG_ON because strlen(data) > l.
Replace the second strlcat with a strncpy plus a manual null
termination.
Also rearrange the code to reduce indent depth to make it more
readable, and replace data with a char *cmdline to avoid extra
casts.
Signed-off-by: Colin Cross <ccross@android.com>
Doug Anderson [Fri, 3 Feb 2012 06:58:28 +0000 (22:58 -0800)]
of: Support CONFIG_CMDLINE_EXTEND config option
The old logic assumes CMDLINE_FROM_BOOTLOADER vs. CMDLINE_FORCE and
ignores CMDLINE_EXTEND. Here's the old logic:
- CONFIG_CMDLINE_FORCE=true
CONFIG_CMDLINE
- dt bootargs=non-empty:
dt bootargs
- dt bootargs=empty, @data is non-empty string
@data is left unchanged
- dt bootargs=empty, @data is empty string
CONFIG_CMDLINE (or "" if that's not defined)
The new logic is now documented in of_fdt.h and is copied here for
reference:
- CONFIG_CMDLINE_FORCE=true
CONFIG_CMDLINE
- CONFIG_CMDLINE_EXTEND=true, @data is non-empty string
@data + dt bootargs (even if dt bootargs are empty)
- CONFIG_CMDLINE_EXTEND=true, @data is empty string
CONFIG_CMDLINE + dt bootargs (even if dt bootargs are empty)
- CMDLINE_FROM_BOOTLOADER=true, dt bootargs=non-empty:
dt bootargs
- CMDLINE_FROM_BOOTLOADER=true, dt bootargs=empty, @data is non-empty string
@data is left unchanged
- CMDLINE_FROM_BOOTLOADER=true, dt bootargs=empty, @data is empty string
CONFIG_CMDLINE (or "" if that's not defined)
Signed-off-by: Doug Anderson <dianders@chromium.org>
CC: devicetree-discuss@lists.ozlabs.org
CC: Grant Likely <grant.likely@secretlab.ca>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: Rob Herring <rob.herring@calxeda.com>
Change-Id: I40ace250847f813358125dfcaa8998fd32cf7ea3
Signed-off-by: Colin Cross <ccross@android.com>
Greg Hackmann [Mon, 10 Mar 2014 21:21:30 +0000 (14:21 -0700)]
power: wakeup_reason: rename irq_count to irqcount
On x86, irq_count conflicts with a declaration in
arch/x86/include/asm/processor.h
Change-Id: I3e4fde0ff64ef59ff5ed2adc0ea3a644641ee0b7
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Ruchi Kandoi [Fri, 7 Mar 2014 20:54:30 +0000 (12:54 -0800)]
Power: Add guard condition for maximum wakeup reasons
Ensure the array for the wakeup reason IRQs does not overflow.
Change-Id: Iddc57a3aeb1888f39d4e7b004164611803a4d37c
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
(cherry picked from commit
b5ea40cdfcf38296535f931a7e5e7bf47b6fad7f)
JP Abgrall [Fri, 28 Feb 2014 03:38:14 +0000 (19:38 -0800)]
android: base-cfg: enable DM_VERITY (used for secureboot)
Change-Id: I68d769f97ffa76bb45e65d34a96dd7f558c02d08
Signed-off-by: JP Abgrall <jpa@google.com>
Arve Hjønnevåg [Fri, 14 Feb 2014 04:25:06 +0000 (20:25 -0800)]
Staging: android: binder: More offset validation.
Make sure offsets don't point to overlapping flat_binder_object
structs.
Change-Id: I425ab0c46fbe2b00ed679c5becf9e8140395eb40
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Ruchi Kandoi [Fri, 21 Feb 2014 03:47:38 +0000 (19:47 -0800)]
POWER: fix compile warnings in log_wakeup_reason
Change I81addaf420f1338255c5d0638b0d244a99d777d1 introduced compile
warnings, fix these.
Change-Id: I05482a5335599ab96c0a088a7d175c8d4cf1cf69
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
Ruchi Kandoi [Wed, 19 Feb 2014 23:30:47 +0000 (15:30 -0800)]
Power: add an API to log wakeup reasons
Add API log_wakeup_reason() and expose it to userspace via sysfs path
/sys/kernel/wakeup_reasons/last_resume_reason
Change-Id: I81addaf420f1338255c5d0638b0d244a99d777d1
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
Rom Lemarchand [Thu, 20 Feb 2014 02:01:37 +0000 (18:01 -0800)]
android: configs: add systrace support to recommended configs
Change-Id: I4a6e88f47803e88b0ce2d913be4aeb299ca858b4
Signed-off-by: Rom Lemarchand <romlem@android.com>
Rom Lemarchand [Tue, 28 Jan 2014 18:23:19 +0000 (10:23 -0800)]
android: configs: update 3.10 options
Change-Id: Ifbda55e570a22ace98d7d74b057ba21a597e0826
Ashish Sharma [Thu, 16 Jan 2014 00:47:16 +0000 (16:47 -0800)]
android: configs: Add CONFIG_NETFILTER_XT_TARGET_IDLETIMER
Signed-off-by: Ashish Sharma <ashishsharma@google.com>
(cherry picked from commit
5621df1091c7e103bca6cdd1dbecf4333efad4e7)
Change-Id: I3104266fa648fc024fee45f1ce9800142898baf7
JP Abgrall [Tue, 7 Jan 2014 22:25:28 +0000 (14:25 -0800)]
android: configs: add IPV6 ROUTE INFO
Change-Id: I54cba86bce703647c4be8eee5592d55374ad02ef
Signed-off-by: JP Abgrall <jpa@google.com>
(cherry picked from commit
5e35d662616142d308ce24c9d552e469f60d8695)
JP Abgrall [Fri, 27 Dec 2013 23:20:32 +0000 (15:20 -0800)]
android: configs: add TIMER_STATS back, helps with sysrq t.
Change-Id: I8fe033090e38523152225dcfb7a1828f530a0757
Signed-off-by: JP Abgrall <jpa@google.com>
(cherry picked from commit
7aee29d6482954ac9fecae3ce8a90b6759158107)
Michael Wright [Wed, 4 Dec 2013 23:23:41 +0000 (15:23 -0800)]
android: configs: Add HIDRAW to recommended set
The Logitech unifying driver depends on hidraw being available.
Recommending one without the other will cause the Logitech driver to
silently fail when connecting Logitech devices.
Change-Id: I92ed2b6803537d9da6eed7fcada8f329cb4469a2
Signed-off-by: Michael Wright <michaelwr@google.com>
JP Abgrall [Sat, 23 Nov 2013 01:29:57 +0000 (17:29 -0800)]
android: configs: require TCPMSS, remove SCHED_TRACER and TIMER_STATS
TCPMSS is required for the Android Vpn service to correctly
handle the MTU on tun/ppp devices. Bug:
11579326
We don't really need SCHED_TRACER and the TIMER_STATS.
Change-Id: I10c5767a6324a496713752d4fe9eff361dc8e06a
(cherry picked from commit
23f01e8e81f3c53985958fa291b39c84293ad047)
JP Abgrall [Fri, 22 Nov 2013 22:07:03 +0000 (14:07 -0800)]
android: configs: Reorder config fragments, update README
Change-Id: I5ee4b794dcc00f74f26562e49a406ea292af63ee
(cherry picked from commit
9ebedefd06142c9bc812bfa23401031525002a76)
Colin Cross [Thu, 7 Nov 2013 21:19:34 +0000 (13:19 -0800)]
net: move PPPoLAC and PPPoPNS headers to uapi
Move the entire contents of the linux/if_pppolac.h and
linux/if_pppopns.h headers to uapi, they only contain userspace
interfaces.
Change-Id: I3cfed7f2ae400b53269a1f59144aa3dbc30ae0b5
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Thu, 7 Nov 2013 20:46:33 +0000 (12:46 -0800)]
input: misc: keychord: move header to uapi
Move the entire contents of linux/keychord.h header to uapi, it only
contains a userspace interface.
Change-Id: If94f83328b19efb58c66391dce3bd8e927788d8d
Signed-off-by: Colin Cross <ccross@android.com>
Qiao Zhou [Thu, 31 Oct 2013 01:36:50 +0000 (09:36 +0800)]
drivers: switch: remove S_IWUSR from dev_attr
it doesn't need S_IWUSR attribute since xxx_store API is un-needed.
otherwise the WARN check in device_create_file will alert.
Change-Id: I6360bf022dcd659bfb3f41c84624f954d5d15ea5
Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Rik van Riel [Thu, 1 Sep 2011 19:26:50 +0000 (15:26 -0400)]
add extra free kbytes tunable
Add a userspace visible knob to tell the VM to keep an extra amount
of memory free, by increasing the gap between each zone's min and
low watermarks.
This is useful for realtime applications that call system
calls and have a bound on the number of allocations that happen
in any short time period. In this application, extra_free_kbytes
would be left at an amount equal to or larger than than the
maximum number of allocations that happen in any burst.
It may also be useful to reduce the memory use of virtual
machines (temporarily?), in a way that does not cause memory
fragmentation like ballooning does.
[ccross]
Revived for use on old kernels where no other solution exists.
The tunable will be removed on kernels that do better at avoiding
direct reclaim.
Change-Id: I765a42be8e964bfd3e2886d1ca85a29d60c3bb3e
Signed-off-by: Rik van Riel<riel@redhat.com>
Signed-off-by: Colin Cross <ccross@android.com>
John Stultz [Tue, 9 Apr 2013 17:30:26 +0000 (10:30 -0700)]
pstore: Update Documentation/android.txt
Update Documentation/android.txt to reference PSTORE_CONSOLE
and PSTORE_RAM instead of ANDROID_RAM_CONSOLE
Change-Id: I2c56e73f8c65c3ddbe6ddbf1faadfacb42a09575
Reported-by: Jon Medhurst (Tixy) <tixy@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Colin Cross [Mon, 6 May 2013 23:50:17 +0000 (23:50 +0000)]
select: use freezable blocking call
Avoid waking up every thread sleeping in a select call during
suspend and resume by calling a freezable blocking call. Previous
patches modified the freezer to avoid sending wakeups to threads
that are blocked in freezable blocking calls.
This call was selected to be converted to a freezable call because
it doesn't hold any locks or release any resources when interrupted
that might be needed by another freezing task or a kernel driver
during suspend, and is a common site where idle userspace tasks are
blocked.
Change-Id: I0d7565ec0b6bc5d44cb55f958589c56e6bd16348
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Colin Cross [Mon, 6 May 2013 23:50:16 +0000 (23:50 +0000)]
epoll: use freezable blocking call
Avoid waking up every thread sleeping in an epoll_wait call during
suspend and resume by calling a freezable blocking call. Previous
patches modified the freezer to avoid sending wakeups to threads
that are blocked in freezable blocking calls.
This call was selected to be converted to a freezable call because
it doesn't hold any locks or release any resources when interrupted
that might be needed by another freezing task or a kernel driver
during suspend, and is a common site where idle userspace tasks are
blocked.
Change-Id: I848d08d28c89302fd42bbbdfa76489a474ab27bf
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
JP Abgrall [Fri, 7 Jun 2013 22:23:31 +0000 (15:23 -0700)]
android: configs: no MODULES for base, no SIP for recommended
We don't like CONFIG_MODULES anymore.
Connection tracker handling of large SIP fails.
Change-Id: Ie3c65aefcc6181752d6656c97e63035e5b5653ff
Signed-off-by: JP Abgrall <jpa@google.com>
JP Abgrall [Fri, 7 Jun 2013 18:56:34 +0000 (11:56 -0700)]
android: configs: Reorder config fragments
Because there is not tool to consistently generate these config
fragments, lets keep the alphabetical instead of random.
Change-Id: I0f098f6be6bdd272544295a3d5a48d04411e4514
Signed-off-by: JP Abgrall <jpa@google.com>
Rom Lemarchand [Fri, 31 May 2013 18:54:35 +0000 (11:54 -0700)]
android: configs: Enable KSM support by default
This will be a noop unless the KSM thread is enabled by userspace
Change-Id: Ia5fde14504cc0da50522e2f875d8d021f9e054ba
Signed-off-by: Rom Lemarchand <romlem@google.com>
Michael Wright [Wed, 8 May 2013 21:50:11 +0000 (14:50 -0700)]
android: configs: Add Logitech unifying receivers to recommended
Change-Id: I7647cd7037731df69dfdd513a0808b396d9d5bdd
Signed-off-by: Michael Wright <michaelwr@android.com>
Colin Cross [Fri, 3 May 2013 21:57:29 +0000 (14:57 -0700)]
lowmemorykiller: make default lowmemorykiller debug message useful
lowmemorykiller debug messages are inscrutable and mostly useful
for debugging the lowmemorykiller, not explaining why a process
was killed. Make the messages more useful by prefixing them
with "lowmemorykiller: " and explaining in more readable terms
what was killed, who it was killed for, and why it was killed.
The messages now look like:
[ 76.997631] lowmemorykiller: Killing 'droid.gallery3d' (2172), adj 1000,
[ 76.997635] to free 27436kB on behalf of 'kswapd0' (29) because
[ 76.997638] cache 122624kB is below limit 122880kB for oom_score_adj 1000
[ 76.997641] Free memory is -53356kB above reserved
A negative number for free memory above reserved means some of the
reserved memory has been used and is being regenerated by kswapd,
which is likely what called the shrinkers.
Change-Id: I1fe983381e73e124b90aa5d91cb66e55eaca390f
Signed-off-by: Colin Cross <ccross@android.com>
Rom Lemarchand [Wed, 6 Feb 2013 23:49:47 +0000 (15:49 -0800)]
android: configs: Initial commit of Android config fragments
- Add 2 files that contain the minimal and recommended kernel config
options respectively.
- Add a README to explain their purpose and how to use them to
generate a device config compatible with Android.
Change-Id: I3a4883f3b04d2820e90ceb3c4d02390d6458d6ce
Signed-off-by: Rom Lemarchand <romlem@google.com>
Jamie Gennis [Fri, 19 Apr 2013 03:36:21 +0000 (20:36 -0700)]
trace/events: fix gpu event timestamp formatting
This change fixes the how the gpu_sched_switch timestamp field is formatted.
Signed-off-by: Jamie Gennis <jgennis@google.com>
Change-Id: I273234935254ed15772c9e561c9af20e480004ae
JP Abgrall [Tue, 5 Mar 2013 22:25:36 +0000 (14:25 -0800)]
input: misc: keychord: log when keychord triggered
log keychord id at info level just before waking up processes.
Signed-off-by: JP Abgrall <jpa@google.com>
Jamie Gennis [Fri, 22 Feb 2013 01:55:28 +0000 (17:55 -0800)]
trace/events: add gpu trace events
Change-Id: I0607b9c776acf61cb796b8572cf8cfb8b2dc1377
Signed-off-by: Jamie Gennis <jgennis@google.com>
Erik Gilling [Fri, 14 Sep 2012 21:36:34 +0000 (14:36 -0700)]
sync: add Documentation/sync.txt
Change-Id: Ic7f3a6d4622083be607b82ddd8d676609225bb8f
Signed-off-by: Erik Gilling <konkers@android.com>
Chih-Wei Huang [Fri, 12 Dec 2014 15:42:38 +0000 (23:42 +0800)]
mm: vmscan: Add a debug file for shrinkers
This patch adds a debugfs file called "shrinker" when read this calls
all the shrinkers in the system with nr_to_scan set to zero and prints
the result. These results are the number of objects the shrinkers have
available and can thus be used an indication of the total memory
that would be availble to the system if a shrink occurred.
Change-Id: Ied0ee7caff3d2fc1cb4bb839aaafee81b5b0b143
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Arve Hjønnevåg [Wed, 26 Sep 2012 00:37:14 +0000 (17:37 -0700)]
staging: android: lowmemorykiller: Add config option to support oom_adj values
The conversion to use oom_score_adj instead of the deprecated oom_adj
values breaks existing user-space code. Add a config option to convert
oom_adj values written to oom_score_adj values if they appear to be
valid oom_adj values.
Change-Id: I68308125059b802ee2991feefb07e9703bc48549
Signed-off-by: Arve Hjønnevåg <arve@android.com>
JP Abgrall [Thu, 20 Sep 2012 23:34:10 +0000 (16:34 -0700)]
net: PPPoPNS and PPPoLAC update to use PPP_MRU instead of PPP_MRU
Some headers files were moved around and some defines renamed.
Signed-off-by: JP Abgrall <jpa@google.com>
Todd Poynor [Wed, 30 May 2012 00:33:56 +0000 (17:33 -0700)]
PM / Suspend: Print wall time at suspend entry and exit
Change-Id: I92f252414c013b018b9a392eae1ee039aa0e89dc
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Wed, 24 Aug 2011 22:01:30 +0000 (15:01 -0700)]
fuse: Freeze client on suspend when request sent to userspace
Suspend attempts can abort when the FUSE daemon is already frozen
and a client is waiting uninterruptibly for a response, causing
freezing of tasks to fail.
Use the freeze-friendly wait API, but disregard other signals.
Change-Id: Icefb7e4bbc718ccb76bf3c04daaa5eeea7e0e63c
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Jeff Brown [Sun, 24 Jul 2011 21:31:14 +0000 (14:31 -0700)]
hid-multitouch: Filter collections by application usage.
This change fixes two problems.
First, it ensures that the hid-multitouch driver does not incorrectly
map GenericDesktop usages that are intended for other applications,
such as a Mouse.
Second, it sets the appropriate input properties so that user-space
can distinguish TouchScreen devices (INPUT_PROP_DIRECT) from
TouchPad devices (INPUT_PROP_POINTER) and configure them accordingly.
Change-Id: I8c2d947929186ffe7cf04b37c76e29b9abecf8cb
Signed-off-by: jeffbrown@android.com
Chia-chi Yeh [Fri, 15 Apr 2011 22:22:09 +0000 (15:22 -0700)]
net: Reorder incoming packets in PPPoLAC and PPPoPNS.
PPP handles packet loss but does not work with out of order packets.
This change performs reordering of incoming data packets within a
sliding window of one second. Since sequence number is optional,
receiving a packet without it will drop all queued packets.
Currently the logic is triggered by incoming packets, so queued
packets have to wait till another packet is arrived. It is done for
simplicity since no additional locks or threads are required. For
reliable protocols, a retransmission will kick it. For unreliable
protocols, queued packets just seem like packet loss. Time-critical
protocols might be broken, but they never work with queueing anyway.
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
Todd Poynor [Thu, 16 Jun 2011 00:21:57 +0000 (17:21 -0700)]
Move x86_64 idle notifiers to generic
Move the x86_64 idle notifiers originally by Andi Kleen and Venkatesh
Pallipadi to generic.
Change-Id: Idf29cda15be151f494ff245933c12462643388d5
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Brian Swetland [Thu, 21 Oct 2010 21:19:31 +0000 (14:19 -0700)]
staging: remove Greg's TODO, now obsolete.
Signed-off-by: Brian Swetland <swetland@google.com>
San Mehat [Thu, 6 May 2010 22:40:07 +0000 (15:40 -0700)]
staging: android: lowmemorykiller: Fix task_struct leak
As it turns out, the CONFIG_PROFILING interfaces leak a
task struct if the notifier chain returns NOTIFY_OK.. doh.
This patch reworks lowmemkiller to use the new generic task
free notifier chain.
Signed-off-by: San Mehat <san@google.com>
San Mehat [Thu, 6 May 2010 22:37:55 +0000 (15:37 -0700)]
sched: Add a generic notifier when a task struct is about to be freed
This patch adds a notifier which can be used by subsystems that may
be interested in when a task has completely died and is about to
have it's last resource freed.
The Android lowmemory killer uses this to determine when a task
it has killed has finally given up its goods.
Signed-off-by: San Mehat <san@google.com>
San Mehat [Sat, 10 Oct 2009 16:35:24 +0000 (09:35 -0700)]
block: genhd: Add disk/partition specific uevent callbacks for partition info
For disk devices, a new uevent parameter 'NPARTS' specifies the number
of partitions detected by the kernel. Partition devices get 'PARTN' which
specifies the partitions index in the table, and 'PARTNAME', which
specifies PARTNAME specifices the partition name of a partition device
Signed-off-by: Dima Zavin <dima@android.com>
San Mehat [Wed, 16 Sep 2009 19:39:10 +0000 (12:39 -0700)]
proc: smaps: Allow smaps access for CAP_SYS_RESOURCE
Signed-off-by: San Mehat <san@google.com>
Nick Pelly [Fri, 5 Dec 2008 01:37:05 +0000 (17:37 -0800)]
rfkill: Introduce CONFIG_RFKILL_PM and use instead of CONFIG_PM to power down
Some platforms do not want to power down rfkill devices on suspend.
Change-Id: I62a11630521c636d54a4a02ab9037a43435925f5
Signed-off-by: Nick Pelly <npelly@google.com>
Chia-chi Yeh [Thu, 18 Jun 2009 23:15:05 +0000 (07:15 +0800)]
security: Add AID_NET_RAW and AID_NET_ADMIN capability check in cap_capable().
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
Chia-chi Yeh [Fri, 12 Jun 2009 18:29:04 +0000 (02:29 +0800)]
net: PPPoPNS and PPPoLAC fixes.
net: Fix a bitmask in PPPoPNS and rename constants in PPPoPNS and PPPoLAC.
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
net: Fix a potential deadlock while releasing PPPoLAC/PPPoPNS socket.
PPP driver guarantees that no thread will be executing start_xmit() after
returning from ppp_unregister_channel(). To achieve this, a spinlock (downl)
is used. In pppolac_release(), ppp_unregister_channel() is called after sk_udp
is locked. At the same time, another thread might be running in pppolac_xmit()
with downl. Thus a deadlock will occur if the thread tries to lock sk_udp.
The same situation might happen on sk_raw in pppopns_release().
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
net: Force PPPoLAC and PPPoPNS to bind an interface before creating PPP channel.
It is common to manipulate the routing table after configuring PPP device.
Since both PPPoLAC and PPPoPNS run over IP, care must be taken to make sure
that there is no loop in the routing table.
Although this can be done by adding a host route, it might still cause
problems when the interface is down for some reason.
To solve this, this patch forces both drivers to bind an interface before
creating PPP channel, so the system will not re-route the tunneling sockets
to another interface when the original one is down. Another benefit is that
now the host route is no longer required, so there is no need to remove it
when PPP channel is closed.
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
net: Avoid sleep-inside-spinlock in PPPoLAC and PPPoPNS.
Since recv() and xmit() are called with a spinlock held, routines which might
sleep cannot be used. This issue is solved by following changes:
Incoming packets are now processed in backlog handler, recv_core(), instead of
recv(). Since backlog handler is always executed with socket spinlock held, the
requirement of ppp_input() is still satisfied.
Outgoing packets are now processed in workqueue handler, xmit_core(), instead of
xmit(). Note that kernel_sendmsg() is no longer used to prevent touching dead
sockets.
In release(), lock_sock() and pppox_unbind_sock() ensure that no thread is in
recv_core() or xmit(). Then socket handlers are restored before release_sock(),
so no packets will leak in backlog queue.
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
net: Fix msg_iovlen in PPPoLAC and PPPoPNS.
Although any positive value should work (which is always true in both drivers),
the correct value should be 1.
Signed-off-by: Chia-chi Yeh <chiachi@android.com>