Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6679a18a authored by Kevin Hilman's avatar Kevin Hilman
Browse files

Merge branch 'v3.18/topic/aosp' into linux-linaro-lsk-v3.18-android

* v3.18/topic/aosp: (25 commits)
  wakeup: Add the guard condition for len in pm_get_active_wakeup_sources
  CHROMIUM: android: Unconditionally remove callbacks in sync_fence_free()
  CHROMIUM: android: fix warning when releasing active sync point
  mm: reorder can_do_mlock to fix audit denial
  staging: ion: debugfs to shrink pool
  usb: gadget: configfs: handle gadget reset request for android
  Enable adb with android-pipe in IA image
  selinux: Android kernel compatibility with M userspace
  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"
  android: add CONFIG_DEBUG_RODATA to recommended config
  arm: mm: support ARCH_MMAP_RND_BITS.
  mm: mmap: Add new /proc tunable for mmap_base ASLR.
  Don't kill IPv4 sockets when killing IPv6 sockets was requested.
  uid_cputime: Check for the range while removing range of UIDs.
  ...

 Conflicts:
   drivers/usb/gadget/Kconfig

   Conflict due to android-3.18 merge trying to sneak in Android
   Composite Gadget "USB_G_ANDROID" changes into
   drivers/usb/gadget/Kconfig which we have already moved to
   drivers/usb/gadget/legacy/Kconfig during last restructuring.

 Resolution (as recommended by Amit Pundir)

   Delete "USB_G_ANDROID" and dependent config option and keep only
   USB_CONFIGFS_F_MIDI specific changes from AOSP commit 2ccf4f4f
   "usb: gadget: Remove circular dependency on Config".
parents c9e5228e 24dc742a
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ show up in /proc/sys/kernel:
- kptr_restrict
- kstack_depth_to_print       [ X86 only ]
- l2cr                        [ PPC only ]
- mmap_rnd_bits
- modprobe                    ==> Documentation/debugging-modules.txt
- modules_disabled
- msg_next_id		      [ sysv ipc ]
@@ -386,6 +387,19 @@ This flag controls the L2 cache of G3 processor boards. If

==============================================================

mmap_rnd_bits:

This value can be used to select the number of bits to use to
determine the random offset to the base address of vma regions
resulting from mmap allocations on architectures which support
tuning address space randomization.  This value will be bounded
by the architecture's minimum and maximum supported values.

This value can be changed after boot using the
/proc/sys/kernel/mmap_rnd_bits tunable

==============================================================

modules_disabled:

A toggle value indicating if modules are allowed to be loaded
+2 −0
Original line number Diff line number Diff line
@@ -6,11 +6,13 @@
# CONFIG_PM_WAKELOCKS_GC is not set
# CONFIG_VT is not set
CONFIG_ANDROID_TIMED_GPIO=y
CONFIG_ARM_KERNMEM_PERMS=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_COMPACTION=y
CONFIG_DEBUG_RODATA=y
CONFIG_DM_UEVENT=y
CONFIG_DRAGONRISE_FF=y
CONFIG_ENABLE_DEFAULT_TRACERS=y
+24 −0
Original line number Diff line number Diff line
@@ -296,6 +296,30 @@ config MMU
	  Select if you want MMU-based virtualised addressing space
	  support by paged memory management. If unsure, say 'Y'.

config ARCH_MMAP_RND_BITS_MIN
	int
	default 8

config ARCH_MMAP_RND_BITS_MAX
	int
	default 14 if MMU && PAGE_OFFSET=0x40000000
	default 15 if MMU && PAGE_OFFSET=0x80000000
	default 16 if MMU
	default 8

config ARCH_MMAP_RND_BITS
	int "Number of bits to use for ASLR of mmap base address" if EXPERT
	range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX
	default ARCH_MMAP_RND_BITS_MIN
	help
	  This value can be used to select the number of bits to use to
	  determine the random offset to the base address of vma regions
	  resulting from mmap allocations. This value will be bounded
	  by the architecture's minimum and maximum supported values.

	  This value can be changed after boot using the
	  /proc/sys/kernel/mmap_rnd_bits tunable

#
# The "ARM system type" choice list is ordered alphabetically by option
# text.  Please add new entries in the option alphabetic order.
+5 −2
Original line number Diff line number Diff line
@@ -11,6 +11,10 @@
#include <linux/random.h>
#include <asm/cachetype.h>

int mmap_rnd_bits_min = CONFIG_ARCH_MMAP_RND_BITS_MIN;
int mmap_rnd_bits_max = CONFIG_ARCH_MMAP_RND_BITS_MAX;
int mmap_rnd_bits = CONFIG_ARCH_MMAP_RND_BITS;

#define COLOUR_ALIGN(addr,pgoff)		\
	((((addr)+SHMLBA-1)&~(SHMLBA-1)) +	\
	 (((pgoff)<<PAGE_SHIFT) & (SHMLBA-1)))
@@ -173,10 +177,9 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
{
	unsigned long random_factor = 0UL;

	/* 8 bits of randomness in 20 address space bits */
	if ((current->flags & PF_RANDOMIZE) &&
	    !(current->personality & ADDR_NO_RANDOMIZE))
		random_factor = (get_random_int() % (1 << 8)) << PAGE_SHIFT;
		random_factor = (get_random_int() % (1 << mmap_rnd_bits)) << PAGE_SHIFT;

	if (mmap_is_legacy()) {
		mm->mmap_base = TASK_UNMAPPED_BASE + random_factor;
+1 −1
Original line number Diff line number Diff line
@@ -677,7 +677,7 @@ void pm_get_active_wakeup_sources(char *pending_wakeup_source, size_t max)

	rcu_read_lock();
	list_for_each_entry_rcu(ws, &wakeup_sources, entry) {
		if (ws->active) {
		if (ws->active && len < max) {
			if (!active)
				len += scnprintf(pending_wakeup_source, max,
						"Pending Wakeup Sources: ");
Loading