Skip to content

Commit

Permalink
APOLLO backports until V6.0 (#2)
Browse files Browse the repository at this point in the history
* arch/arm64/configs: unify common configs

* seperate device-specific configs

* arch/arm64/configs: disable security configs

* scripts: remove dirty version

* .gitignore: initial ignore list

* Makefile: enable ccache

* Faster Compiling

* arch/arm64/configs: add template for ds_config

* drivers: led: fix KTD2692 redefinition

* scripts: remove unit_address_vs_reg spam

* Its very annoying

Signed-off-by: Anan Jaser <ananjaser@gmail.com>

* security: remove hard enforce

* proc: Remove verifiedbootstate flag from /proc/cmdline

Userspace parses this and sets the ro.boot.verifiedbootstate prop
according to the value that this flag has. When ro.boot.verifiedbootstate
is not 'green', SafetyNet is tripped and fails the CTS test.

Hide verifiedbootstate from /proc/cmdline in order to fix the failed
SafetyNet CTS check.

* proc: Remove additional SafetyNet flags from /proc/cmdline

SafetyNet checks androidboot.veritymode in Nougat, so remove it.

Additionally, remove androidboot.enable_dm_verity and androidboot.secboot
in case SafetyNet will check them in the future.

Signed-off-by: Sultanxda <sultanxda@gmail.com>

* tcp_output: set initial TCP window size to 64K (speed improvement)

* workqueue: allow root control of wq_power_efficient

* Enable Dex with any HDMI adapter

* SQUASH: Boeffla Wakelock Driver v1.10

boeffla_wl_blocker: add generic wakelock blocker driver v1.0.0

Based on ideas of FranciscoFranco's non-generic driver.

Sysfs node:

/sys/class/misc/boeffla_wakelock_blocker/wakelock_blocker

- list of wakelocks to be blocked, separated by semicolons

/sys/class/misc/boeffla_wakelock_blocker/debug

- write: 0/1 to switch off and on debug logging into dmesg
- read:  get current driver internals

/sys/class/misc/boeffla_wakelock_blocker/version

- show driver version

Signed-off-by: andip71 <andreasp@gmx.de>

boeffla_wl_blocker: update to wakelock blocker driver v1.0.1

- currently active wakelocks on the list are forcefully killed

Signed-off-by: andip71 <andreasp@gmx.de>

 boeffla_wl_blocker: update to wakelock blocker driver v1.1.0

There are now two lists:
- the previously existing list of user defined wakelocks to block
- a new list called wakelock_blocker_default which comes prepopulated with the most common
  and safe wakelocks to block:

    qcom_rx_wakelock;wlan;wlan_wow_wl;wlan_extscan_wl;netmgr_wl;NETLINK

A combination of both wakelock lists will be blocked finally.

Signed-off-by: andip71 <andreasp@gmx.de>

boeffla_wl_blocker: increased string length limit

boeffla_wl_blocker: deleted default wakelocks

Signed-off-by: morogoku <morogoku@hotmail.com>

wl_blocker: create basic wakelock list, cronos_8890

* mali: b_r19p0: Kill userspace DVFS

* arch/arm64/configs: enable boeffla_wl_blocker

* input: Remove PM QoS latency request

Samsung sets QoS latency to zero, which disables all CPU idle functions
on input, causing high power usage, specially when Exynos 9810's M3 cores
power usage isn't friendly at all

To avoid touch latency, we'll adapt another method that significantly
improves IRQ behaviours

Signed-off-by: Diep Quynh <remilia.1505@gmail.com>

* input: touchscreen: Require low latency

Currently, CPU can enter deep sleep while waiting for data on the i2c
bug. That means an i2c read of 8 bytes can take as long as 10 ms, which
would overrun the desired interrupt handling time.
Use pm qos to require low latency and prevent CPU from entering deep
sleep while handling touch interrupts.

Bug: 110939384
Test: look at the i2c read traces:
1) ./external/chromium-trace/systrace.py --atrace-categories=view,wm,am,app,gfx,i2c,sched,irq,video,power,input,workq,freq
2) perform a fling
3) review the i2c read duration on the touchscreen bus

Change-Id: Icf8ab09324003a85af70517769ced3bae52f705c
Signed-Off-By: Siarhei Vishniakou <svv@google.com>

* mali: b_r19p0: Limit big cluster frequency only on high GPU util

This is a workaround for gaming scenairo when big cluster thermal
went over the roof, and will not interfere most latency sensitive
user workloads like web browsing

Signed-off-by: Diep Quynh <remilia.1505@gmail.com>

* selinux: add config for always_permissive

* cpufreq/exynos: Ignore ECT max frequency limits and rely on device tree values

* drivers: leds: max77865/max77705: Fade-led

* Adapted from Exynos8895 to avoid issues with no-fade

* .gitignore: update

* makefile: disable some GCC8 warnings

* usb: correct function name

Other drivers like the mtp driver use a proper 'function.name' to make the configfs work. So lets correct mass storages name which will allow drivedroid to work.

* usb: Modify mass_storage gadget to work with configfs

Signed-off-by: corsicanu <corsicanu22@gmail.com>

* arch/arm64/configs: enable mass_storage

* ip_tunnel: Fix name string concatenate in __ip_tunnel_create()
commit 000ade8016400d93b4d7c89970d96b8c14773d45 upstream.

By passing a limit of 2 bytes to strncat, strncat is limited to writing
fewer bytes than what it's supposed to append to the name here.

Since the bounds are checked on the line above this, just remove the string
bounds checks entirely since they're unneeded.

Signed-off-by: Sultan Alsawaf <sultanxda@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: corsicanu <corsicanu22@gmail.com>

* init: rename uh.8g.elf to uh.8g.elf.h to avoid getting ignored

* UPSTREAM: lib: update LZ4 compressor module

Patch series "Update LZ4 compressor module", v7.

This patchset updates the LZ4 compression module to a version based on
LZ4 v1.7.3 allowing to use the fast compression algorithm aka LZ4 fast
which provides an "acceleration" parameter as a tradeoff between high
compression ratio and high compression speed.

We want to use LZ4 fast in order to support compression in lustre and
(mostly, based on that) investigate data reduction techniques in behalf
of storage systems.

Also, it will be useful for other users of LZ4 compression, as with LZ4
fast it is possible to enable applications to use fast and/or high
compression depending on the usecase.  For instance, ZRAM is offering a
LZ4 backend and could benefit from an updated LZ4 in the kernel.

LZ4 homepage: http://www.lz4.org/
LZ4 source repository: https://github.com/lz4/lz4 Source version: 1.7.3

Benchmark (taken from [1], Core i5-4300U @1.9GHz):
----------------|--------------|----------------|----------
Compressor      | Compression  | Decompression  | Ratio
----------------|--------------|----------------|----------
memcpy          |  4200 MB/s   |  4200 MB/s     | 1.000
LZ4 fast 50     |  1080 MB/s   |  2650 MB/s     | 1.375
LZ4 fast 17     |   680 MB/s   |  2220 MB/s     | 1.607
LZ4 fast 5      |   475 MB/s   |  1920 MB/s     | 1.886
LZ4 default     |   385 MB/s   |  1850 MB/s     | 2.101

