Commit Graph

661 Commits

Author SHA1 Message Date
Huang, Tao
1ca180425c Merge tag 'lsk-v3.10-android-15.02'
LSK Android 15.02 v3.10

Conflicts:
	drivers/Kconfig
	drivers/regulator/core.c
	include/linux/of.h
2015-03-05 17:11:40 +08:00
Mark Brown
def31719e1 Merge remote-tracking branch 'lsk/v3.10/topic/aosp' into linux-linaro-lsk-android
Conflicts:
	drivers/Kconfig
	drivers/Makefile
	fs/pstore/inode.c
	fs/pstore/ram.c
2015-02-20 14:29:33 +09:00
Amit Pundir
ecfe0b5f15 Merge branch 'android-3.10' of https://android.googlesource.com/kernel/common into linaro-android-3.10-lsk
* android-3.10: (60 commits)
  kbuild: make it possible to specify the module output dir
  xt_qtaguid: Use sk_callback_lock read locks before reading sk->sk_socket
  ipv6: clean up anycast when an interface is destroyed
  usb: gadget: check for accessory device before disconnecting HIDs
  staging: android: ashmem: add missing include
  usb: gadget: android: Save/restore ep0 completion function
  selinux: Remove obsolete selinux_audit_data initialization.
  selinux: make the netif cache namespace aware
  selinux: correctly label /proc inodes in use before the policy is loaded
  selinux: fix inode security list corruption
  selinux: put the mmap() DAC controls before the MAC controls
  selinux: reduce the number of calls to synchronize_net() when flushing caches
  [PATCH 5/5] pstore: selinux: add security in-core xattr support for pstore and debugfs
  SELinux: Update policy version to support constraints info
  [PATCH v4 4/5] pstore: add pmsg
  [PATCH 3/5] pstore: handle zero-sized prz in series
  [PATCH v2 2/5] pstore: remove superfluous memory size check
  [PATCH v4 1/5] pstore: use snprintf
  pstore: clarify clearing of _read_cnt in ramoops_context
  prctl: make PR_SET_TIMERSLACK_PID pid namespace aware
  ...

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>

Conflicts:
	drivers/staging/android/Kconfig
2015-02-12 16:39:41 +08:00
Greg Kroah-Hartman
a8363b44d1 staging: android: binder: move to the "real" part of the kernel
The Android binder code has been "stable" for many years now.  No matter
what comes in the future, we are going to have to support this API, so
might as well move it to the "real" part of the kernel as there's no
real work that needs to be done to the existing code.

Change-Id: I36d5c6fc05aff26dd01a227201be18e86c9f9994
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-13 22:46:36 +00:00
Huang, Tao
d03390bfcd Merge tag 'lsk-v3.10-android-14.11'
LSK Android 14.11 v3.10

Conflicts:
	arch/arm/include/asm/cputype.h
2014-12-05 21:18:34 +08:00
dalon.zhang
8a297b0552 camera : cif : v0.1.a Support rk3288 cif driver 2014-11-29 19:38:54 +08:00
Mark Brown
5d0676ad29 Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2014-11-21 18:53:31 +00:00
Mark Brown
09cc926e9a Merge tag 'v3.10.61' into linux-linaro-lsk
This is the 3.10.61 stable release
2014-11-21 18:53:19 +00:00
Pablo Neira
7c059c04ff netfilter: xt_bpf: add mising opaque struct sk_filter definition
commit e10038a8ec upstream.

This structure is not exposed to userspace, so fix this by defining
struct sk_filter; so we skip the casting in kernelspace. This is safe
since userspace has no way to lurk with that internal pointer.

