Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
4da60cc
ANDROID: uid_sys_stats: rename uid_cputime.c to uid_sys_stats.c
Jan 11, 2017
759a6d9
ANDROID: uid_cputime: add per-uid IO usage accounting
Jan 11, 2017
1714fc4
ANDROID: uid_sys_stats: allow writing same state
Jan 18, 2017
9e742d6
ANDROID: uid_sys_stats: return full size when state is not changed.
Jan 20, 2017
12c6994
ANDROID: uid_sys_stats: remove unnecessary code in procstat switch
Feb 17, 2017
f12bb77
ANDROID: uid_sys_stats: fix negative write bytes.
Feb 28, 2017
261ab7d
ANDROID: sched: add a counter to track fsync
Mar 2, 2017
f32280a
ANDROID: uid_sys_stats: account for fsync syscalls
Mar 2, 2017
1d100c6
ANDROID: uid_sys_stats: change to use rt_mutex
weivincewang Mar 13, 2017
300b05b
ANDROID: uid_sys_stats: fix typo in init
Mar 14, 2017
16a4c11
ANDROID: uid_sys_stats: reduce update_io_stats overhead
Apr 14, 2017
d7736f7
ANDROID: uid_sys_stats: fix access of task_uid(task)
yzkqfll Apr 25, 2017
2be3a1e
ANDROID: uid_sys_stats: defer io stats calulation for dead tasks
May 22, 2017
5bb369e
uid_sys_stats: fix overflow when io usage delta is negative
Aug 8, 2017
a9ab967
ANDROID: uid_sys_stats: fix the comment
Flex1911 Jan 13, 2018
f8573ce
ANDROID: Skip building uid_sys_stats and keyreset drivers as modules
pundiramit Apr 11, 2017
28646f5
ANDROID: Kconfig: add depends for UID_SYS_STATS
yzkqfll May 24, 2017
0657d7f
android: recommended.cfg: enable taskstats
Feb 9, 2016
fcde433
scsi: libsas: fix memory leak in sas_smp_get_phy_events()CVE-2018-7757
JasonYanHw Jan 4, 2018
012b626
[PATCH] floppy: Do not copy a kernel pointer to user memory in FDGETP…
BobZhome Apr 1, 2018
55b020e
[PATCH] floppy: Don't print kernel addresses to log in show_floppy CV…
BobZhome Apr 1, 2018
9eb7195
netfilter: ebtables: CONFIG_COMPAT: don't trust userland offsets CVE-…
Feb 19, 2018
a832653
ALSA: msnd: Optimize / harden DSP and MIDI loops CVE-2017-9985
tiwai Jul 6, 2017
8a22089
ANDROID: scsi: Add segment checking in sg_read CVE-2017-13168
robepereira Oct 11, 2017
5f7f7b3
ASoC: core: Don't assign an out-of-bounds address to rtd_aux
kerneltoast May 2, 2017
0368500
power: msm-core: Fix mutex not getting unlocked in error path
kerneltoast Apr 9, 2017
02ae403
cpufreq: interactive: Skip timer when policy->min == policy->max
kerneltoast Mar 4, 2017
2324d3c
msm: mdss: Don't cache the address of a stack variable in timings init
kerneltoast Mar 21, 2017
3b0841e
UPSTREAM: timer: Export destroy_hrtimer_on_stack()
groeck May 27, 2016
658f4b7
ANDROID: sdcardfs: Don't d_drop in d_revalidate
drosen-google Apr 25, 2018
da73c0e
UPSTREAM: dm bufio: avoid sleeping while holding the dm_bufio lock
dianders Nov 17, 2016
f056f65
ktime: add ktime_after and ktime_before helper
Jun 11, 2014
100c477
ktime: Change ktime_set() to take 64bit seconds value
johnstultz-work Jul 16, 2014
342a61e
qcacld-2.0: Check vdev_id against wma->max_bssid
Oct 18, 2017
587b3d0
qcacld-2.0: Avoid possible buffer overwrite in wma_process_utf_event
Nov 30, 2017
5363432
qcacld-2.0: Check for valid vdev ID in wma_nlo_match_evt_handler
Oct 3, 2017
8e28f0a
qcacld-2.0: Check for the max number of P2P NOA descriptors
Oct 31, 2017
2b3043c
qcacld-2.0: Check for upper bound in P2P NOA event
Sep 28, 2017
e08f38f
qcacld-2.0: Set length of challenge text sent by SAP to 128
Oct 2, 2017
b444d3e
qcacld-2.0: Add sanity check to limit mgmt frames data len
Dec 1, 2017
846cf9d
qcacld-2.0: Fix potential buffer overflow in process_tx_info
Dec 6, 2017
777344b
qcacld-2.0: Fix potential buffer overflow in ol_rx_flush_handler
Dec 6, 2017
a2b4bed
qcacld-2.0: Fix potential buffer overflow in htt_t2h_lp_msg_handler
Dec 1, 2017
3e10f77
qcacld-2.0: Fix buffer overrun in function ProcSetReqInternal
Nov 20, 2017
7d24cbf
qcacld-2.0: Fix buffer overread in wma_extscan_hotlist_match_event_ha…
Dec 20, 2017
41dd1a4
qcacld-2.0: Calculate buf_len properly for extscan hotlist event buffer
Jan 11, 2018
dd88546
qcacld-2.0: Add sanity check for vdev id to prevent OOB access
Feb 14, 2018
fa69ae0
qcacld-2.0: Add sanity check for vdev_id in wma_wow_wakeup_host_event
Feb 14, 2018
8ffb8d2
qcacld-2.0: Add mutex lock for proc handlers
Jan 22, 2018
e35fc78
qcacld-2.0: Fix buffer overwrite due to ssid_len in WMA handlers
Dec 21, 2017
174ee86
qcacld-2.0: Avoid buffer overflow
Dec 8, 2017
3a81df5
qcacld-2.0: Fix potential buffer overflow for TX_COMPL_IND
Dec 6, 2017
1306eda
qcacld-2.0: Avoid possible stack overflow in hdd_ProcessGENIE API
Nov 29, 2017
5790063
qcacld-2.0: Fix memory leak for txrx_fw_stats cmd
Jan 2, 2018
7e5e4ac
qcacld-2.0: Dump the txrx stat req if the queue is not empty
Sep 26, 2017
9eb19b0
qcacld-2.0: Fix potential buffer overwrite
Dec 6, 2017
f9dd3a4
qcacld-2.0: Fix potential buffer overwrite in wma_vdev_start_rsp_ind
Dec 12, 2017
7eb5716
qcacld-2.0: Fix potential buffer overflow
Dec 4, 2017
d300464
qcacld-2.0: Add data_len check to avoid OOB access
Jan 11, 2018
4f0494d
ANDROID: sdcardfs: fix potential crash when reserved_mb is not zero
Jun 16, 2018
009730f
ALSA: pcm: add locks for accessing runtime resource
Sep 28, 2017
2fc793d
oc: qcom: rpm-smd-debug: Fix potential memory leaks
Dec 21, 2017
8d5ef61
soc: qcom: pil: Fix error handling during PIL driver probe
Oct 25, 2017
a406fd0
qseecom: Add new ioctl to export qsee version
Nov 25, 2016
834ca45
dwc3: debugfs: Add check for length before copy data from userspace
Jan 16, 2018
6c247ca
ASoC: wcd_cpe_core: add size check for WDSP ELF files
Jan 16, 2018
998445c
drivers: soc: Synchronize apr callback and voice svc release
Nov 14, 2017
70a2989
ASoC: msm: qdspv2: add spin lock to protect ac
Jan 18, 2018
e273c78
dev_freq: devfreq_spdm: add null terminator to prevent OOB access
Sep 25, 2017
47fabca
msm: thermal: Pass correct size of voltage table to IOCTL
Feb 13, 2018
23ba138
msm: kgsl: Increase memstore size
Jan 31, 2018
bcf1a0d
msm: ipa: Prevent deletion of the default route rule
Jan 31, 2018
644afc8
diag: Validate copying length against source buffer length
Jan 17, 2018
ecefb80
usb: dwc3: dbm: Fix double free in msm_dbm_probe
Mar 15, 2018
0a2a704
new helper: dentry_free()
Apr 30, 2014
aa115c0
Allow sharing external names after __d_move()
Mar 11, 2018
18965a2
fs/buffer.c: increase the buffer-head per-CPU LRU size
sebastienbuisson Oct 9, 2014
b4dfa52
futex: move user address verification up to common code
torvalds Dec 12, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions android/configs/android-recommended.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ CONFIG_TABLET_USB_GTCO=y
CONFIG_TABLET_USB_HANWANG=y
CONFIG_TABLET_USB_KBTAB=y
CONFIG_TABLET_USB_WACOM=y
CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_TASK_XACCT=y
CONFIG_TIMER_STATS=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
Expand Down
5 changes: 3 additions & 2 deletions drivers/block/floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1796,11 +1796,11 @@ static void show_floppy(void)
if (work_pending(&floppy_work))
pr_info("floppy_work.func=%pf\n", floppy_work.func);
if (delayed_work_pending(&fd_timer))
pr_info("delayed work.function=%p expires=%ld\n",
pr_info("delayed work.function=%pf expires=%ld\n",
fd_timer.work.func,
fd_timer.timer.expires - jiffies);
if (delayed_work_pending(&fd_timeout))
pr_info("timer_function=%p expires=%ld\n",
pr_info("timer_function=%pf expires=%ld\n",
fd_timeout.work.func,
fd_timeout.timer.expires - jiffies);

Expand Down Expand Up @@ -3445,6 +3445,7 @@ static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, unsigned int
(struct floppy_struct **)&outparam);
if (ret)
return ret;
size = offsetof(struct floppy_struct, name);
break;
case FDMSGON:
UDP->flags |= FTD_MSG;
Expand Down
91 changes: 67 additions & 24 deletions drivers/char/diag/diag_dci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1099,18 +1099,31 @@ void extract_dci_events(unsigned char *buf, int len, int data_source, int token)
struct list_head *start, *temp;
struct diag_dci_client_tbl *entry = NULL;

length = *(uint16_t *)(buf + 1); /* total length of event series */
if (length == 0) {
pr_err("diag: Incoming dci event length is invalid\n");
if (!buf) {
pr_err("diag: In %s buffer is NULL\n", __func__);
return;
}
/* Move directly to the start of the event series. 1 byte for
* event code and 2 bytes for the length field.
*/
/* The length field indicates the total length removing the cmd_code
/*
* 1 byte for event code and 2 bytes for the length field.
* The length field indicates the total length removing the cmd_code
* and the lenght field. The event parsing in that case should happen
* till the end.
*/
if (len < 3) {
pr_err("diag: In %s invalid len: %d\n", __func__, len);
return;
}
length = *(uint16_t *)(buf + 1); /* total length of event series */
if ((length == 0) || (len != (length + 3))) {
pr_err("diag: Incoming dci event length: %d is invalid\n",
length);
return;
}
/*
* Move directly to the start of the event series.
* The event parsing should happen from start of event
* series till the end.
*/
temp_len = 3;
while (temp_len < length) {
event_id_packet = *(uint16_t *)(buf + temp_len);
Expand All @@ -1127,30 +1140,60 @@ void extract_dci_events(unsigned char *buf, int len, int data_source, int token)
* necessary.
*/
timestamp_len = 8;
memcpy(timestamp, buf + temp_len + 2, timestamp_len);
if ((temp_len + timestamp_len + 2) <= len)
memcpy(timestamp, buf + temp_len + 2,
timestamp_len);
else {
pr_err("diag: Invalid length in %s, len: %d, temp_len: %d",
__func__, len, temp_len);
return;
}
}
/* 13th and 14th bit represent the payload length */
if (((event_id_packet & 0x6000) >> 13) == 3) {
payload_len_field = 1;
payload_len = *(uint8_t *)
if ((temp_len + timestamp_len + 3) <= len) {
payload_len = *(uint8_t *)
(buf + temp_len + 2 + timestamp_len);
if (payload_len < (MAX_EVENT_SIZE - 13)) {
/* copy the payload length and the payload */
} else {
pr_err("diag: Invalid length in %s, len: %d, temp_len: %d",
__func__, len, temp_len);
return;
}
if ((payload_len < (MAX_EVENT_SIZE - 13)) &&
((temp_len + timestamp_len + payload_len + 3) <= len)) {
/*
* Copy the payload length and the payload
* after skipping temp_len bytes for already
* parsed packet, timestamp_len for timestamp
* buffer, 2 bytes for event_id_packet.
*/
memcpy(event_data + 12, buf + temp_len + 2 +
timestamp_len, 1);
memcpy(event_data + 13, buf + temp_len + 2 +
timestamp_len + 1, payload_len);
} else {
pr_err("diag: event > %d, payload_len = %d\n",
(MAX_EVENT_SIZE - 13), payload_len);
pr_err("diag: event > %d, payload_len = %d, temp_len = %d\n",
(MAX_EVENT_SIZE - 13), payload_len, temp_len);
return;
}
} else {
payload_len_field = 0;
payload_len = (event_id_packet & 0x6000) >> 13;
/* copy the payload */
memcpy(event_data + 12, buf + temp_len + 2 +
/*
* Copy the payload after skipping temp_len bytes
* for already parsed packet, timestamp_len for
* timestamp buffer, 2 bytes for event_id_packet.
*/
if ((payload_len < (MAX_EVENT_SIZE - 12)) &&
((temp_len + timestamp_len + payload_len + 2) <= len))
memcpy(event_data + 12, buf + temp_len + 2 +
timestamp_len, payload_len);
else {
pr_err("diag: event > %d, payload_len = %d, temp_len = %d\n",
(MAX_EVENT_SIZE - 12), payload_len, temp_len);
return;
}
}

/* Before copying the data to userspace, check if we are still
Expand Down Expand Up @@ -1266,19 +1309,19 @@ void extract_dci_log(unsigned char *buf, int len, int data_source, int token)
pr_err("diag: In %s buffer is NULL\n", __func__);
return;
}

/* The first six bytes for the incoming log packet contains
* Command code (2), the length of the packet (2) and the length
* of the log (2)
/*
* The first eight bytes for the incoming log packet contains
* Command code (2), the length of the packet (2), the length
* of the log (2) and log code (2)
*/
log_code = *(uint16_t *)(buf + 6);
read_bytes += sizeof(uint16_t) + 6;
if (read_bytes > len) {
pr_err("diag: Invalid length in %s, len: %d, read: %d",
__func__, len, read_bytes);
if (len < 8) {
pr_err("diag: In %s invalid len: %d\n", __func__, len);
return;
}

log_code = *(uint16_t *)(buf + 6);
read_bytes += sizeof(uint16_t) + 6;

/* parse through log mask table of each client and check mask */
list_for_each_safe(start, temp, &driver->dci_client_list) {
entry = list_entry(start, struct diag_dci_client_tbl, track);
Expand Down
2 changes: 2 additions & 0 deletions drivers/cpufreq/cpufreq_interactive.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,8 @@ static void cpufreq_interactive_timer(unsigned long data)
return;
if (!ppol->governor_enabled)
goto exit;
if (ppol->policy->min == ppol->policy->max)
goto rearm;

fcpu = cpumask_first(ppol->policy->related_cpus);
now = ktime_to_us(ktime_get());
Expand Down
Loading