[1] http://fastcompression.blogspot.de/2015/04/sampling-or-faster-lz4.html

[PATCH 1/5] lib: Update LZ4 compressor module
[PATCH 2/5] lib/decompress_unlz4: Change module to work with new LZ4 module version
[PATCH 3/5] crypto: Change LZ4 modules to work with new LZ4 module version
[PATCH 4/5] fs/pstore: fs/squashfs: Change usage of LZ4 to work with new LZ4 version
[PATCH 5/5] lib/lz4: Remove back-compat wrappers

This patch (of 5):

Update the LZ4 kernel module to LZ4 v1.7.3 by Yann Collet.  The kernel
module is inspired by the previous work by Chanho Min.  The updated LZ4
module will not break existing code since the patchset contains
appropriate changes.

API changes:

New method LZ4_compress_fast which differs from the variant available in
kernel by the new acceleration parameter, allowing to trade compression
ratio for more compression speed and vice versa.

LZ4_decompress_fast is the respective decompression method, featuring a
very fast decoder (multiple GB/s per core), able to reach RAM speed in
multi-core systems.  The decompressor allows to decompress data
compressed with LZ4 fast as well as the LZ4 HC (high compression)
algorithm.

Also the useful functions LZ4_decompress_safe_partial and
LZ4_compress_destsize were added.  The latter reverses the logic by
trying to compress as much data as possible from source to dest while
the former aims to decompress partial blocks of data.

