Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299085
b: refs/heads/master
c: 5269a9a
h: refs/heads/master
i:
  299083: 5197f01
v: v3
  • Loading branch information
Grant Likely committed Apr 12, 2012
1 parent cc13702 commit c7adbd0
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 67 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9b1ef1de20e2658c77cce89941f45525704ab534
refs/heads/master: 5269a9ab7def9a3116663347d59c4d70afa2d180
8 changes: 0 additions & 8 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -531,11 +531,3 @@ Why: There appear to be no production users of the get_robust_list syscall,
of ASLR. It was only ever intended for debugging, so it should be
removed.
Who: Kees Cook <keescook@chromium.org>

----------------------------

What: setitimer accepts user NULL pointer (value)
When: 3.6
Why: setitimer is not returning -EFAULT if user pointer is NULL. This
violates the spec.
Who: Sasikantha Babu <sasikanth.v19@gmail.com>
4 changes: 2 additions & 2 deletions trunk/arch/x86/include/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ extern void __add_wrong_size(void)
switch (sizeof(*(ptr))) { \
case __X86_CASE_B: \
asm volatile (lock #op "b %b0, %1\n" \
: "+q" (__ret), "+m" (*(ptr)) \
: "+r" (__ret), "+m" (*(ptr)) \
: : "memory", "cc"); \
break; \
case __X86_CASE_W: \
Expand Down Expand Up @@ -173,7 +173,7 @@ extern void __add_wrong_size(void)
switch (sizeof(*(ptr))) { \
case __X86_CASE_B: \
asm volatile (lock "addb %b1, %0\n" \
: "+m" (*(ptr)) : "qi" (inc) \
: "+m" (*(ptr)) : "ri" (inc) \
: "memory", "cc"); \
break; \
case __X86_CASE_W: \
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/x86/kernel/vsyscall_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
current_thread_info()->sig_on_uaccess_error = 1;

/*
* NULL is a valid user pointer (in the access_ok sense) on 32-bit and
* 0 is a valid user pointer (in the access_ok sense) on 32-bit and
* 64-bit, so we don't need to special-case it here. For all the
* vsyscalls, NULL means "don't write anything" not "write it at
* vsyscalls, 0 means "don't write anything" not "write it at
* address 0".
*/
ret = -EFAULT;
Expand Down Expand Up @@ -247,7 +247,7 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)

ret = sys_getcpu((unsigned __user *)regs->di,
(unsigned __user *)regs->si,
NULL);
0);
break;
}

Expand Down
24 changes: 16 additions & 8 deletions trunk/drivers/clocksource/acpi_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/async.h>
#include <asm/io.h>

/*
Expand Down Expand Up @@ -179,17 +180,15 @@ static int verify_pmtmr_rate(void)
/* Number of reads we try to get two different values */
#define ACPI_PM_READ_CHECKS 10000

static int __init init_acpi_pm_clocksource(void)
static void __init acpi_pm_clocksource_async(void *unused, async_cookie_t cookie)
{
cycle_t value1, value2;
unsigned int i, j = 0;

if (!pmtmr_ioport)
return -ENODEV;

/* "verify" this timing source: */
for (j = 0; j < ACPI_PM_MONOTONICITY_CHECKS; j++) {
udelay(100 * j);
usleep_range(100 * j, 100 * j + 100);
value1 = clocksource_acpi_pm.read(&clocksource_acpi_pm);
for (i = 0; i < ACPI_PM_READ_CHECKS; i++) {
value2 = clocksource_acpi_pm.read(&clocksource_acpi_pm);
Expand All @@ -203,25 +202,34 @@ static int __init init_acpi_pm_clocksource(void)
" 0x%#llx, 0x%#llx - aborting.\n",
value1, value2);
pmtmr_ioport = 0;
return -EINVAL;
return;
}
if (i == ACPI_PM_READ_CHECKS) {
printk(KERN_INFO "PM-Timer failed consistency check "
" (0x%#llx) - aborting.\n", value1);
pmtmr_ioport = 0;
return -ENODEV;
return;
}
}

if (verify_pmtmr_rate() != 0){
pmtmr_ioport = 0;
return -ENODEV;
return;
}

return clocksource_register_hz(&clocksource_acpi_pm,
clocksource_register_hz(&clocksource_acpi_pm,
PMTMR_TICKS_PER_SEC);
}

static int __init init_acpi_pm_clocksource(void)
{
if (!pmtmr_ioport)
return -ENODEV;

async_schedule(acpi_pm_clocksource_async, NULL);
return 0;
}