Fixes: e6f30c7 ("netfilter: x_tables: add xt_bpf match")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-21 09:22:54 -08:00
Mark Brown
eea1d30482 Merge remote-tracking branch 'lsk/v3.10/topic/aosp' into linux-linaro-lsk-android 2014-11-21 16:52:51 +00:00
Amit Pundir
34fcdee4ea Merge branch 'upstream/android-3.10' into 'linaro-fixes/android-3.10' 2014-11-10 11:16:05 +05:30
Vinod Koul
c5400a9083 ALSA: compress: add num_sample_rates in snd_codec_desc
this gives ability to convey the valid values of supported rates in
sample_rates array

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
(cherry picked from commit 929559be6d)
Signed-off-by: Yuchen Song <yuchens@nvidia.com>
Change-Id: Icfbb6d272a70c0a94719613c00bac18c5a0e3f87
2014-11-06 16:41:48 -08:00
Vinod Koul
371e4108dd ALSA: compress: update struct snd_codec_desc for sample rate
Now that we don't use SNDRV_PCM_RATE_xxx bit fields for sample rate, we need to
change the description to an array for describing the sample rates supported by
the sink/source

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
(cherry picked from commit b8bab04829)
Signed-off-by: Yuchen Song <yuchens@nvidia.com>
Change-Id: I6c2fa5a5034ec749e9d7a71c49a1108af2416848
2014-11-06 16:41:37 -08:00
Vinod Koul
55fc15e33d ALSA: compress: update comment for sample rate in snd_codec
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
(cherry picked from commit d9afee6904)
Signed-off-by: Yuchen Song <yuchens@nvidia.com>
Change-Id: I7608d924613611222766a898a97c856a64c2eb68
2014-11-06 16:41:24 -08:00
Vinod Koul
9aed3d0f49 ALSA: compress: change the way sample rates are sent to kernel
The usage of SNDRV_RATES is not effective as we can have rates like 12000 or
some other ones used by decoders. This change the usage of this to use the raw
Hz values to be sent to kernel

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
(cherry picked from commit f0e9c08065)
Signed-off-by: Yuchen Song <yuchens@nvidia.com>
Change-Id: Ia4c67405b9cf9aef9c641bce9b02a994939eae00
2014-11-06 16:39:58 -08:00
Mark Brown
f42afd0e03 Merge branch 'linaro-android-3.10-lsk' of git://android.git.linaro.org/kernel/linaro-android into linux-linaro-lsk-android
Conflicts:
	arch/arm64/Kconfig
	arch/arm64/include/asm/barrier.h
	arch/arm64/include/asm/elf.h
	arch/arm64/include/asm/ptrace.h
	arch/arm64/kernel/Makefile
	arch/arm64/kernel/debug-monitors.c
	arch/arm64/kernel/entry.S
	arch/arm64/kernel/hw_breakpoint.c
	arch/arm64/kernel/kuser32.S
	arch/arm64/kernel/ptrace.c
	arch/arm64/kernel/setup.c
	arch/arm64/kernel/traps.c
	kernel/fork.c
2014-11-05 14:27:01 +00:00
Erik Kline
2ce95507d5 net: ipv6: Add a sysctl to make optimistic addresses useful candidates
Add a sysctl that causes an interface's optimistic addresses
to be considered equivalent to other non-deprecated addresses
for source address selection purposes.  Preferred addresses
will still take precedence over optimistic addresses, subject
to other ranking in the source address selection algorithm.

This is useful where different interfaces are connected to
different networks from different ISPs (e.g., a cell network
and a home wifi network).

The current behaviour complies with RFC 3484/6724, and it
makes sense if the host has only one interface, or has
multiple interfaces on the same network (same or cooperating
administrative domain(s), but not in the multiple distinct
networks case.

For example, if a mobile device has an IPv6 address on an LTE
network and then connects to IPv6-enabled wifi, while the wifi
IPv6 address is undergoing DAD, IPv6 connections will try use
the wifi default route with the LTE IPv6 address, and will get
stuck until they time out.

Also, because optimistic nodes can receive frames, issue
an RTM_NEWADDR as soon as DAD starts (with the IFA_F_OPTIMSTIC
flag appropriately set).  A second RTM_NEWADDR is sent if DAD
completes (the address flags have changed), otherwise an
RTM_DELADDR is sent.

Also: add an entry in ip-sysctl.txt for optimistic_dad.

[cherry-pick of net-next 7fd2561e4e]

Signed-off-by: Erik Kline <ek@google.com>
Acked-by: Lorenzo Colitti <lorenzo@google.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bug: 17769720
Change-Id: Ic7e50781c607e1f3a492d9ce7395946efb95c533
2014-11-05 00:46:54 +00:00
Amit Pundir
51b6770b8d Merge branch 'upstream/android-3.10' into 'linaro-fixes/android-3.10' 2014-10-13 09:43:42 +05:30
Mark Brown
1ebc0d9dae Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2014-10-12 10:13:30 +01:00
Mark Brown
aea5b31b7d Merge remote-tracking branch 'lsk/v3.10/topic/kvm' into linux-linaro-lsk
Conflicts:
	arch/arm/kvm/arm.c
	arch/arm64/Makefile
	arch/arm64/kernel/asm-offsets.c
	virt/kvm/kvm_main.c
2014-10-11 11:28:22 +01:00
Kees Cook
f14a5db239 seccomp: implement SECCOMP_FILTER_FLAG_TSYNC
Applying restrictive seccomp filter programs to large or diverse
codebases often requires handling threads which may be started early in
the process lifetime (e.g., by code that is linked in). While it is
possible to apply permissive programs prior to process start up, it is
difficult to further restrict the kernel ABI to those threads after that
point.

This change adds a new seccomp syscall flag to SECCOMP_SET_MODE_FILTER for
synchronizing thread group seccomp filters at filter installation time.

When calling seccomp(SECCOMP_SET_MODE_FILTER, SECCOMP_FILTER_FLAG_TSYNC,
filter) an attempt will be made to synchronize all threads in current's
threadgroup to its new seccomp filter program. This is possible iff all
threads are using a filter that is an ancestor to the filter current is
attempting to synchronize to. NULL filters (where the task is running as
SECCOMP_MODE_NONE) are also treated as ancestors allowing threads to be
transitioned into SECCOMP_MODE_FILTER. If prctrl(PR_SET_NO_NEW_PRIVS,
...) has been set on the calling thread, no_new_privs will be set for
all synchronized threads too. On success, 0 is returned. On failure,
the pid of one of the failing threads will be returned and no filters
will have been applied.

The race conditions against another thread are:
- requesting TSYNC (already handled by sighand lock)
- performing a clone (already handled by sighand lock)
- changing its filter (already handled by sighand lock)
- calling exec (handled by cred_guard_mutex)
The clone case is assisted by the fact that new threads will have their
seccomp state duplicated from their parent before appearing on the tasklist.

Holding cred_guard_mutex means that seccomp filters cannot be assigned
while in the middle of another thread's exec (potentially bypassing
no_new_privs or similar). The call to de_thread() may kill threads waiting
for the mutex.