A bunch of streaming functions were also added which allow
compressig/decompressing data in multiple steps (so called "streaming
mode").

The methods lz4_compress and lz4_decompress_unknownoutputsize are now
known as LZ4_compress_default respectivley LZ4_decompress_safe.  The old
methods will be removed since there's no callers left in the code.

Bug: 111209481
[arnd@arndb.de: fix KERNEL_LZ4 support]
  Link: http://lkml.kernel.org/r/20170208211946.2839649-1-arnd@arndb.de
[akpm@linux-foundation.org: simplify]
[akpm@linux-foundation.org: fix the simplification]
[4sschmid@informatik.uni-hamburg.de: fix performance regressions]
  Link: http://lkml.kernel.org/r/1486898178-17125-2-git-send-email-4sschmid@informatik.uni-hamburg.de
[4sschmid@informatik.uni-hamburg.de: v8]
  Link: http://lkml.kernel.org/r/1487182598-15351-2-git-send-email-4sschmid@informatik.uni-hamburg.de
Link: http://lkml.kernel.org/r/1486321748-19085-2-git-send-email-4sschmid@informatik.uni-hamburg.de
Signed-off-by: Sven Schmidt <4sschmid@informatik.uni-hamburg.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Bongkyu Kim <bongkyu.kim@lge.com>
Cc: Rui Salvaterra <rsalvaterra@gmail.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David S. Miller <davem@davemloft.net>
Cc: Anton Vorontsov <anton@enomsg.org>
Cc: Colin Cross <ccross@android.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

(cherry picked from commit 4e1a33b105ddf201f66dcc44490c6086a25eca0b)

Change-Id: Ic9230a2534573f74a29eb5004a20cf20375fdfeb
Signed-off-by: Martin Liu <liumartin@google.com>

* lz4: fix compress max output bound

Max output size can be larger than the source length if the input data
is 'too' random. This is normal and thus should be allowed since the
caller is expected to have the actual size of the output written to be
updated via the dst_len variable.

Bug: 111209481
Change-Id: I44a8abb6fb55936f2fd47616954341ba6b0d62ec
Signed-off-by: David Lin <dtwlin@google.com>

* lib/lz4: make arrays static const, reduces object code size

Don't populate the read-only arrays dec32table and dec64table on the
stack, instead make them both static const.  Makes the object code
smaller by over 10K bytes:

  Before:
     text	   data	    bss	    dec	    hex	filename
    31500	      0	      0	  31500	   7b0c	lib/lz4/lz4_decompress.o

  After:
     text	   data	    bss	    dec	    hex	filename
    20237	    176	      0	  20413	   4fbd	lib/lz4/lz4_decompress.o

(gcc version 7.2.0 x86_64)

Link: http://lkml.kernel.org/r/20170921221939.20820-1-colin.king@canonical.com
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Sven Schmidt <4sschmid@informatik.uni-hamburg.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

* lib/lz4: update LZ4 decompressor module

Update the LZ4 compression module based on LZ4 v1.8.3 in order for the
erofs file system to use the newest LZ4_decompress_safe_partial() which
can now decode exactly the nb of bytes requested [1] to take place of the
open hacked code in the erofs file system itself.

Currently, apart from the erofs file system, no other users use
LZ4_decompress_safe_partial, so no worry about the interface.

In addition, LZ4 v1.8.x boosts up decompression speed compared to the
current code which is based on LZ4 v1.7.3, mainly due to shortcut
optimization for the specific common LZ4-sequences [2].

lzbench testdata (tested in kirin710, 8 cores, 4 big cores
at 2189Mhz, 2GB DDR RAM at 1622Mhz, with enwik8 testdata [3]):

Compressor name         Compress. Decompress. Compr. size  Ratio Filename
memcpy                   5004 MB/s  4924 MB/s   100000000 100.00 enwik8
lz4hc 1.7.3 -9             12 MB/s   653 MB/s    42203253  42.20 enwik8
lz4hc 1.8.0 -9             12 MB/s   908 MB/s    42203096  42.20 enwik8
lz4hc 1.8.3 -9             11 MB/s   965 MB/s    42203094  42.20 enwik8

[1] lz4/lz4#566
    lz4/lz4@08d347b

[2] v1.8.1 perf: slightly faster compression and decompression speed
    lz4/lz4@a31b705
    v1.8.2 perf: slightly faster HC compression and decompression speed
    lz4/lz4@45f8603
    lz4/lz4@1a191b3

[3] http://mattmahoney.net/dc/textdata.html
    http://mattmahoney.net/dc/enwik8.zip

Link: http://lkml.kernel.org/r/1537181207-21932-1-git-send-email-gaoxiang25@huawei.com
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Tested-by: Guo Xuenan <guoxuenan@huawei.com>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: Yann Collet <yann.collet.73@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Fang Wei <fangwei1@huawei.com>
Cc: Chao Yu <yuchao0@huawei.com>
Cc: Miao Xie <miaoxie@huawei.com>
Cc: Sven Schmidt <4sschmid@informatik.uni-hamburg.de>
Cc: Kyungsik Lee <kyungsik.lee@lge.com>
Cc: <weidu.du@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

* configs: disable swap and enable zram

* configs: enable INCREASE_MAXIMUM_SWAPPINESS

* mm: vmscan: adjust swap rate based on variant
* 6GB : 100
* 4GB : 160

* drivers: cal-if, fimc-is2: Supress warnings

* drivers/net/wireless: suppress GCC8+ warnings

* block/zram: force usage of lz4

* kernel: Use the stock config for /proc/config.gz

Userspace reads /proc/config.gz and spits out an error message after boot
finishes when it doesn't like the kernel's configuration. In order to
preserve our freedom to customize the kernel however we'd like, show
userspace the stock config so that it never complains about our
kernel configuration.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: corsicanu <corsicanu22@gmail.com>

* power/wl_blocker: add default LIST_WL_DEFAULT

* configs: update configs

* disable logging
* adjust compressors
* other misc changes

* makefile: ignore more warnings

* selinux: reduce calls to context_struct_to_string()

context_struct_to_string() contains expensive kmalloc() calls.

In most cases, there's no purpose in calling context_struct_to_string()
on !CONFIG_AUDIT as logs won't be saved anyways.

Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>

* drivers/staging: wrap around ion debug

* drivers: disable useless warnings

* arch: arm64: config: disable exynos hpgov

* driver: leds: fix derp

* HACK: fs/proc: block access to mounts for IsolatedService

Prevents Magisk mount leakage and root detection by apps with unmodified detection code from here:
https://darvincitech.wordpress.com/2019/11/04/detecting-magisk-hide/

Example: https://play.google.com/store/apps/details?id=ua.gov.diia.app

oryginal commit: acroreiser/android_kernel_lenovo_a6010@d17c01f
---

* Revert "proc: Remove additional SafetyNet flags from /proc/cmdline"

This reverts commit 747a7e2f14bcaed2a30976786c878975f2525d41.

* Revert "proc: Remove verifiedbootstate flag from /proc/cmdline"

This reverts commit 4f10c9a9e2ea8848a679a108680f91be311ec8dd.

* fs/proc: replace cmdline values

* fs/proc: update safetynet flags

* makefile: dont optimize for size

* configs: CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE

* configs: adjust tcp/net configs

* configs: dont compile gator as module

* configs: update bcmdhd configs

* DS: add scripts

* A.I.K by osm0sis
* Build script
* Thanks to @ananjaser1211 for this awesome kernel maker module

* configs: disable mali secure rendering

* needed for new Graphics stack

* drivers: input: add new HALL_IC node

* Another HALL node change by samsung

* DS: commit product dir

* configs: enable HALL_NEW_NODE

* drivers: video: port Adaptive EyeComfort shield from davinci

* Note 10 mdnie

* drivers: leds: fix LED fade control

* cfg80211: Add feature flag for Fast Initial Link Setup (FILS) as STA
This defines a feature flag that drivers can use to indicate that they
support FILS authentication/association (IEEE 802.11ai) when using user
space SME (NL80211_CMD_AUTHENTICATE) in station mode.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>

* cfg80211: Add support for randomizing TA of Public Action frames
Add support to use a random local address (Address 2 = TA in transmit
and the same address in receive functionality) for Public Action frames
in order to improve privacy of WLAN clients. Applications fill the
random transmit address in the frame buffer in the NL80211_CMD_FRAME
command. This can be used only with the drivers that indicate support
for random local address by setting the new
NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA and/or
NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED in ext_features.

The driver needs to configure receive behavior to accept frames to the
specified random address during the time the frame exchange is pending
and such frames need to be acknowledged similarly to frames sent to the
local permanent address when this random address functionality is not
used.

Signed-off-by: vamsi krishna <vamsin@qti.qualcomm.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>

* configs: adjust net configs

* scripts: dtc: remove duplicate yylloc symbol

* drivers: input: add custom ForceTouch handler

* This handler mimicks stock OneUI Q functionality of ForceTouch
* Will trigger HomeKey when the screen on and vibration feedback
* Pressure level is set to default (Might need revision)
* Vibration intensity is increased via ramdisk using this node

* chown system system /sys/class/timed_output/vibrator/force_touch_intensity
* write /sys/class/timed_output/vibrator/force_touch_intensity 10000
Signed-off-by: Anan Jaser <ananjaser@gmail.com>

* configs: enable custom ForceTouch

* drivers: leds-max: set default fade duration to 200ms

* binder_alloc: Avoid page memory allocation in high memory

In binder, using GFP_HIGHMEM will result in the allocated memory
not to be mapped in the kernel's virtual address space.
This prevents the kernel from being capable of directly
referring it.

Change-Id: I952dbc8ae205e47fa00ddf186ef306903f623367
Signed-off-by: Panchajanya1999 <panchajanya@azure-dev.live>
Signed-off-by: Jebaitedneko <Jebaitedneko@gmail.com>

* arm64/kernel: kaslr: reduce module randomization range to 4 GB

We currently have to rely on the GCC large code model for KASLR for
two distinct but related reasons:
- if we enable full randomization, modules will be loaded very far away
  from the core kernel, where they are out of range for ADRP instructions,
- even without full randomization, the fact that the 128 MB module region
  is now no longer fully reserved for kernel modules means that there is
  a very low likelihood that the normal bottom-up allocation of other
  vmalloc regions may collide, and use up the range for other things.

Large model code is suboptimal, given that each symbol reference involves
a literal load that goes through the D-cache, reducing cache utilization.
But more importantly, literals are not instructions but part of .text
nonetheless, and hence mapped with executable permissions.

So let's get rid of our dependency on the large model for KASLR, by:
- reducing the full randomization range to 4 GB, thereby ensuring that
  ADRP references between modules and the kernel are always in range,
- reduce the spillover range to 4 GB as well, so that we fallback to a
  region that is still guaranteed to be in range
- move the randomization window of the core kernel to the middle of the
  VMALLOC space

Note that KASAN always uses the module region outside of the vmalloc space,
so keep the kernel close to that if KASAN is enabled.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>

* configs: update stock_defconfig

* apollo: Disable SE Permissive

* apollo: uprev to v2.0

* apollo: add checks in PACK_BOOT_IMG

* drivers: battery: add ENABLE_FULL_BY_SOC

* drivers: gpu: fix exynos frontend compilation

* dts: disable gpu_inter_frame_pm

* Disabled in S

* apollo: support korean models

* apollo: let the build script handle dts

* apollo: fix dts config in BUILD_ALL

* apollo: add selinux toggle

* DS: clone hades Kernelzip installer

* DS/kernelzip: wire-in Korean support

* DS/kernelzip: use new naming structure

* Apollo: Add ZIP Packager

* Utilizing bsdiff to create patch files
* produces small kernel flashable zips
* Only available on option 7 (Build all)

* DS: update ramdisk

* apollo: rm kernel always

* a failed compilation after zippackage will leave a kernel image which will show a successful compilation even though it failed

* apollo: add -d argument

* usage : ./apollo.sh -d

* Compiles a pre-defined kernel and skips boring config options

* Revert "arch: arm64: config: disable exynos hpgov"

This reverts commit dbe72cb1211c74299aa2788a0e1424baeb594d69.

* dts: Remove mali little cluster boost

This is the main cause of massive heat during heavy gaming

* Apollo: Misc script updates

* Export -Permissive name
* Re-do kernelzip version scheme
* Set to 3.0

* boeffla_wl_blocker: update default block list

* wlan* causes too much wakelocks and can be disabled without issues

* boeffla_wl_blocker: enable WL blocker by default

* For non-root users

* Apollo: Update script

* Add GCC13
* Reorganize
* V3.1

* drivers: battery_v2: sec_battery: Include Battery Limiter hooks

* G977BXXUBGULB

* Requires DTS + Charger support

* drivers: battery_v2: max77705: Include Battery Limiter

* G977BXXUBGULB
* Note 9 support only

* dts: crownlte: Add ttf_charging limit

* Based on Calculation in G977BXXUBGULB/N770FXXU8FUL7
* Capacity * 90% / 100

* drivers: battery_v2: max77865: Include Battery Limiter

* Initial import from max77705 Driver
* WIP

* drivers: battery_v2: max77865: Adapt Battery Limiter for max77865

* dts: star: Add ttf_charging limit

* Based on Calculation in G977BXXUBGULB/N770FXXU8FUL7
* Capacity * 90% / 100

* dts: add enc_ts_delta

* needed by new MFC

* configs: enable UNIX_SCM

* unset USB_HOST_RELOAD

* ipv6: Fix nlmsg_flags when splitting a multipath route

[ Upstream commit afecdb376bd81d7e16578f0cfe82a1aec7ae18f3 ]

When splitting an RTA_MULTIPATH request into multiple routes and adding the
second and later components, we must not simply remove NLM_F_REPLACE but
instead replace it by NLM_F_CREATE. Otherwise, it may look like the netlink
message was malformed.

For example,
	ip route add 2001:db8::1/128 dev dummy0
	ip route change 2001:db8::1/128 nexthop via fe80::30:1 dev dummy0 \
		nexthop via fe80::30:2 dev dummy0
results in the following warnings:
[ 1035.057019] IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE
[ 1035.057517] IPv6: NLM_F_CREATE should be set when creating new route

This patch makes the nlmsg sequence look equivalent for __ip6_ins_rt() to
what it would get if the multipath route had been added in multiple netlink
operations:
	ip route add 2001:db8::1/128 dev dummy0
	ip route change 2001:db8::1/128 nexthop via fe80::30:1 dev dummy0
	ip route append 2001:db8::1/128 nexthop via fe80::30:2 dev dummy0

Fixes: 2759647 ("ipv6: fix ECMP route replacement")
Signed-off-by: Benjamin Poirier <bpoirier@cumulusnetworks.com>
Reviewed-by: Michal Kubecek <mkubecek@suse.cz>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

* config: add CONFIG_KPROBE_EVENTS

* DS: update ramdisk

* fs: proc: proc_avc: increase buffer to 1MB

* 256KB fills up fast

* dts: restore mali little cluster boost

* And fix triple/quad freqs to stock

* dts: disable KAP/RKP reserved regions

* dts: update domain@1 upscale_ratio_table freqvar-tune

* Sync with N770F_13

* printk: silence healthd messages from userspace

Constant messages about battery status every second doesn't help battery
or debugging.

* printk: silence TEE logs from userspace

- Spams logs, pushing out useful messages
- Reduces security because it exposes internal information

* PM/Sleep: Start killing wakelocks after two minutes of idle (120s)

* gpu: gpex: add enforced min freq

* in cases of full DVFS throttling, this will enforce a minimum GPU frequency that is usable. at 385mhz

* Avoid excessive thermal throttling on stock DVFS during gaming. This frequency
has been tested, giving the best thermal stability

* dts: exynos9810: increase policy_max

* dts: exynos9810: Sync camera DVFS/MIF with SM-N770F

* Camera

600000 > 640000

DVFS_CAM_L9 > DVFS_CAM_L5

* MIF

1014000 > 2093000

DVFS_MIF_L6  > DVFS_MIF_L1

* Add Levels for more scenarios including UHD
* This boosts Camera lunching and usage

* drivers: sensorhub: bcrm: ssp: disable debugging

* drivers: exynos-ufc/cpuidle: import exynos-ucc

* From Exynos9820

* Hook into control_boost

* Allows for cstate_control

* drivers: input: Import Univesal9820 Input_booster

* Import generic and LSI booster only
* This needs adaptation to work on 9810. alot of it

* drivers: input: input_booster_lsi: switch to ehmp

* and remove tri-cluster setup

* drivers: input: input_booster_lsi: fix rkpp request

* we use request_kernel_prefer_perf

* drivers: input: input.c: Remove old input_booster

* This seems to be the old Exynos7 Input_Booster which is now replaced with standard LSI input_booster

* dts: add new ARGOS config

* Taken from N770F

* New driver allows for 3 levels per boost device for more granual approach

* configs: enable new ARGOS booster

* And add SEC_INPUT_BOOSTER config to remember its enabled

* configs: move ported configs to ds_defconfig

* to disable if needed

* drivers: cpufreq: backport cpufreq_times from Exynos9820

* ANDROID: uid_sys_stats: avoid double accounting of dying threads

When a thread is being killed process_notifier() is called to record
the final accounting of the thread. But after that uid_cputime_show()
and add_uid_io_stats() can be called before the dying thread is
removed from the parent's thread_group resulting in double accounting.

This can cause the user and system time for a given UID to move
backwards in /proc/uid_cputime/show_uid_stat. That gives negative delta
times in KernelCpuUidUserSysTimeReader.readDeltaImpl() and it logs
an error:

"Negative user/sys time delta for UID=..."

One consequence of which was incorrectly calculated power consumptions
in BatteryStats.

With this change we avoid the double accounting by ignoring the thread
if it has the PF_EXITING flag set.

Bug: 144366911

Change-Id: I6b929e8f558cd81ce1c00481c8b550d24877aa2c
Signed-off-by: Rickard Möller <rickard.moller@sony.com>

* cpu: Silence log spam when a CPU is brought up

* Horrible clutter with hotplug on

* binder: supress binder logging

* Set binder_debug_mask to 0 to suppress excessive logging, causing
additional latency.

* Binder logging is rarley helpful

* mm: Change max readahead size to 64 KiB

We don't need such high readahead considering how fast our UFS storage
is. Additionally, arter97 mentioned the possibility of readahead values
lower than 128 KiB performing better on Twitter [1].

Reduce the readahead from 512 KiB to 64 KiB.

[1] https://twitter.com/arter97/status/1003054292897370112

* arm64: lib: memory utilities optimization

Optimize memcpy and memmove, to prefetch several cache lines.
We can achieve 15% memcpy speed improvement with the preload method.

Change-Id: I2259b98a33eba0b7466920b3f270f953e609cf13
Signed-off-by: Hong-Mei Li <a21834@motorola.com>
Reviewed-on: http://gerrit.mot.com/740766
SLTApproved: Slta Waiver <sltawvr@motorola.com>
SME-Granted: SME Approvals Granted
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Zhi-Ming Yuan <a14194@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Signed-off-by: Joe Maples <joe@frap129.org>

* arm64: strcmp: align to 64B cache line

Align strcmp to 64B. This will ensure the preformance critical
loop is within one 64B cache line.

Change-Id: I9240fbb4407637b2290a44e02ad59098a377b356
Signed-off-by: Yuanyuan Zhong <zyy@motorola.com>
Reviewed-on: https://gerrit.mot.com/902536
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Yi-Wei Zhao <gbjc64@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: kdrag0n <dragon@khronodragon.com>

* fs: proc: proc_avc: increase buffer to 4MB

* We need to debug some delayed issues

* drivers: gpu: r38p1: silence warning

* Removes drivers/gpu/arm/bv_r38p1/Kconfig:389:warning: ignoring type redefinition of 'MALI_ARBITRATION' from 'boolean' to 'tristate'

* mfc: Reduce QoS boosting from Samsung hacks

By default, everything is set to 240fps for optimal playback performance
However, the situation is not always true, as it applies to cases when
the video bitrate isn't necessarily high, causing high power consumption

Reduce and limit the boosting needed. For decoder, only apply for UHD
video resolution

Signed-off-by: Diep Quynh <remilia.1505@gmail.com>

* drivers: gud: MobiCoreDriver: allow swap_ref to remain unused

* arch: arm64: hw_breakpoint: fix warnings

arch/arm64/kernel/hw_breakpoint.c: In function ‘arch_bp_generic_fields’:
arch/arm64/kernel/hw_breakpoint.c:364:5: note: parameter passing for argument of type ‘struct arch_hw_breakpoint_ctrl’ changed in GCC 9.1
  364 | int arch_bp_generic_fields(struct arch_hw_breakpoint_ctrl ctrl,

* Revert "dts: exynos9810: increase policy_max"

This reverts commit 91c7a0f9269504e66020f41399480fe01e9e0ec9.

* drivers: motor: adapt vibration type from beyondx

* gets rid of

2023-04-27 16:58:05.073 5029-5029/? E/SecVibrator-HAL2.2_A: isNodeExistForRead node:/timed_output/vibrator/motor_type
2023-04-27 16:58:05.073 5029-5029/? E/SecVibrator-HAL2.2_A: false

* Add LINERA_1040 Type from Beyond which uses the same haptic motor as us

2023-04-27 17:39:58.111 5544-5544/? I/VibratorController: sehSupportsEnhancedSamsungHapticPattern hidl vendor
2023-04-27 17:39:58.111 5041-5041/? E/SecVibrator-HAL2.2_A: isNodeExistForRead node:/timed_output/vibrator/motor_type
2023-04-27 17:39:58.111 5041-5041/? E/SecVibrator-HAL2.2_A: true
2023-04-27 17:39:58.111 5041-5041/? E/SecVibrator-HAL2.2_A: sehSupportsEnhancedSamsungHapticPattern string : LINEAR_1040
2023-04-27 17:39:58.111 5041-5041/? E/SecVibrator-HAL2.2_A: sehSupportsEnhancedSamsungHapticPattern string len : 11

* dts: define vibration type

* Taken from beyondx , see previoud commit

* dts: use beyondx haptic tune

* Slight difference. more punchy

* drivers: motor: update sec_haptic

* From beyondx

* drivers: video: exynos: merge AOD timer delay from beyondx

* Revert "drivers: cpufreq: cpufreq_driver_fast_switch from N770F"

This reverts commit 6aa9a428b615e5d5b8c29d695550503b52382d4e.

* drivers: input: evdev: add input booster init

* dts: input_booster: Setup for Universal9820 Input_booster

* input: input_booster.h: add slab.h include

* ANDROID: mm: do not try test_page_isolate if migration fails

Currently, alloc_contig_range expects that even though a page fails
with -EBUSY from __alloc_contig_migrate_range, it want to check
those failed pages in test_pages_isolated again with hope that
those page would be freed soon so cma allocatoin would be succeeded.
However, it depends on the luck and I found sometimes test_page_isolated
constantly fails at the page repeatedly whenever cma_alloc retried.
Rather than burning out CPU to check the page's status in
test_pages_isolated for GFP_NORETRY allocation, just bail out and
relies on the user what they want to do.
Currently, this option works for only __GFP_NORETRY case for safe
of existing other users.

Bug: 192475091
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Change-Id: I9211452be06960dc7d8f854537e53b3fc5262c8e

* soc: samsung: acpm: extend the timeout for acpm ipc retry

Extend it from 15ms to 200ms

Bug: 172883429
Change-Id: I39e8e860dfeaa4d1d3b702f06dca51dd01bc8367
Signed-off-by: Redick Lin <redicklin@google.com>

* config: enable AUDIT_GENERIC

* config: sync few configs with N770F

* config: advertise SAE support to BCMDHD

* config: update and sync net with N770F

* Revert "ANDROID: mm: do not try test_page_isolate if migration fails"

This reverts commit f55eb9b5210ba221219e0237a82e1efce60712b2.

* dts: star2/crown: Increase RBIN/Camera Reserved Memory

* On android 13 often times camera lags the entire system while opening, this seems to be due to heavy plugins and small reserved memory
* This increases reserved memory by 100MB so camera will have 550MB available at all times
* So far Dualcam (portrait) modes, camera load time and changing modes show improvement
* star is skipped due to 4GB system memory + single cam setup has 220MB pre-allocated

Original :
star		239075328
star2/crown	461373440 (450.5 MB Actual)

New :
star		239075328
star2/crown	566231040 (552.9 MB Actual)

* mm: add sec_mm from F62/9820

* mm: sec_mm: adapt for exynos9810

* fix show_mem args

* we dont use global_zone

* configs: ds_defconfig: enable sec_mm

* arm64: kernel: hide CPU hotplug logging

* Detected VIPT I-cache on CPU7

* soc: hotplug: hide more logging

* configs/ds_defconfig: update cgroups

* Sync with N770F
* Enable CONFIG_BLK_CGROUP to fix this error

W/libprocessgroup: Failed to open /dev/blkio//cgroup.procs: No such file or directory

* mm: Increase vmstat interval

Red Hat linux states that vmstat updates can be mildly expensive.
Increase from 1 second to 1 minute.

Signed-off-by: Tyler Nijmeh <tylernij@gmail.com>
[ghostrider-reborn] Reduce to 10s
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Signed-off-by: Dakkshesh <dakkshesh5@gmail.com>

* drivers: freecess: port exynos9820 freecess

* Newer versions seem to have different logic for handling newer android versions

* drivers: kernelsu: add KernelSU importer and patches

* drivers/kernelsu: patch for our vfs_statx support

* drivers/kernelsu: update KernelSU importer patches

* selinux: Allow init exec ksud under nosuid

For KernelSU modules support on ≤ 4.14 kernels

Change-Id: Ia8ea8fcb9bdea6bc7c338a993a50b9c07d46cd64

* fs: Add KernelSU calls manually

- Guide: https://kernelsu.org/guide/how-to-integrate-for-non-gki.html
- Wrap them with `if` macros.
- These modifications are required when `CONFIG_KPROBES` is not enabled.
- This fixes compile errors when `CONFIG_KSU` and `CONFIG_KPROBES` are enabled at the same time.
- For kernel 4.9

* configs/exynos9810_defconfig: disable KPROBES for now

* seems to make KSU app hang
* this will enable manual hooks due to if guards
* should re-test later with kprobes again

* f2fs/gc: Reduce GC thread urgent sleep time to 50ms

Android sets the value to 50ms via vold's IdleMaint service. Since
500ms is too long for GC to colllect all invalid segments in time
which results in performance degradation.

On un-encrypted device, vold fails to set this value to 50ms thus
degrades the performance over time.

Change-Id: I80f2c29558393d726d5e696aaf285096c8108b23

* MoroSound v2.1.1: Sound driver for Galaxy S9 (Madera CS47L92)

- Headphone Gain control
- 5 Bands Equalizer

Based on the Boeffla Sound 1.6 for Galaxy S3

Credits: andip71, author of Boeffla Sound
	 Supercurio, Yank555 and Gokhanmoral.

	 AndreiLux, for his Arizona control sound mod

	 Flar2, for his speaker gain mod

Signed-off-by: djb77 <dwayne.bakewell@gmail.com>

* MoroSound: Add speaker and earpiece boost directly to sound driver

We are setting our gains on every speaker and earpiece executing with static defs

* MoroSound: v2.2.0: mic gains and mono sound

- Rewrite and optimize driver

- Mono sound for Headphones
  /sys/devices/virtual/misc/moro_sound/headphone_mono

- Mic Gain settings for 3 mics:
  /sys/devices/virtual/misc/moro_sound/mic_down_gain (Main Mic, at the bottom)
  /sys/devices/virtual/misc/moro_sound/mic_up_gain (Secundary Mic, at the top)
  /sys/devices/virtual/misc/moro_sound/mic_hp_gain (Headphone Mic)

- Add a reset button
  /sys/devices/virtual/misc/moro_sound/reset

by @morogoku - Dec 2020

Signed-off-by: morogoku <morogoku@hotmail.com>

* MoroSound: set speaker and earpiece boost to dynamic

This change will let user to change volume boosts while playing music

* MoroSound: revert Mixers sources to stock ones

* MoroSound: fix and optimize code

* MoroSound: use correct MICs for 9810

* MoroSound: make speaker and earpiece gain more detailed

* configs: move morosound to ds_defconfig

* wake_gestures: sweep2wake, doubletap2wake and sweep2sleep for Samsung Galaxy S9

x

wake_gestures: adjust sweep

wake_gestures: fix merge error

x

* wake_gestures: doubletap2wake: add custom tapping count control

* configs/ds_defconfig: enable CONFIG_WAKE_GESTURES

* green screen exynos workaround

* panel: make green screen exynos workaround as a sysfs option

* do not run green screen patch if AoD active

* run green screen fix before panel power on

* configs/ds_defconfig: switch to TCP Westwood

* Revert "tcp_output: set initial TCP window size to 64K (speed improvement)"

* configs: disable ANDROID_PARANOID_NETWORK

* configs: enable cifs and nfs

* net/wireguard: add wireguard importer

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

* Revert "mm: Change max readahead size to 64 KiB"

This reverts commit 159d3d461d95d3a4af99c6188b24aaefc2078129.

* configs: update CIFS/NFS Configs

* configs/ds_defconfig: enable wireguard

* scripts: ksu: chmod script

* configs: enable high swaprate

* Seems that Android 13 100~130 is needed and 60 in android 12

* mm: vmscan: update memory_boosting

* from M625F
* Throttling for KSWAPD

* configs: exynos9810: enable KALLSYMS_ALL And misc

* Needed for APatch

* Also enable usb serial

* kernelsu: backport path_umount

* .gitignore: dont commit KSU

* Revert "drivers: freecess: port exynos9820 freecess"

This reverts commit cce749a06972ffc07cab7044addb7d7a14daf48c.

* drivers: binder: add new changes from N770F

* remove unused process freezer

* drivers: freecess: port exynos9820 freecess

* Newer versions seem to have different logic for handling newer android versions

* binder: implement SAMSUNG_FREECESS back

* Port latest version from exynos9820

* kernelsu: switch to local fork

* drivers: block: loop: upstream

* adds LOOP_SET_BLOCK_SIZE IOCTL

* apollo: import latest apollo script

* Revert "scripts/dtc: Remove redundant YYLOC global declaration"

This reverts commit 9ee40d3.

* Revert "drivers: block: loop: upstream"

This reverts commit 8f1b1c1.

* Revert "drivers: cal-if, fimc-is2: Supress warnings"

This reverts commit 7a43eac.

* Revert "drivers/net/wireless: suppress GCC8+ warnings"

This reverts commit cd630bc.

* Revert "configs: dont compile gator as module"

This reverts commit 04a4ab3.

* configs/exynos9810_defconfig: enable CONFIG_ION_EXYNOS_STAT_LOG

* Fixes compilation error

---------

Signed-off-by: Anan Jaser <ananjaser@gmail.com>
Signed-off-by: Sultanxda <sultanxda@gmail.com>
Signed-off-by: Diep Quynh <remilia.1505@gmail.com>
Signed-off-by: Siarhei Vishniakou <svv@google.com>
Signed-off-by: corsicanu <corsicanu22@gmail.com>
Signed-off-by: Sultan Alsawaf <sultanxda@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Martin Liu <liumartin@google.com>
Signed-off-by: David Lin <dtwlin@google.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: vamsi krishna <vamsin@qti.qualcomm.com>
Signed-off-by: Panchajanya1999 <panchajanya@azure-dev.live>
Signed-off-by: Jebaitedneko <Jebaitedneko@gmail.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Benjamin Poirier <bpoirier@cumulusnetworks.com>
Signed-off-by: Rickard Möller <rickard.moller@sony.com>
Signed-off-by: Hong-Mei Li <a21834@motorola.com>
Signed-off-by: Joe Maples <joe@frap129.org>
Signed-off-by: Yuanyuan Zhong <zyy@motorola.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: kdrag0n <dragon@khronodragon.com>
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Signed-off-by: Redick Lin <redicklin@google.com>
Signed-off-by: Tyler Nijmeh <tylernij@gmail.com>
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Signed-off-by: Dakkshesh <dakkshesh5@gmail.com>
Signed-off-by: djb77 <dwayne.bakewell@gmail.com>
Signed-off-by: morogoku <morogoku@hotmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Co-authored-by: Anan Jaser <ananjaser@gmail.com>
Co-authored-by: Sultanxda <sultanxda@gmail.com>
Co-authored-by: andip71 <andreasp@gmx.de>
Co-authored-by: matthewdalex <matthewalex@linux.com>
Co-authored-by: Barna Keresztes <kbarni@kbarni.net>
Co-authored-by: Diep Quynh <remilia.1505@gmail.com>
Co-authored-by: Siarhei Vishniakou <svv@google.com>
Co-authored-by: Noxxxious <f.catzgerald@gmail.com>
Co-authored-by: jimzrt <james.tophoven@gmail.com>
Co-authored-by: Sven Schmidt <4sschmid@informatik.uni-hamburg.de>
Co-authored-by: David Lin <dtwlin@google.com>
Co-authored-by: Colin Ian King <colin.king@canonical.com>
Co-authored-by: Gao Xiang <gaoxiang25@huawei.com>
Co-authored-by: FAROVITUS <farovitus@gmail.com>
Co-authored-by: corsicanu <corsicanu22@gmail.com>
Co-authored-by: Sultan Alsawaf <sultan@kerneltoast.com>
Co-authored-by: Park Ju Hyung <qkrwngud825@gmail.com>
Co-authored-by: Jaroslav Zviezda <acroreiser@gmail.com>
Co-authored-by: Lukas Berger <mail@lukasberger.at>
Co-authored-by: Jouni Malinen <jouni@qca.qualcomm.com>
Co-authored-by: Panchajanya1999 <panchajanya@azure-dev.live>
Co-authored-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Co-authored-by: Benjamin Poirier <bpoirier@cumulusnetworks.com>
Co-authored-by: kdrag0n <dragon@khronodragon.com>
Co-authored-by: Tyler Nijmeh <tylernij@gmail.com>
Co-authored-by: synt4x93 <synt4x.93@gmail.com>
Co-authored-by: xxmustafacooTR <mustafa.gokmen2004@gmail.com>
Co-authored-by: Rickard Möller <rickard.moller@sony.com>
Co-authored-by: Hong-Mei Li <a21834@motorola.com>
Co-authored-by: Yuanyuan Zhong <zyy@motorola.com>
Co-authored-by: Dylan Neve <dylanneve1@gmail.com>
Co-authored-by: Divyanshu-Modi <divyan.m05@gmail.com>
Co-authored-by: Minchan Kim <minchan@google.com>
Co-authored-by: Redick Lin <redicklin@google.com>
Co-authored-by: F-19-F <58457605+F-19-F@users.noreply.github.com>
Co-authored-by: Pzqqt <821026875@qq.com>
Co-authored-by: Panchajanya1999 <rsk52959@gmail.com>
Co-authored-by: djb77 <dwayne.bakewell@gmail.com>
Co-authored-by: morogoku <morogoku@hotmail.com>
Co-authored-by: flar2 <asegaert@gmail.com>
Co-authored-by: AeRo <pawellaszczyk2003@gmail.com>
Co-authored-by: Jason A. Donenfeld <Jason@zx2c4.com>
Co-authored-by: ExtremeXT <75576145+ExtremeXT@users.noreply.github.com>
  • Loading branch information
1 parent 5470218 commit 02891cb
Show file tree
Hide file tree
Showing 318 changed files with 18,248 additions and 10,152 deletions.
25 changes: 24 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,27 @@ arch/arm64/boot/dts/samsung/*.reverse.dts
# Misc

scripts/crypto/__pycache__/
scripts/fmp/__pycache__/
scripts/fmp/__pycache__/

# DS
drivers/gator_5.27/gator_src_md5.h
firmware/five/ffffffff000000000000000000000072.tlbin
scripts/rkp_cfp/common.pyc
scripts/rkp_cfp/tmp/
security/proca/proca_certificate-asn1.c
security/proca/proca_certificate-asn1.h
security/samsung/defex_lsm/cert/pubkey_eng.der
security/samsung/defex_lsm/cert/pubkey_user.der
security/samsung/defex_lsm/defex_packed_rules.inc
security/samsung/defex_lsm/pack_rules
arch/arm64/boot/dts/exynos/*.dtb
arch/arm64/boot/dts/exynos/*.reverse.dts
arch/arm64/boot/dtb.img
scripts/dtbtool_exynos/dtbtool
DS/Out/*.img
DS/Product/*.img
DS/Out/kernelzip/*
DS/Product/*.zip

# KSU
drivers/kernelsu/*
69 changes: 69 additions & 0 deletions DS/A.I.K/authors.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
mkbootimg, unpackbootimg:
https://github.com/CyanogenMod/android_system_core/tree/cm-10.2/mkbootimg (initial sources)
https://github.com/huaixzk/unpackbootimg (makefiles)
https://github.com/osm0sis/mkbootimg (patches)

pxa-mkbootimg, pxa-unpackbootimg:
https://github.com/AKuHAK/pxa-mkbootimg (initial source)
https://github.com/osm0sis/pxa-mkbootimg (patches)

elftool:
https://bitbucket.org/srl3gx/elftool (initial source)
https://github.com/osm0sis/elftool (patches)

unpackelf:
https://github.com/tobiaswaldvogel/and_boot_tools/tree/master/bootimg (initial source)
https://github.com/osm0sis/unpackelf (patches)

dumpimage, mkimage:
http://www.denx.de/wiki/U-Boot/WebHome

mkmtkhdr:
https://github.com/omnirom/android_device_oppo_r819/tree/android-4.4/mkmtkbootimg (initial source)
https://github.com/osm0sis/mkmtkhdr (patches)

loki_tool:
https://github.com/djrbliss/loki

futility:
https://github.com/jcadduono/platform_external_vboot_reference (initial source)
https://github.com/osm0sis/futility (patches)

BootSignature.jar (requires JRE 8):
https://forum.xda-developers.com/android/software-hacking/signing-boot-images-android-verified-t3600606

blobpack, blobunpack:
https://github.com/AndroidRoot/BlobTools

dhtbsign:
https://github.com/chiefwigms/degas-mkbootimg/tree/galaxy_tab_a_smt285 (initial source)
https://github.com/osm0sis/dhtbsign (patches)

rkcrc:
https://github.com/rockchip-linux/rkflashtool

kernel_dump:
https://forum.xda-developers.com/crossdevice-dev/sony/tool-unpack-format-sony-kernel-image-t3530077

lz4:
http://lz4.github.io/lz4/

magic:
http://www.darwinsys.com/file/

cpio, dd, file, lzop, tail, xz; libiconv.2, libintl.8, liblzma.5, liblzo2.2, libmagic.1 (macOS):
https://www.macports.org/

gzip, bzip2, lzop, xz; awk, basename, bash, cpio, cut, dd, dirname, env, file, find, grep, printf, stat, sudo, tail, wc (Linux):
(required system packages/commands)

androidbootimg.magic:
osm0sis@xda-developers

shell scripts:
osm0sis@xda-developers (scripting)
Peteragent5, alansj & iridaki@xda-developers (general method)
SuperR. & tobias.waldvogel@xda-developers (kernel.elf to boot.img general method)
_that & rayman@xda-developers (boot.blob general method)
Chainfire@xda-developers (ChromeOS and SEAndroid general methods)
cybojenix@xda-developers (Bump general method)
Binary file added DS/A.I.K/bin/BootSignature.jar
Binary file not shown.
89 changes: 89 additions & 0 deletions DS/A.I.K/bin/androidbootimg.magic
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#------------------------------------------------------------------------------
# Various Android OEM non-standard boot image related magic entries
# osm0sis @ xda-developers
#------------------------------------------------------------------------------

# ASUS Blob Signature
0 string -SIGNED-BY-SIGNBLOB- BLOB signing

# Barnes & Noble Nook Signature
64 string Red\x20Loader NOOK signing (red loader)
64 string Green\x20Loader NOOK signing (green loader)
64 string Green\x20Recovery NOOK signing (green recovery)
64 string eMMC\x20boot.img+secondloader NOOK signing (emmc boot)
64 string eMMC\x20recovery.img+secondloader NOOK signing (emmc recovery)
48 string BauwksBoot NOOKTAB signing (bauwks)

# Google ChromeOS Signature
0 string CHROMEOS CHROMEOS signing

# Samsung/Spreadtrum DHTB Signature
0 string DHTB\x01\x00\x00 DHTB signing

# Sony SIN Packaging/Signature
0 string \x01\x00\x00\x00 SIN signing v1
0 string \x02\x00\x00\x00 SIN signing v2
0 string \x03SIN SIN signing v3

# Google Pixel/Nexus/AOSP Standard
# [test "x" as workaround to odd file/magic behavior not allowing search here]
0 string x
>0 search ANDROID! AOSP bootimg
>>36 string \x00\x00\x00\x02 \b, PXA variant (020)
>>36 string \x00\x00\x80\x02 \b, PXA variant (028)
>>36 string \x00\x00\x00\x03 \b, PXA variant (030)
>>1024 search LOKI\x01 \b, LOKI header (recovery)
>>1024 search LOKI\x00 \b, LOKI header (boot)
>>2048 search \x88\x16\x88\x58 \b, MTK headers
!:strength * 2

# DENX U-Boot
0 string \x27\x05\x19\x56 U-Boot bootimg

# Intel OS
0 string $OS$\x00\x00\x01 OS bootimg

# Rockchip KRNL
0 string KRNL KRNL bootimg

# Sony ELF
0 string \x7FELF ELF
>5 string \x01\x01\x61 bootimg
>18 string \x28 (ARM
>18 string \x03 (x86_
>18 string \x08 (MIPS
>4 string \x01 \b)
>4 string \x02 \b64)
>0 search \x88\x16\x88\x58 \b, MTK headers

# MediaTek MTK
# [for detection after boot image has already been split]
0 search \x88\x16\x88\x58 MTK header
>0 search KERNEL \b, kernel type
>0 search ROOTFS \b, rootfs type
>0 search RECOVERY \b, recovery type
!:strength / 15

# Qualcomm Device Tree
# [for detection after boot image has already been split]
0 string QCDT QCDT header
!:strength / 15

# Google Android Verified Boot Signature
# [for detection with the tail of the boot image]
0 search \x02\x01\x01\x30\x82 AVB signing v1 footer
>0 search /boot \b, boot type
>0 search /recovery \b, recovery type
!:strength / 15

# LG Bump
# [for detection with the tail of the boot image]
0 search \x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79 Bump footer
!:strength / 15

# Samsung SEAndroid
# [for detection with the tail of the boot image]
# [test "x" as workaround to odd file/magic behavior not allowing search here]
0 string x
>0 search SEANDROIDENFORCE SEAndroid footer
!:strength / 15
Binary file added DS/A.I.K/bin/avb/verity.pk8
Binary file not shown.
24 changes: 24 additions & 0 deletions DS/A.I.K/bin/avb/verity.x509.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
-----BEGIN CERTIFICATE-----
MIID/TCCAuWgAwIBAgIJAJcPmDkJqolJMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD
VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4g
VmlldzEQMA4GA1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UE
AwwHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe
Fw0xNDExMDYxOTA3NDBaFw00MjAzMjQxOTA3NDBaMIGUMQswCQYDVQQGEwJVUzET
MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4gVmlldzEQMA4G
A1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UEAwwHQW5kcm9p
ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAOjreE0vTVSRenuzO9vnaWfk0eQzYab0gqpi
6xAzi6dmD+ugoEKJmbPiuE5Dwf21isZ9uhUUu0dQM46dK4ocKxMRrcnmGxydFn6o
fs3ODJMXOkv2gKXL/FdbEPdDbxzdu8z3yk+W67udM/fW7WbaQ3DO0knu+izKak/3
T41c5uoXmQ81UNtAzRGzGchNVXMmWuTGOkg6U+0I2Td7K8yvUMWhAWPPpKLtVH9r
AL5TzjYNR92izdKcz3AjRsI3CTjtpiVABGeX0TcjRSuZB7K9EK56HV+OFNS6I1NP
jdD7FIShyGlqqZdUOkAUZYanbpgeT5N7QL6uuqcGpoTOkalu6kkCAwEAAaNQME4w
HQYDVR0OBBYEFH5DM/m7oArf4O3peeKO0ZIEkrQPMB8GA1UdIwQYMBaAFH5DM/m7
oArf4O3peeKO0ZIEkrQPMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEB
AHO3NSvDE5jFvMehGGtS8BnFYdFKRIglDMc4niWSzhzOVYRH4WajxdtBWc5fx0ix
NF/+hVKVhP6AIOQa+++sk+HIi7RvioPPbhjcsVlZe7cUEGrLSSveGouQyc+j0+m6
JF84kszIl5GGNMTnx0XRPO+g8t6h5LWfnVydgZfpGRRg+WHewk1U2HlvTjIceb0N
dcoJ8WKJAFWdcuE7VIm4w+vF/DYX/A2Oyzr2+QRhmYSv1cusgAeC1tvH4ap+J1Lg
UnOu5Kh/FqPLLSwNVQp4Bu7b9QFfqK8Moj84bj88NqRGZgDyqzuTrFxn6FW7dmyA
yttuAJAEAymk1mipd9+zp38=
-----END CERTIFICATE-----
1 change: 1 addition & 0 deletions DS/A.I.K/bin/chromeos/empty
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Binary file added DS/A.I.K/bin/chromeos/kernel.keyblock
Binary file not shown.
Binary file added DS/A.I.K/bin/chromeos/kernel_data_key.vbprivk
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/i686/blobpack
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/i686/blobunpack
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/i686/dhtbsign
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/i686/dumpimage
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/i686/elftool
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/i686/futility
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/i686/kernel_dump
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/i686/loki_tool
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/i686/lz4
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/i686/mkbootimg
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/i686/mkimage
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/i686/mkmtkhdr
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/i686/pxa-mkbootimg
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/i686/pxa-unpackbootimg
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/i686/rkcrc
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/i686/unpackbootimg
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/i686/unpackelf
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/x86_64/blobpack
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/x86_64/blobunpack
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/x86_64/dhtbsign
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/x86_64/dumpimage
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/x86_64/elftool
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/x86_64/futility
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/x86_64/kernel_dump
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/x86_64/loki_tool
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/x86_64/lz4
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/x86_64/mkbootimg
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/x86_64/mkimage
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/x86_64/mkmtkhdr
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/x86_64/pxa-mkbootimg
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/x86_64/pxa-unpackbootimg
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/x86_64/rkcrc
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/x86_64/unpackbootimg
Binary file not shown.
Binary file added DS/A.I.K/bin/linux/x86_64/unpackelf
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/blobpack
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/blobunpack
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/cpio
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/dd
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/dhtbsign
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/dumpimage
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/elftool
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/file
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/futility
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/kernel_dump
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/libiconv.2.dylib
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/libintl.8.dylib
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/liblzma.5.dylib
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/liblzo2.2.dylib
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/libmagic.1.dylib
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/loki_tool
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/lz4
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/lzop
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/mkbootimg
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/mkimage
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/mkmtkhdr
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/pxa-mkbootimg
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/pxa-unpackbootimg
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/rkcrc
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/tail
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/unpackbootimg
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/unpackelf
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/i386/xz
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/blobpack
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/blobunpack
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/cpio
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/dd
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/dhtbsign
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/dumpimage
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/elftool
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/file
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/futility
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/kernel_dump
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/libiconv.2.dylib
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/libintl.8.dylib
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/liblzma.5.dylib
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/liblzo2.2.dylib
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/libmagic.1.dylib
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/loki_tool
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/lz4
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/lzop
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/mkbootimg
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/mkimage
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/mkmtkhdr
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/pxa-mkbootimg
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/pxa-unpackbootimg
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/rkcrc
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/tail
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/unpackbootimg
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/unpackelf
Binary file not shown.
Binary file added DS/A.I.K/bin/macos/x86_64/xz
Binary file not shown.
Loading

0 comments on commit 02891cb

Please sign in to comment.