/* We use fs_initcall because we want the PCI fixups to have run
* but we still need to load before device_initcall
*/
Expand Down
34 changes: 6 additions & 28 deletions trunk/fs/proc/stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,19 @@
#ifndef arch_irq_stat
#define arch_irq_stat() 0
#endif

#ifdef arch_idle_time

static cputime64_t get_idle_time(int cpu)
{
cputime64_t idle;

idle = kcpustat_cpu(cpu).cpustat[CPUTIME_IDLE];
if (cpu_online(cpu) && !nr_iowait_cpu(cpu))
idle += arch_idle_time(cpu);
return idle;
}

static cputime64_t get_iowait_time(int cpu)
{
cputime64_t iowait;

iowait = kcpustat_cpu(cpu).cpustat[CPUTIME_IOWAIT];
if (cpu_online(cpu) && nr_iowait_cpu(cpu))
iowait += arch_idle_time(cpu);
return iowait;
}

#else
#ifndef arch_idle_time
#define arch_idle_time(cpu) 0
#endif

static u64 get_idle_time(int cpu)
{
u64 idle, idle_time = get_cpu_idle_time_us(cpu, NULL);

if (idle_time == -1ULL)
if (idle_time == -1ULL) {
/* !NO_HZ so we can rely on cpustat.idle */
idle = kcpustat_cpu(cpu).cpustat[CPUTIME_IDLE];
else
idle += arch_idle_time(cpu);
} else
idle = usecs_to_cputime64(idle_time);

return idle;
Expand All @@ -69,8 +49,6 @@ static u64 get_iowait_time(int cpu)
return iowait;
}

#endif

static int show_stat(struct seq_file *p, void *v)
{
int i, j;
Expand Down
3 changes: 2 additions & 1 deletion trunk/kernel/irq/irqdomain.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,8 @@ static int virq_debug_show(struct seq_file *m, void *private)
int i;

seq_printf(m, "%-5s %-7s %-15s %-*s %s\n", "irq", "hwirq",
"chip name", 2 * sizeof(void *) + 2, "chip data", "domain name");
"chip name", (int)(2 * sizeof(void *) + 2), "chip data",
"domain name");

for (i = 1; i < nr_irqs; i++) {
desc = irq_to_desc(i);
Expand Down
8 changes: 2 additions & 6 deletions trunk/kernel/itimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,8 @@ SYSCALL_DEFINE3(setitimer, int, which, struct itimerval __user *, value,
if (value) {
if(copy_from_user(&set_buffer, value, sizeof(set_buffer)))
return -EFAULT;
} else {
memset(&set_buffer, 0, sizeof(set_buffer));
printk_once(KERN_WARNING "%s calls setitimer() with new_value NULL pointer."
" Misfeature support will be removed\n",
current->comm);
}
} else
memset((char *) &set_buffer, 0, sizeof(set_buffer));

error = do_setitimer(which, &set_buffer, ovalue ? &get_buffer : NULL);
if (error || !ovalue)
Expand Down
4 changes: 0 additions & 4 deletions trunk/kernel/time/Kconfig
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#
# Timer subsystem related configuration options
#

# Core internal switch. Selected by NO_HZ / HIGH_RES_TIMERS. This is
# only related to the tick functionality. Oneshot clockevent devices
# are supported independ of this.
config TICK_ONESHOT
bool

Expand Down
4 changes: 1 addition & 3 deletions trunk/kernel/time/tick-broadcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,12 +575,10 @@ void tick_broadcast_switch_to_oneshot(void)
unsigned long flags;

raw_spin_lock_irqsave(&tick_broadcast_lock, flags);

tick_broadcast_device.mode = TICKDEV_MODE_ONESHOT;

if (cpumask_empty(tick_get_broadcast_mask()))
goto end;

tick_broadcast_device.mode = TICKDEV_MODE_ONESHOT;
bc = tick_broadcast_device.evtdev;
if (bc)
tick_broadcast_setup_oneshot(bc);
Expand Down
4 changes: 2 additions & 2 deletions trunk/kernel/time/tick-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,9 @@ static void tick_nohz_restart(struct tick_sched *ts, ktime_t now)
hrtimer_get_expires(&ts->sched_timer), 0))
break;
}
/* Reread time and update jiffies */
now = ktime_get();
/* Update jiffies and reread time */
tick_do_update_jiffies64(now);
now = ktime_get();
}
}

Expand Down
1 change: 0 additions & 1 deletion trunk/tools/perf/builtin-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "util/debug.h"

#include <sys/prctl.h>
#include <sys/resource.h>

#include <semaphore.h>
#include <pthread.h>
Expand Down

0 comments on commit c7adbd0

Please sign in to comment.