defconfig: enable some missing options

arm cpu topology
sched mc
uaccess with memcopy
add back congestion algotithms
some arm optimisations

Signed-off-by: Dan Trifan <jimsth@gmail.com>
drivers:cpufreq:interactive: hardcode tuntable values

Signed-off-by: Dan Trifan <jimsth@gmail.com>
omap2plus-cpufreq: set default screen_on_min_freq to 350MHz

Signed-off-by: Dan Trifan <jimsth@gmail.com>
Linux v3.0.90

This is the 3.0.90 stable release.

Signed-off-by: Dan Trifan <jimsth@gmail.com>
defconfig: set bfq as the default io scheduler

Signed-off-by: Dan Trifan <jimsth@gmail.com>
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs

With this set, a lot of dangerous operations (chroot, unshare, etc)
become a lot less dangerous because there is no possibility of
subverting privileged binaries.

This patch completely breaks apparmor.  Someone who understands (and
uses) apparmor should fix it or at least give me a hint.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Dan Trifan <jimsth@gmail.com>

Conflicts:
	kernel/sys.c

Signed-off-by: Dan Trifan <jimsth@gmail.com>
Fix apparmor for PR_{GET,SET}_NO_NEW_PRIVS

Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
Allow unprivileged CLONE_NEWUTS and CLONE_NEWIPC with no_new_privs

They are normally disallowed because they could be used to subvert
setuid programs.  But if setuid is disabled, then they are safe.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
Allow unprivileged chroot when safe

Chroot can easily be used to subvert setuid programs.  If no_new_privs,
then setuid programs don't gain any privilege, so allow chroot.

Because chroot is an easy way to break out of chroot jail, CAP_SYS_ADMIN
is still required if the caller is already chrooted.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
dm crypt: backport version 1.11.0 to get support for allow_discards

Support for allow_discards was added in version 1.11.0 (Linux kernel 3.1).
This change is required to enable TRIM support in Android 4.3 when using dmcrypt encryption, as seen in (line 487):
https://android.googlesource.com/platform/system/vold/+/android-4.3_r2.1/cryptfs.c

Change-Id: I7d69b67094d5196556cf6d1541a93aea1a040874
Signed-off-by: Dan Trifan <jimsth@gmail.com>
Linux v3.0.91

This is the 3.0.91 stable release.

Signed-off-by: Dan Trifan <jimsth@gmail.com>
omap4_trimp_quirks.c: enable trimp_override to allow >= 1.4Ghz frequencies without lagging the device

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
Add sysfs vibrator intensity controls

Patch Set 2
    Removed unused variable

Patch Set 3
    Use pwm_old variable

Patch Set 4
    Add authorship

Change-Id: Ibcb887fe2c78cfd5740f363d33d1ed997c98b9c6
Signed-off-by: Dan Trifan <jimsth@gmail.com>
board-tuna-vibrator.c: Low vibrator dmesg log Spam

Signed-off-by: Dan Trifan <jimsth@gmail.com>
defconfig: fix some derps

Signed-off-by: Dan Trifan <jimsth@gmail.com>
drivers:staging:android: LMK updates from upstream + some Dorimanx goodies

Protect system process and services from OOM kill

Allow killing of protected services if the hog more than 100MB Ram

Better logging

Signed-off-by: Dan Trifan <jimsth@gmail.com>
defconfig: enable ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES

Signed-off-by: Dan Trifan <jimsth@gmail.com>
fs/proc/base.c (affects lowmemorykiller): oom_adj -17 triggers oom_score_adj of -1000

Prior to this patch, oom_score_adj was automatically calculated based
on the oom_adj value.
When setting an oom_adj value of the minium value (-17), automatically
set oom_score_adj to its minimum value (-1000) as well.

Signed-off-by: Dan Trifan <jimsth@gmail.com>
mm/oom_kill.c (affects lowmemorykiller): make tasks with oom_score_adj = -1000 unkillable

Signed-off-by: Dan Trifan <jimsth@gmail.com>
mm/oom_kill.c (affects lowmemorykiller): prevent changing oom_score_adj if its value is -1000

This should prevent that the Android OS automatically changes
its value if oom_adj -17 or oom_score_adj -1000 were explicitly
set by the user. To gain control over the variable again,
oom_adj has to be set to anything higher than -17.

Also: compare p->signal->oom_score_adj with OOM_SCORE_ADJ_MIN instead
of static value.

Signed-off-by: Dan Trifan <jimsth@gmail.com>