Changes across threads to the filter pointer includes a barrier.

Based on patches by Will Drewry.

Suggested-by: Julien Tinnes <jln@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Andy Lutomirski <luto@amacapital.net>
2014-10-07 16:42:34 -07:00
Kees Cook
e985fd474d seccomp: add "seccomp" syscall
This adds the new "seccomp" syscall with both an "operation" and "flags"
parameter for future expansion. The third argument is a pointer value,
used with the SECCOMP_SET_MODE_FILTER operation. Currently, flags must
be 0. This is functionally equivalent to prctl(PR_SET_SECCOMP, ...).

In addition to the TSYNC flag later in this patch series, there is a
non-zero chance that this syscall could be used for configuring a fixed
argument area for seccomp-tracer-aware processes to pass syscall arguments
in the future. Hence, the use of "seccomp" not simply "seccomp_add_filter"
for this syscall. Additionally, this syscall uses operation, flags,
and user pointer for arguments because strictly passing arguments via
a user pointer would mean seccomp itself would be unable to trivially
filter the seccomp syscall itself.

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Andy Lutomirski <luto@amacapital.net>

Conflicts:
	arch/x86/syscalls/syscall_32.tbl
	arch/x86/syscalls/syscall_64.tbl
	include/uapi/asm-generic/unistd.h
	kernel/seccomp.c

And fixup of unistd32.h to truly enable sys_secomp.

Change-Id: I95bea02382c52007d22e5e9dc563c7d055c2c83f
2014-10-07 16:42:32 -07:00
Will Deacon
86318858ca KVM: device: add simple registration mechanism for kvm_device_ops
kvm_ioctl_create_device currently has knowledge of all the device types
and their associated ops. This is fairly inflexible when adding support
for new in-kernel device emulations, so move what we currently have out
into a table, which can support dynamic registration of ops by new
drivers for virtual hardware.

Cc: Alex Williamson <Alex.Williamson@redhat.com>
Cc: Alex Graf <agraf@suse.de>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit d60eacb070)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2014-10-02 17:19:18 +02:00
Christoffer Dall
177e51e894 KVM: Unconditionally export KVM_CAP_USER_NMI
The idea between capabilities and the KVM_CHECK_EXTENSION ioctl is that
userspace can, at run-time, determine if a feature is supported or not.
This allows KVM to being supporting a new feature with a new kernel
version without any need to update user space.  Unfortunately, since the
definition of KVM_CAP_USER_NMI was guarded by #ifdef
__KVM_HAVE_USER_NMI, such discovery still required a user space update.

Therefore, unconditionally export KVM_CAP_USER_NMI and change the
the typo in the comment for the IOCTL number definition as well.

Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 44b5ce73c9)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2014-10-02 17:19:14 +02:00
Christoffer Dall
d3b49fbe57 KVM: Unconditionally export KVM_CAP_READONLY_MEM
The idea between capabilities and the KVM_CHECK_EXTENSION ioctl is that
userspace can, at run-time, determine if a feature is supported or not.
This allows KVM to being supporting a new feature with a new kernel
version without any need to update user space.  Unfortunately, since the
definition of KVM_CAP_READONLY_MEM was guarded by #ifdef
__KVM_HAVE_READONLY_MEM, such discovery still required a user space
update.

Therefore, unconditionally export KVM_CAP_READONLY_MEM and change the
in-kernel conditional to rely on __KVM_HAVE_READONLY_MEM.

Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 0f8a4de3e0)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2014-10-02 17:19:14 +02:00