Age | Commit message (Collapse) | Author |
|
Before this patch, a process with some permissive seccomp filter
that was applied by root without NO_NEW_PRIVS was able to add
more filters to itself without setting NO_NEW_PRIVS by setting
the new filter from a throwaway thread with NO_NEW_PRIVS.
Signed-off-by: Jann Horn <jann@thejh.net>
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Bug: 27892194
Patchset: seccomp
(cherry picked from commit 103502a35cfce0710909da874f092cb44823ca03)
Signed-off-by: Kees Cook <keescook@google.com>
Change-Id: I5a7290daff95794a1d67e0e7f5659a7ca8bfe91c
|
|
The value resulting from the SECCOMP_RET_DATA mask could exceed MAX_ERRNO
when setting errno during a SECCOMP_RET_ERRNO filter action. This makes
sure we have a reliable value being set, so that an invalid errno will not
be ignored by userspace.
Signed-off-by: Kees Cook <keescook@chromium.org>
Reported-by: Dmitry V. Levin <ldv@altlinux.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Will Drewry <wad@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Bug: 27892194
Patchset: seccomp
(cherry picked from commit 580c57f1076872ebc2427f898b927944ce170f2d)
Signed-off-by: Kees Cook <keescook@google.com>
Change-Id: I30c2741f7064914b04b8a2765f1fd40f3a1cbd9e
|
|
Change-Id: I59f0dfd2934a7a36056abd6952895c66ca14331f
Tracked-On: https://jira01.devtools.intel.com/browse/BP-21
Signed-off-by: Khushboo Bindlish <khushboo.bindlish@intel.com>
|
|
Change-Id: I9e182a85931e0b24eeec9e929c6fc815adc4231b
Tracked-On: https://jira01.devtools.intel.com/browse/BP-21
Signed-off-by: Khushboo Bindlish <khushboo.bindlish@intel.com>
|
|
This project contains the sep54 driver for Chaabi
Change-Id: I056874c8ff52fe13fe1e0da7ba4a805d62be63d0
Tracked-On: https://jira01.devtools.intel.com/browse/BP-21
Signed-off-by: Khushboo Bindlish <khushboo.bindlish@intel.com>
|
|
(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.
Signed-off-by: Daniel Cashman <dcashman@android.com>
Signed-off-by: Daniel Cashman <dcashman@google.com>
Bug: 27796957
Patchset: ASLR sysctl
Change-Id: I5d6283f426337fc82ea7027a71cd13766db0d518
Signed-off-by: Kees Cook <keescook@google.com>
|
|
(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.
Signed-off-by: Daniel Cashman <dcashman@android.com>
Signed-off-by: Daniel Cashman <dcashman@google.com>
Bug: 27796957
Patchset: ASLR sysctl
Change-Id: Ifd46298e517b522deb1fedb64109acb7b7bdbc19
Signed-off-by: Kees Cook <keescook@google.com>
|
|
(cherry picked from commit https://lkml.org/lkml/2015/12/21/339)
x86: arch_mmap_rnd() uses hard-coded values, 8 for 32-bit and 28 for
64-bit, to generate the random offset for the mmap base address.
This value represents a compromise between increased ASLR
effectiveness and avoiding address-space fragmentation. Replace it
with a Kconfig option, which is sensibly bounded, so that platform
developers may choose where to place this compromise. Keep default
values as new minimums.
Signed-off-by: Daniel Cashman <dcashman@android.com>
Signed-off-by: Daniel Cashman <dcashman@google.com>
Bug: 27796957
Patchset: ASLR sysctl
Change-Id: I0270b0e837c0fe7284d79c5dafe91e998c15a715
Signed-off-by: Kees Cook <keescook@google.com>
|
|
(cherry picked from commit https://lkml.org/lkml/2015/12/21/340)
arm64: arch_mmap_rnd() uses STACK_RND_MASK to generate the
random offset for the mmap base address. This value represents a
compromise between increased ASLR effectiveness and avoiding
address-space fragmentation. Replace it with a Kconfig option, which
is sensibly bounded, so that platform developers may choose where to
place this compromise. Keep default values as new minimums.
Signed-off-by: Daniel Cashman <dcashman@android.com>
Signed-off-by: Daniel Cashman <dcashman@google.com>
Bug: 27796957
Patchset: ASLR sysctl
Change-Id: I2bce64c83f21c0c358e743d0d04239c805cca3f1
Signed-off-by: Kees Cook <keescook@google.com>
|
|
(cherry picked from commit https://lkml.org/lkml/2015/12/21/341)
arm: arch_mmap_rnd() uses a hard-code value of 8 to generate the
random offset for the mmap base address. This value represents a
compromise between increased ASLR effectiveness and avoiding
address-space fragmentation. Replace it with a Kconfig option, which
is sensibly bounded, so that platform developers may choose where to
place this compromise. Keep 8 as the minimum acceptable value.
Signed-off-by: Daniel Cashman <dcashman@android.com>
Signed-off-by: Daniel Cashman <dcashman@google.com>
Bug: 27796957
Patchset: ASLR sysctl
Change-Id: Ia3c4bf2e765662fa3f600e1b626ac1543b0f0149
Signed-off-by: Kees Cook <keescook@google.com>
|
|
(cherry picked from commit https://lkml.org/lkml/2015/12/21/337)
ASLR only uses as few as 8 bits to generate the random offset for the
mmap base address on 32 bit architectures. This value was chosen to
prevent a poorly chosen value from dividing the address space in such
a way as to prevent large allocations. This may not be an issue on all
platforms. Allow the specification of a minimum number of bits so that
platforms desiring greater ASLR protection may determine where to place
the trade-off.
Signed-off-by: Daniel Cashman <dcashman@android.com>
Signed-off-by: Daniel Cashman <dcashman@google.com>
Bug: 27796957
Patchset: ASLR sysctl
Change-Id: I1278914139a2e3910a301ab34755f409076768e7
Signed-off-by: Kees Cook <keescook@google.com>
|
|
The 'umidi' object will be free'd on the error path by snd_usbmidi_free()
when tearing down the rawmidi interface. So we shouldn't try to free it
in snd_usbmidi_create() after having registered the rawmidi interface.
Found by KASAN.
Signed-off-by: Andrey Konovalov <andreyknvl@gmail.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Bug: 27300729
(cherry picked from commit 07d86ca93db7e5cdf4743564d98292042ec21af7)
Signed-off-by: Kees Cook <keescook@google.com>
Change-Id: I9ae0fb8419f00ef2dad32df57e3469e1103d2f5c
|
|
Turn off kdevtmpfs because it is causing a race condition between
kdevtmpfs node creation and selinux labeling.
BUG=27399088
Change-Id: I0be424b1e9df5b2518d97253450a2c89d64562e1
Signed-off-by: Dwane Pottratz <dwane.pottratz@intel.com>
Signed-off-by: Mihai Serban <mihai.serban@intel.com>
|
|
This fixes CVE-2016-0728.
If a thread is asked to join as a session keyring the keyring that's already
set as its session, we leak a keyring reference.
This can be tested with the following program:
#include <stddef.h>
#include <stdio.h>
#include <sys/types.h>
#include <keyutils.h>
int main(int argc, const char *argv[])
{
int i = 0;
key_serial_t serial;
serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING,
"leaked-keyring");
if (serial < 0) {
perror("keyctl");
return -1;
}
if (keyctl(KEYCTL_SETPERM, serial,
KEY_POS_ALL | KEY_USR_ALL) < 0) {
perror("keyctl");
return -1;
}
for (i = 0; i < 100; i++) {
serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING,
"leaked-keyring");
if (serial < 0) {
perror("keyctl");
return -1;
}
}
return 0;
}
If, after the program has run, there something like the following line in
/proc/keys:
3f3d898f I--Q--- 100 perm 3f3f0000 0 0 keyring leaked-keyring: empty
with a usage count of 100 * the number of times the program has been run,
then the kernel is malfunctioning. If leaked-keyring has zero usages or
has been garbage collected, then the problem is fixed.
Reported-by: Yevgeny Pats <yevgeny@perception-point.io>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Don Zickus <dzickus@redhat.com>
Acked-by: Prarit Bhargava <prarit@redhat.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Bug: 26692844
(cherry picked from commit 23567fd052a9abb6d67fe8e7a9ccdd9800a540f2)
Signed-off-by: Kees Cook <keescook@google.com>
Change-Id: I8bc21ef67cef0fbb0ff3b0ebf770882591cdf615
|
|
When FFS gadget function is disabled, gadget driver tries to
disable the endpoints twice, which triggers warning message
in device driver.
This patch ensures that usb_ep_disable() is not called again
after the endpoint has been disabled.
Signed-off-by: Jiebing Li <jiebing.li@intel.com>
Signed-off-by: David Cohen <david.a.cohen@intel.com>
Bug: 26457812
Change-Id: I4e20bd0e918f0c26917f82f3cd0a513aa44d8499
Signed-off-by: Mihai Serban <mihai.serban@intel.com>
|
|
wait_for_completion" into edison-3.10
|
|
Trying to Ctrl-C the execution of a process (audio_hal_playback_test) which
plays audio on USB puts the associated endpoint in a bad state.
The *audio_hal_playback_test* application indirectly uses the *tinyalsa*
pcm_write function to write the audio data. If one Ctrl-Cs the execution
of *audio_hal_play_test* the application gets the SIGINT signal and gets
terminated (default action of the SIGINT signal).
Below you can see the backtrace of the chain of functions which are called by
*do_signal*. The do_exit function releases all resources including the pcm
ones (pcm_close is called to disable the endpoint).
[<c19dbcf5>] dump_stack+0x16/0x18
[<c163254c>] xhci_configure_endpoint+0x60c/0x6a0
[<c1632cde>] xhci_check_bandwidth+0x15e/0x260
[<c160480e>] usb_hcd_alloc_bandwidth+0x17e/0x4e0
[<c19d9645>] ? printk+0x1c/0x1e
[<c16085a7>] usb_set_interface+0x127/0x4a0
[<c131c17d>] ? __vunmap+0x7d/0xf0
[<c1798a1e>] snd_usb_pcm_close.isra.8+0x3e/0x70
[<c1798a62>] snd_usb_playback_close+0x12/0x20
[<c1776516>] snd_pcm_release_substream.part.30+0x36/0x80
[<c17765ef>] snd_pcm_release+0x8f/0xb0
[<c132bc78>] __fput+0xd8/0x220
[<c132bdfd>] ____fput+0xd/0x10
[<c1263c39>] task_work_run+0x89/0xb0
[<c1249658>] do_exit+0x2e8/0xa20
[<c12744cb>] ? get_parent_ip+0xb/0x40
[<c1255923>] ? recalc_sigpending+0x13/0x50
[<c12744cb>] ? get_parent_ip+0xb/0x40
[<c1249e07>] do_group_exit+0x37/0xa0
[<c125859c>] get_signal_to_deliver+0x22c/0x660
[<c1200fea>] do_signal+0x3a/0xb60
[<c1329ec1>] ? do_sync_read+0x61/0x90
[<c1778b57>] ? snd_pcm_playback_ioctl+0x27/0x40
[<c1493c91>] ? ioctl_has_perm+0xa1/0xc0
[<c1493d04>] ? selinux_file_ioctl+0x54/0x100
[<c133b090>] ? SyS_ioctl+0x60/0x90
[<c1201b65>] do_notify_resume+0x55/0x70
[<c19e35e1>] work_notifysig+0x29/0x30
xhci_configure_endpoint sends the *disable* command and waits for the ACK from
the controller using wait_for_completion_interruptible_timeout. However,
the xhci_configure_endpoint#wait_for_completion_interruptible_timeout call
returns with -ERESTARTSYS because the SIGINT signal is pending (check
wait_for_completion_interruptible_timeout -> wait_for_common ->
__wait_for_common -> do_wait_for_common -> signal_pending_state for
details).
Due to -ERESTARTSYS xhci_check_bandwidth (which calls xhci_configure_endpoint)
doesn't free all resources and next time when one tries to use the pcm the
following errors will be thrown:
dwc3-host dwc3-host.2: xHCI xhci_drop_endpoint called with disabled ep f51be840
dwc3-host dwc3-host.2: xHCI xhci_drop_endpoint called with disabled ep f51be86c
dwc3-host dwc3-host.2: Trying to add endpoint 0x1 without dropping it.
usb 1-1: Not enough bandwidth for altsetting 1
2:1:1: usb_set_interface failed (-22)
Unable to open PCM device 0 (cannot set hw params: I/O error)
The xhci_drop_endpoint fails because the endpoints are
disabled (xhci_configure_endpoint's *disable* command worked even though it
didn't wait for ACK due to the pending signal - the controller set the disable
state).
The impact is that I cannot play audio on USB anymore if I Ctrl-C the execution
of audio_hal_playback_test. The device needs to be rebooted.
The wait_for_completion_interruptible_timeout call in 3.10 was changed in
3.16 to wait_for_completion in a bigger command rework (see upstream commit
c311e391a7efd101250c0e123286709b7e736249).
The solution is to replace wait_for_completion_interruptible_timeout with
wait_for_completion_timeout. XHCI_CMD_DEFAULT_TIMEOUT is 5 * HZ, but the
call is unlikely to timeout.
BUG=26296289
Change-Id: I81e778ec2f420aaace0acc1d99ab30c893acedba
Signed-off-by: Constantin Musca <constantin.musca@intel.com>
|
|
Fix DMA mode will freeze when transfering
8 bytes/8 bits,16 bytes/16 bits, 32 bytes/32 bits.
and enable DMA mode in spi transferring.
Cherry-pick from:
https://github.com/01org/edison-linux/commit/2d7dacd26d06afec9fd4d7a5df73bc4f77571195
Signed-off-by: Shimin Zhou <shimingx.zhou@intel.com>
Signed-off-by: Zhenming Zhao <zhenmingx.zhao@intel.com>
BUG=26065307
Change-Id: I851219a761b6c65cd7a8edc1370c054ce6c35883
|
|
|
|
BUG = 26290407
Change-Id: I49b17e1e92db073e47a46be24961ef80c5cca115
|
|
DMA will freeze when transfering 8 bytes/8 bits,
16 bytes/16 bits, 32 bytes/32 bits. Disable it
for temporary. Meanwhile, enable the functions
to transfer multiple SPI messages by one time.
Cherry-pick from:
https://github.com/01org/edison-linux/commit/c527c66918be70f90255bf85d6435c2615bbd6bb
Signed-off-by: Shimin Zhou <shimingx.zhou@intel.com>
Signed-off-by: Chunguang Chen <chunguangx.chen@intel.com>
BUG=26065307
Change-Id: I14f5c10c9d5183553e608ceb9c40307f79d6b625
|
|
Resolve compilation warnings encountered when building with the most
recent platform version of gcc 4.9:
.../hardware/bsp/kernel/intel/edison-3.10/sound/soc/intel/effects.c:191:31: error: 'pipe_id' may be used uninitialized in this function [-Werror=maybe-uninitialized]
dsp_payload->dsp_hdr.pipe_id = pipe_id;
^
.../hardware/bsp/kernel/intel/edison-3.10/sound/soc/intel/effects.c:227:5: note: 'pipe_id' was declared here
u8 pipe_id;
Bug: 26226110
Change-Id: I587a9f03af1067a4a7984dc432acc47754e845cf
|
|
* changes:
selinux: do not check open perm on ftruncate call
selinux: extended permissions for ioctls
security: add ioctl specific auditing to lsm_audit
selinux: remove unnecessary pointer reassignment
Revert "security: lsm_audit: add ioctl specific auditing"
Revert "SELinux: per-command whitelisting of ioctls"
Revert "SELinux: use deletion-safe iterator to free list"
Revert "SELinux: ss: Fix policy write for ioctl operations"
|
|
Use the ATTR_FILE attribute to distinguish between truncate()
and ftruncate() system calls. The two other cases where
do_truncate is called with a filp (and therefore ATTR_FILE is set)
are for coredump files and for open(O_TRUNC). In both of those cases
the open permission has already been checked during file open and
therefore does not need to be repeated.
Commit 95dbf739313f ("SELinux: check OPEN on truncate calls")
fixed a major issue where domains were allowed to truncate files
without the open permission. However, it introduced a new bug where
a domain with the write permission can no longer ftruncate files
without the open permission, even when they receive an already open
file.
(cherry picked from commit b21800f304392ee5d20f411c37470183cc779f11)
Bug: 22567870
Change-Id: Id7c305e46beba5091c2c777529bd468216aae1c3
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
(cherry picked from commit fa1aa143ac4a682c7f5fd52a3cf05f5a6fe44a0a)
Add extended permissions logic to selinux. Extended permissions
provides additional permissions in 256 bit increments. Extend the
generic ioctl permission check to use the extended permissions for
per-command filtering. Source/target/class sets including the ioctl
permission may additionally include a set of commands. Example:
allowxperm <source> <target>:<class> ioctl unpriv_app_socket_cmds
auditallowxperm <source> <target>:<class> ioctl priv_gpu_cmds
Where unpriv_app_socket_cmds and priv_gpu_cmds are macros
representing commonly granted sets of ioctl commands.
When ioctl commands are omitted only the permissions are checked.
This feature is intended to provide finer granularity for the ioctl
permission that may be too imprecise. For example, the same driver
may use ioctls to provide important and benign functionality such as
driver version or socket type as well as dangerous capabilities such
as debugging features, read/write/execute to physical memory or
access to sensitive data. Per-command filtering provides a mechanism
to reduce the attack surface of the kernel, and limit applications
to the subset of commands required.
The format of the policy binary has been modified to include ioctl
commands, and the policy version number has been incremented to
POLICYDB_VERSION_XPERMS_IOCTL=30 to account for the format
change.
The extended permissions logic is deliberately generic to allow
components to be reused e.g. netlink filters
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
Acked-by: Nick Kralevich <nnk@google.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Bug: 22846070
Change-Id: I1573d6b2d0ced27e82b6447318aa5b3065021a5b
|
|
(cherry pick from commit 671a2781ff01abf4fdc8904881fc3abd3a8279af)
Add information about ioctl calls to the LSM audit data. Log the
file path and command number.
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
Acked-by: Nick Kralevich <nnk@google.com>
[PM: subject line tweak]
Signed-off-by: Paul Moore <pmoore@redhat.com>
Bug: 22846070
Change-Id: Iccba24f0f53e93595aaf16b2d3b04c02dac5f7a1
|
|
(cherry pick from commit 83d4a806ae46397f606de7376b831524bd3a21e5)
Commit f01e1af445fa ("selinux: don't pass in NULL avd to avc_has_perm_noaudit")
made this pointer reassignment unnecessary. Avd should continue to reference
the stack-based copy.
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
[PM: tweaked subject line]
Signed-off-by: Paul Moore <pmoore@redhat.com>
Bug: 22846070
Change-Id: I4aef4b95820e813c370525310e37f5da22d25efc
|
|
This reverts commit c8c3cd48e44fe12a41cd20e46d36fcfe5a759fd7.
Bug: 22846070
Change-Id: Ibf79b4c76f22f0af2d39e377b551151837a782cd
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
|
|
This reverts commit 8daca972e410f42a4fc1fe2de804c50013b24a28.
Bug: 22846070
Change-Id: Ia2d1e2b0f46ccb0328626286216e38378650505b
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
|
|
This reverts commit 98a4d82a78914c2496989d669ecae04dedcf361f.
Bug: 22846070
Change-Id: Ic047824591e8d94f937c052846ab387864c04fd7
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
|
|
This reverts commit 8cdfb356b51e29494ca0b9e4e86727d6f841a52d.
Bug: 22846070
Change-Id: I4dd2fd5a1d7fb3ae8f74a5decdf8fb9d5cd43def
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
|
|
The serial_hsu_command() function can be called from atomic or non-atomic
context. When it is executed from atomic context it must not call schedule().
BUG=26083445
Change-Id: I6194d817df553b84c5f082b5f2937eae25f27757
Tracked-On: https://jira01.devtools.intel.com/browse/BP-156
Signed-off-by: Mihai Serban <mihai.serban@intel.com>
Reviewed-on: https://android.intel.com/444580
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Reviewed-by: Beare, Bruce J <bruce.j.beare@intel.com>
|
|
The driver logic is implemented in the lights hal via libmraa.
Remove the driver as it isn't necessary anymore.
BUG=25892182
Tracked-On: https://jira01.devtools.intel.com/browse/BP-133
Change-Id: Ic7f4a5d00b416351e5c5d8885013790835a3e271
Signed-off-by: Beare, Bruce J <bruce.j.beare@intel.com>
Signed-off-by: Constantin Musca <constantin.musca@intel.com>
|
|
The pinmux attribute is always present in sysfs interface now. It has
the same functionality as the current_pinmux from the debugfs/gpio_debug
interface with the difference that instead of using values like
'mode0' ... 'mode7' one must use '0'...'7'.
BUG=25892557
Change-Id: I1537d38bef4d710a50c3c191c8640f183f22358b
Tracked-On: https://jira01.devtools.intel.com/browse/BP-88
Reviewed-on: https://android.intel.com/434857
Reviewed-by: Musca, Constantin <constantin.musca@intel.com>
Signed-off-by: Beare, Bruce J <bruce.j.beare@intel.com>
Signed-off-by: Mihai Serban <mihai.serban@intel.com>
|
|
This commit resolves the compile warnings seen
when building the Intel Edison 3.10.x kernel.
BUG=25764172
Change-Id: I655f702b24f9bcfb7655c57acfd8aafa69c52c0d
Signed-off-by: Brian Wood <brian.j.wood@intel.com>
|
|
This commit cleans up some unused variables causing
compile warnings as well as unused code blocks that
were disabled after finding they were causing
stability issues with the I2C buss due to IRQ
handling.
BUG=25764468
Change-Id: Ifad064581fb418bf66bc0874d8f5f4e3971f2a5a
Signed-off-by: Brian Wood <brian.j.wood@intel.com>
|
|
This commit adds in required changes by Google for Brillo
kernel security/support compliance. These are checked by
scripts/config files used in the kernel build process.
BUG=25763530
Change-Id: Idd86237f799f7338bbb8a3069e5afb71c4aea498
Signed-off-by: Brian Wood <brian.j.wood@intel.com>
|
|
Convert the pr_* (besides pr_err and above)
into the LED_DBG macro to only display when
explicitly asked for.
BUG=25763491
Change-Id: Ica02facfc65fd4cb2cf55db45338af7d6726e920
Signed-off-by: Brian Wood <brian.j.wood@intel.com>
|
|
The runtime PM is already enabled after registering with PCI. Remove the
superfluous second function call that produces a warning in logs.
BUG=25760766
Change-Id: I7c17e7cf34067117bda85f4be85d97b85c5092f4
Tracked-On: https://jira01.devtools.intel.com/browse/BP-26
Signed-off-by: Mihai Serban <mihai.serban@intel.com>
Reviewed-by: Wood, Brian J <brian.j.wood@intel.com>
|
|
The setup function allocates memory for chip_data structure while holding
a spin lock. Instead of using atomic memory allocation we can temporary
exit the atomic context, allocate the required memory, re-acquire the
spin lock and check if there was a race before continuing or not.
BUG=25746315
Change-Id: I89495774b3c3a5afdc3dcfa84ce9c43d0a4ea04a
Tracked-On: https://jira01.devtools.intel.com/browse/BP-25
Signed-off-by: Mihai Serban <mihai.serban@intel.com>
Reviewed-by: Beare, Bruce J <bruce.j.beare@intel.com>
Reviewed-by: Wood, Brian J <brian.j.wood@intel.com>
|
|
This commit resolves the issue where the Intel Edison
will hang if rebooted more than once (repeated reboots).
It was found that the mmc device was being registerd
twice with 2 shutdown functions. When a device
reboot/shutdown operation was called the same mmc device
was trying to be cancelled from a workqueue. This
situation caused a race condition on the second operation
since the cancelled work will wait for completion.
Also added in code needed for proper resume setting for MMC
power state.
Change-Id: I1400df84e178d2b582725db2129ea7ee7c28a4da
Signed-off-by: Brian Wood <brian.j.wood@intel.com>
|
|
Dont try to run any backgroud task when the device is removing.
Change-Id: I2109cb65e141f7b0fd004389288f6e356a4fbeba
Signed-off-by: mabbas <mohamed.abbas@intel.com>
|
|
Dont add job to tasklet on driver remover to avoid
hang in tasklet_kill call
Change-Id: I5efbb7a14ab537a5fc14a1a77be7f695dccf0757
Tracked-On: BP-63
Signed-off-by: mabbas <mohamed.abbas@intel.com>
|
|
This commit adds in support for request/free GPIO operations
in the LED driver so that the GPIO pin can be freed for use
by 3rd party libraries (like MRAA) that wish to control
the GPIO pins directly for the LED.
Also adding support for debug kernel configuration option
(to print helpful debugging messages).
Change-Id: If20f78721239fdfe605aeeb2095d123a4cc69807
Signed-off-by: Brian Wood <brian.j.wood@intel.com>
|
|
BZ: 144574
This patch adds two configurable features to the rtc-cmos driver:
- if CONFIG_RTC_DRV_CMOS_WAKEUP_FROM_LPSTATES is set then driver will
add alarm wakeup capability from S3 (suspend to RAM) and S4/5 (OFF).
- if CONFIG_RTC_DRV_CMOS_DAYOFMONTH_ALARM is set on top of the above
flag then alarm wakeup from low power states will be supported up to
one month instead of only one day. Day of month is set in RTC CMOS
register D.
This patch comes as part of the overall wakeup from OFF feature
supported on Intel mobile platforms.
Change-Id: I94d56710f570d58be1806c1642f1fa6722d3e3dc
Signed-off-by: Gabriel Touzeau <gabrielx.touzeau@intel.com>
Reviewed-on: https://android.intel.com/425802
Reviewed-by: Wood, Brian J <brian.j.wood@intel.com>
Tested-by: Wood, Brian J <brian.j.wood@intel.com>
Reviewed-by: Noziska, Patrick J <patrick.j.noziska@intel.com>
|
|
BZ: 109729
By default legacy RTC driver rtc-cmos does not have wake up
capability. Merrifield platform is the first intel MID platform
to use this driver. So allow wake up capability for all intel MID
platforms to enable alarm wake up from low power state.
Change-Id: I65873e2a8cd650241ccde2163b8cc63565eb90c3
Signed-off-by: Gabriel Touzeau <gabrielx.touzeau@intel.com>
Reviewed-on: http://android.intel.com:8080/134461
Reviewed-by: Li, Ning <ning.li@intel.com>
Reviewed-by: Despalles, Frederic <frederic.despalles@intel.com>
Tested-by: Wang, Zhifeng <zhifeng.wang@intel.com>
Reviewed-by: Yang, Bin <bin.yang@intel.com>
Reviewed-by: Du, Alek <alek.du@intel.com>
Reviewed-by: cactus <cactus@intel.com>
Tested-by: cactus <cactus@intel.com>
Reviewed-on: https://android.intel.com/425801
Reviewed-by: Wood, Brian J <brian.j.wood@intel.com>
Tested-by: Wood, Brian J <brian.j.wood@intel.com>
Reviewed-by: Noziska, Patrick J <patrick.j.noziska@intel.com>
|
|
This commit enables 2 necessary defconfig parameters
to utilize rtc-cmos driver support for Intel MID
devices.
Change-Id: Ia21840a2aeb6342f6bf63241029143c43fd13cde
Signed-off-by: Brian Wood <brian.j.wood@intel.com>
Reviewed-on: https://android.intel.com/425803
Reviewed-by: Noziska, Patrick J <patrick.j.noziska@intel.com>
|
|
This commit corrects the issues in the REVERT_ME patches with
the upstream intel-mid watchdog driver when being backported
to the 3.10.x kernel. Also, we've found that the registration
of the IRQ is causing a conflict with the I2C bus. For now we
will disable this in the driver as it will not interfer with
normal operations of the watchdog (the IRQ handler should never
be reached anyway and is only used to print a kernel message).
This will be fixed by a subsequent patch.
Change-Id: I06757bdf66615ce5cf63396269d8ee889a54eed3
Signed-off-by: Brian Wood <brian.j.wood@intel.com>
Reviewed-on: https://android.intel.com/424751
|
|
This commit is adding the following features:
- Millisecond delay_on/delay_off sysfs device file entries
added to support <X>ms configurable LED on/off values.
- General cleanup of code.
Change-Id: I1bcf2cc8295a66c5e45ebab88ef6846698f63f72
Signed-off-by: Brian Wood <brian.j.wood@intel.com>
Reviewed-on: https://android.intel.com/425245
|
|
This reverts commit 0b247ec2a0e8a2e5509064a222ba1cf9cac977bd.
Change-Id: I9cd2444e0ec97de4466ac13cdb72637272540047
Signed-off-by: Brian Wood <brian.j.wood@intel.com>
Reviewed-on: https://android.intel.com/424750
|