linux-imx/kernel
Steven Rostedt (VMware) cf95948227 ring-buffer: Mask out the info bits when returning buffer page length
commit 45d8b80c2a upstream.

Two info bits were added to the "commit" part of the ring buffer data page
when returned to be consumed. This was to inform the user space readers that
events have been missed, and that the count may be stored at the end of the
page.

What wasn't handled, was the splice code that actually called a function to
return the length of the data in order to zero out the rest of the page
before sending it up to user space. These data bits were returned with the
length making the value negative, and that negative value was not checked.
It was compared to PAGE_SIZE, and only used if the size was less than
PAGE_SIZE. Luckily PAGE_SIZE is unsigned long which made the compare an
unsigned compare, meaning the negative size value did not end up causing a
large portion of memory to be randomly zeroed out.

Fixes: 66a8cb95ed ("ring-buffer: Add place holder recording of dropped events")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2018-03-03 15:50:52 +00:00
..
debug kdb: Fix handling of kallsyms_symbol_next() return value 2018-03-03 15:50:44 +00:00
events perf/core: Fix group {cpu,task} validation 2017-11-11 13:34:31 +00:00
gcov gcov: disable CONSTRUCTORS for UML 2011-07-26 16:49:45 -07:00
irq genirq: Make sparse_irq_lock protect what it should protect 2017-11-26 13:51:08 +00:00
power PM / Sleep: fix recovery during resuming from hibernation 2014-12-14 16:23:52 +00:00
time alarmtimer: Rate limit periodic intervals 2017-09-15 18:30:49 +01:00
trace ring-buffer: Mask out the info bits when returning buffer page length 2018-03-03 15:50:52 +00:00
.gitignore
acct.c
async.c Fix a dead loop in async_synchronize_full() 2012-10-10 03:31:09 +01:00
audit_tree.c audit: keep inode pinned 2014-12-14 16:23:56 +00:00
audit_watch.c audit: Fix use after free in audit_remove_watch_rule() 2017-11-11 13:34:29 +00:00
audit.c audit: use nlmsg_len() to get message payload length 2014-01-03 04:33:17 +00:00
audit.h
auditfilter.c netlink: kill loginuid/sessionid/sid members from struct netlink_skb_parms 2011-03-03 10:55:40 -08:00
auditsc.c audit: fix a double fetch in audit_log_single_execve_arg() 2016-08-22 22:37:19 +01:00
backtracetest.c
bounds.c memcg: remove direct page_cgroup-to-page pointer 2011-03-23 19:46:28 -07:00
capability.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
cgroup_freezer.c cgroup: cgroup_subsys->fork() should be called after the task is added to css_set 2013-01-03 03:32:56 +00:00
cgroup.c fs: create and use seq_show_option for escaping 2015-10-13 03:46:08 +01:00
compat.c compat: Fix RT signal mask corruption via sigprocmask 2012-05-31 00:43:51 +01:00
configs.c kernel/configs.c: include MODULE_*() when CONFIG_IKCONFIG_PROC=n 2011-07-25 20:57:15 -07:00
cpu_pm.c cpu_pm: call notifiers during suspend 2011-09-23 12:05:29 +05:30
cpu.c x86/smp: Don't ever patch back to UP if we unplug cpus 2018-02-13 18:32:14 +00:00
cpuset.c cpuset: PF_SPREAD_PAGE and PF_SPREAD_SLAB should be atomic flags 2017-10-12 15:27:22 +01:00
crash_dump.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
cred.c cred: copy_process() should clear child->replacement_session_keyring 2012-04-13 08:33:50 -07:00
delayacct.c KVM: Steal time implementation 2011-07-14 12:59:14 +03:00
dma.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
elfcore.c
exec_domain.c
exit.c wait/ptrace: assume __WALL if the child is traced 2016-08-22 22:37:12 +01:00
extable.c kprobes, x86/alternatives: Use text_mutex to protect smp_alt_modules 2018-02-13 18:32:14 +00:00
fork.c KAISER: Kernel Address Isolation 2018-01-07 01:46:49 +00:00
freezer.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
futex_compat.c ptrace: use fsuid, fsgid, effective creds for fs access checks 2017-09-15 18:30:57 +01:00
futex.c ptrace: use fsuid, fsgid, effective creds for fs access checks 2017-09-15 18:30:57 +01:00
groups.c kernel: make groups_sort calling a responsibility group_info allocators 2018-03-03 15:50:47 +00:00
hrtimer.c hrtimer: Handle remaining time proper for TIME_LOW_RES 2016-02-27 14:28:41 +00:00
hung_task.c hung_task: fix false positive during vfork 2012-01-03 16:14:32 -08:00
irq_work.c kernel: fix two implicit header assumptions in irq_work.c 2011-10-31 09:20:12 -04:00
itimer.c itimers: Handle relative timers with CONFIG_TIME_LOW_RES proper 2016-02-27 14:28:42 +00:00
jump_label.c jump_label: jump_label_inc may return before the code is patched 2011-12-05 13:28:46 -05:00
kallsyms.c Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-03-25 17:52:22 -07:00
Kconfig.freezer
Kconfig.hz
Kconfig.locks locking/mutex: Disable optimistic spinning on some architectures 2014-08-06 18:07:38 +01:00
Kconfig.preempt sched: Isolate preempt counting in its own config option 2011-06-10 15:15:40 +02:00
kexec.c [S390] kdump: Add infrastructure for unmapping crashkernel memory 2011-10-30 15:16:42 +01:00
kfifo.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
kmod.c usermodehelper: check subprocess_info->path != NULL 2013-05-30 14:35:00 +01:00
kprobes.c tracing/kprobes: Enforce kprobes teardown after testing 2017-09-15 18:30:44 +01:00
ksysfs.c kernel: ksysfs.c is implicitly using stat.h 2011-10-31 09:20:13 -04:00
kthread.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
latencytop.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
lockdep_internals.h
lockdep_proc.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
lockdep_states.h
lockdep.c lockdep, kmemcheck: Annotate ->lock in lockdep_init_map() 2011-12-06 18:18:13 +01:00
Makefile Merge branch 'devel-stable' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm 2011-10-28 12:02:27 -07:00
module.c module: Fix locking in symbol_put_addr() 2015-11-17 15:54:40 +00:00
mutex-debug.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
mutex-debug.h mutex: Use p->on_cpu for the adaptive spin 2011-04-14 08:52:33 +02:00
mutex.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
mutex.h mutex: Use p->on_cpu for the adaptive spin 2011-04-14 08:52:33 +02:00
notifier.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
nsproxy.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
padata.c padata: free correct variable 2017-08-26 02:13:59 +01:00
panic.c lockdep, bug: Exclude TAINT_OOT_MODULE from disabling lock debugging 2012-02-13 11:16:59 -08:00
params.c kernel/params.c: align add_sysfs_param documentation with code 2018-01-01 20:50:55 +00:00
pid_namespace.c pidns: call pid_ns_prepare_proc() from create_pid_namespace() 2011-03-23 19:46:58 -07:00
pid.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
posix-cpu-timers.c posix-cpu-timers: Fix nanosleep task_struct leak 2013-03-06 03:24:01 +00:00
posix-timers.c posix-timer: Properly check sigevent->sigev_notify 2018-03-03 15:50:47 +00:00
printk.c console: Fix console name size mismatch 2015-05-09 23:16:24 +01:00
profile.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
ptrace.c ptrace: change __ptrace_unlink() to clear ->ptrace under ->siglock 2018-01-01 20:51:04 +00:00
range.c range: fix bogus misuse of module.h to get printk() 2011-10-31 09:20:11 -04:00
rcu.h rcu: Add grace-period, quiescent-state, and call_rcu trace events 2011-09-28 21:38:21 -07:00
rcupdate.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
rcutiny_plugin.h kernel: fix up module header handling in rcutiny files 2011-10-31 09:20:13 -04:00
rcutiny.c rcu: Correctly handle non-empty Tiny RCU callback list with none ready 2015-08-12 16:33:12 +02:00
rcutorture.c rcu: Make rcu_torture_boost() exit loops at end of test 2011-09-28 21:38:46 -07:00
rcutree_plugin.h rcu: Remove rcu_needs_cpu_flush() to avoid false quiescent states 2011-09-28 21:38:48 -07:00
rcutree_trace.c rcu: Simplify quiescent-state accounting 2011-09-28 21:38:22 -07:00
rcutree.c rcu: Fix batch-limit size problem 2013-01-03 03:33:08 +00:00
rcutree.h rcu: Remove rcu_needs_cpu_flush() to avoid false quiescent states 2011-09-28 21:38:48 -07:00
relay.c splice: fix racy pipe->buffers uses 2012-07-12 04:31:59 +01:00
res_counter.c memcg: res_counter_read_u64(): fix potential races on 32-bit machines 2011-03-23 19:46:22 -07:00
resource.c kernel/resource.c: fix muxed resource handling in __request_region() 2016-04-01 01:54:34 +01:00
rtmutex_common.h rtmutex: Simplify PI algorithm and make highest prio task get lock 2011-01-27 21:13:51 -05:00
rtmutex-debug.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
rtmutex-debug.h rtmutex: Handle deadlock detection smarter 2014-07-11 13:33:50 +01:00
rtmutex-tester.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
rtmutex.c locking/rtmutex: Prevent dequeue vs. unlock race 2017-02-23 03:51:01 +00:00
rtmutex.h rtmutex: Handle deadlock detection smarter 2014-07-11 13:33:50 +01:00
rwsem.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
sched_autogroup.c sched/autogroup: Fix failure to set cpu.rt_runtime_us 2015-05-09 23:16:18 +01:00
sched_autogroup.h Revert "sched, autogroup: Stop going ahead if autogroup is disabled" 2013-01-03 03:32:53 +00:00
sched_clock.c sched_clock: Prevent 64bit inatomicity on 32bit systems 2013-04-25 20:25:34 +01:00
sched_cpupri.c sched: Use CPUPRI_NR_PRIORITIES instead of MAX_RT_PRIO in cpupri check 2014-06-09 13:29:10 +01:00
sched_cpupri.h sched/cpupri: Remove cpupri->pri_active 2011-08-14 12:01:11 +02:00
sched_debug.c sched: Fix possible divide by zero in avg_atom() calculation 2014-08-06 18:07:38 +01:00
sched_fair.c sched: fix __sched_setscheduler() vs load balancing race 2016-02-27 14:28:49 +00:00
sched_features.h sched, rt: Provide means of disabling cross-cpu bandwidth sharing 2011-11-14 12:50:40 +01:00
sched_idletask.c sched/nohz: Rewrite and fix load-avg computation -- again 2012-07-25 04:11:09 +01:00
sched_rt.c sched/rt: Reduce rq lock contention by eliminating locking of non-feasible target 2015-03-06 00:39:19 +00:00
sched_stats.h locking, sched: Annotate thread_group_cputimer as raw 2011-09-13 11:11:55 +02:00
sched_stoptask.c sched: Fix migration thread runtime bogosity 2012-10-17 03:50:03 +01:00
sched.c sched/core: Idle_task_exit() shouldn't use switch_mm_irqs_off() 2018-01-07 01:46:48 +00:00
seccomp.c
semaphore.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
signal.c signal: Only reschedule timers on signals timers have sent 2017-09-15 18:30:54 +01:00
smp.c smp: Fix SMP function call empty cpu mask race 2013-02-06 04:33:49 +00:00
softirq.c Fix lockup related to stop_machine being stuck in __do_softirq. 2015-08-07 00:32:19 +01:00
spinlock.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
srcu.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
stacktrace.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
stop_machine.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
sys_ni.c Cross Memory Attach 2011-10-31 17:30:44 -07:00
sys.c reboot: rigrate shutdown/reboot to boot cpu 2013-06-19 02:17:00 +01:00
sysctl_binary.c fs/coredump: prevent fsuid=0 dumps into user-controlled directories 2016-05-01 00:05:20 +02:00
sysctl_check.c xfs: remove subdirectories 2011-08-12 16:21:35 -05:00
sysctl.c sched/sysctl: Check user input value of sysctl_sched_time_avg 2018-01-01 20:50:53 +00:00
taskstats.c Make TASKSTATS require root access 2011-09-19 17:04:37 -07:00
test_kprobes.c
time.c time: settimeofday: Validate the values of tv from user 2015-02-20 00:49:34 +00:00
timeconst.pl timeconst.pl: Eliminate Perl warning 2013-03-06 03:23:52 +00:00
timer.c timer: Prevent overflow in apply_slack 2014-06-09 13:29:04 +01:00
tracepoint.c tracepoint: Do not waste memory on mods with no tracepoints 2014-06-09 13:28:55 +01:00
tsacct.c Make taskstats round statistics down to nearest 1k bytes/events 2011-09-19 17:10:57 -07:00
uid16.c kernel: make groups_sort calling a responsibility group_info allocators 2018-03-03 15:50:47 +00:00
up.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
user_namespace.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
user-return-notifier.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
user.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
utsname_sysctl.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
utsname.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
wait.c kernel: Map most files to use export.h instead of module.h 2011-10-31 09:20:12 -04:00
watchdog.c watchdog: using u64 in get_sample_period() 2012-12-06 11:20:21 +00:00
workqueue_sched.h
workqueue.c workqueue: ensure @task is valid across kthread_stop() 2014-04-02 00:58:54 +01:00