Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync up with Linus #51

Merged
merged 55 commits into from
Mar 19, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
001eabf
crypto: arm/aes update NEON AES module to latest OpenSSL version
Feb 26, 2015
486b908
HID: wacom: do not send pen events before touch is up/forced out
Pinglinux Feb 20, 2015
e0d41fd
HID: wacom: rely on actual touch down count to decide touch_down
Pinglinux Feb 20, 2015
ce9594c
ASoC: ak4671: Fix control-less DAPM routes
larsclausen Feb 27, 2015
8e6a75c
ASoC: da732x: Fix control-less DAPM routes
larsclausen Feb 27, 2015
cdd3d2a
ASoC: sn95031: Fix control-less DAPM routes
larsclausen Feb 27, 2015
90aff15
fsl_ssi: fix of_property_read_u32_array return value check
maciejsszmigiero Mar 4, 2015
6c8ca30
ASoC: fsl_ssi: Don't try to round-up for PM divisor calculation
Mar 5, 2015
7b8f10d
clocksource: efm32: Fix a NULL pointer dereference
yongbae Mar 3, 2015
1096be0
clockevents: sun5i: Fix setup_irq init sequence
yongbae Mar 3, 2015
9ab2b7f
Merge branch 'clockevents/4.0-rc2' of http://git.linaro.org/people/da…
Mar 5, 2015
3995614
perf annotate: Fix fallback to unparsed disassembler line
acmel Mar 5, 2015
e678fef
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/lin…
Mar 5, 2015
e893286
x86/vdso: Fix the build on GCC5
Mar 5, 2015
c7d910b
ASoC: sgtl5000: remove useless register write clearing CHRGPUMP_POWERUP
Feb 27, 2015
a4ee556
ASoC: rt286: Change the DMI mapping for Dino
Mar 6, 2015
3fe0607
ASoC: Intel: remove conflicts when load/unload multiple firmware images
hanlui Feb 25, 2015
34e81ab
ASoC: Fix component lists locking
larsclausen Mar 7, 2015
394838c
x86/asm/entry/32: Fix user_mode() misuses
amluto Mar 10, 2015
2bf4c1d
ASoC: adav80x: Fix wrong value references for boolean kctl
tiwai Mar 10, 2015
08641d9
ASoC: ak4641: Fix wrong value references for boolean kctl
tiwai Mar 10, 2015
e8371aa
ASoC: cs4271: Fix wrong value references for boolean kctl
tiwai Mar 10, 2015
d223b0e
ASoC: es8238: Fix wrong value references for boolean kctl
tiwai Mar 10, 2015
d7f58db
ASoC: pcm1681: Fix wrong value references for boolean kctl
tiwai Mar 10, 2015
4c523ef
ASoC: tas5086: Fix wrong value references for boolean kctl
tiwai Mar 10, 2015
00a14c2
ASoC: wm2000: Fix wrong value references for boolean kctl
tiwai Mar 10, 2015
bd14016
ASoC: wm8731: Fix wrong value references for boolean kctl
tiwai Mar 10, 2015
24cc883
ASoC: wm8903: Fix wrong value references for boolean kctl
tiwai Mar 10, 2015
eaddf6f
ASoC: wm8904: Fix wrong value references for boolean kctl
tiwai Mar 10, 2015
07892b1
ASoC: wm8955: Fix wrong value references for boolean kctl
tiwai Mar 10, 2015
b4a18c8
ASoC: wm8960: Fix wrong value references for boolean kctl
tiwai Mar 10, 2015
4b0b669
ASoC: wm9712: Fix wrong value references for boolean kctl
tiwai Mar 10, 2015
87a8b28
ASoC: wm9713: Fix wrong value references for boolean kctl
tiwai Mar 10, 2015
a415457
HID: add ALWAYS_POLL quirk for a Logitech 0xc007
Mar 10, 2015
7486341
x86/platform, acpi: Bypass legacy PIC and PIT in ACPI hardware reduce…
Mar 11, 2015
c8a470c
x86/apic/numachip: Fix sibling map with NumaChip
dblueman Mar 12, 2015
d415a7f
perf: Fix context leak in put_event()
clyu Feb 26, 2015
ccfe8c3
crypto: aesni - fix memory usage in GCM decryption
smuellerDD Mar 12, 2015
a7c80eb
x86/fpu: Avoid math_state_restore() without used_math() in __restore_…
oleg-nesterov Mar 13, 2015
f4c3686
x86/fpu: Drop_fpu() should not assume that tsk equals current
oleg-nesterov Mar 13, 2015
9b02864
HID: tivo: enable all buttons on the TiVo Slide Pro remote
Mar 13, 2015
69797da
Revert "x86/mm/ASLR: Propagate base load address calculation"
suryasaimadhu Mar 16, 2015
016e81f
Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus
broonie Mar 16, 2015
af6b7a8
Merge remote-tracking branches 'asoc/fix/ak4671', 'asoc/fix/control',…
broonie Mar 16, 2015
33484c6
Merge remote-tracking branches 'asoc/fix/sgtl5000' and 'asoc/fix/sn95…
broonie Mar 16, 2015
cc26173
ALSA: hda - Treat stereo-to-mono mix properly
tiwai Mar 16, 2015
8cb2c2d
livepatch: Fix subtle race with coming and going modules
pmladek Mar 12, 2015
3fc6c5a
Merge tag 'asoc-fix-v4.0-rc4' of git://git.kernel.org/pub/scm/linux/k…
tiwai Mar 17, 2015
e2c7d88
HID: wacom: check for wacom->shared before following the pointer
bentiss Mar 5, 2015
13326e5
Merge branches 'perf-urgent-for-linus' and 'timers-urgent-for-linus' …
torvalds Mar 17, 2015
c586165
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/l…
torvalds Mar 17, 2015
e63c733
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
torvalds Mar 18, 2015
da11508
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
torvalds Mar 18, 2015
ec3fbff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
torvalds Mar 18, 2015
7b09ac7
Merge tag 'sound-4.0-rc5' of git://git.kernel.org/pub/scm/linux/kerne…
torvalds Mar 18, 2015
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
12 changes: 8 additions & 4 deletions arch/arm/crypto/aesbs-core.S_shipped
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,18 @@
# define VFP_ABI_FRAME 0
# define BSAES_ASM_EXTENDED_KEY
# define XTS_CHAIN_TWEAK
# define __ARM_ARCH__ 7
# define __ARM_ARCH__ __LINUX_ARM_ARCH__
# define __ARM_MAX_ARCH__ 7
#endif

#ifdef __thumb__
# define adrl adr
#endif

#if __ARM_ARCH__>=7
#if __ARM_MAX_ARCH__>=7
.arch armv7-a
.fpu neon

.text
.syntax unified @ ARMv7-capable assembler is expected to handle this
#ifdef __thumb2__
Expand All @@ -74,8 +78,6 @@
.code 32
#endif

.fpu neon

.type _bsaes_decrypt8,%function
.align 4
_bsaes_decrypt8:
Expand Down Expand Up @@ -2095,9 +2097,11 @@ bsaes_xts_decrypt:
vld1.8 {q8}, [r0] @ initial tweak
adr r2, .Lxts_magic

#ifndef XTS_CHAIN_TWEAK
tst r9, #0xf @ if not multiple of 16
it ne @ Thumb2 thing, sanity check in ARM
subne r9, #0x10 @ subtract another 16 bytes
#endif
subs r9, #0x80

blo .Lxts_dec_short
Expand Down
12 changes: 8 additions & 4 deletions arch/arm/crypto/bsaes-armv7.pl
Original file line number Diff line number Diff line change
Expand Up @@ -701,14 +701,18 @@ sub bitslice {
# define VFP_ABI_FRAME 0
# define BSAES_ASM_EXTENDED_KEY
# define XTS_CHAIN_TWEAK
# define __ARM_ARCH__ 7
# define __ARM_ARCH__ __LINUX_ARM_ARCH__
# define __ARM_MAX_ARCH__ 7
#endif

#ifdef __thumb__
# define adrl adr
#endif

#if __ARM_ARCH__>=7
#if __ARM_MAX_ARCH__>=7
.arch armv7-a
.fpu neon

.text
.syntax unified @ ARMv7-capable assembler is expected to handle this
#ifdef __thumb2__
Expand All @@ -717,8 +721,6 @@ sub bitslice {
.code 32
#endif

.fpu neon

.type _bsaes_decrypt8,%function
.align 4
_bsaes_decrypt8:
Expand Down Expand Up @@ -2076,9 +2078,11 @@ sub bitslice_key {
vld1.8 {@XMM[8]}, [r0] @ initial tweak
adr $magic, .Lxts_magic

#ifndef XTS_CHAIN_TWEAK
tst $len, #0xf @ if not multiple of 16
it ne @ Thumb2 thing, sanity check in ARM
subne $len, #0x10 @ subtract another 16 bytes
#endif
subs $len, #0x80

blo .Lxts_dec_short
Expand Down
34 changes: 1 addition & 33 deletions arch/x86/boot/compressed/aslr.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@
static const char build_str[] = UTS_RELEASE " (" LINUX_COMPILE_BY "@"
LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION;

struct kaslr_setup_data {
__u64 next;
__u32 type;
__u32 len;
__u8 data[1];
} kaslr_setup_data;

#define I8254_PORT_CONTROL 0x43
#define I8254_PORT_COUNTER0 0x40
#define I8254_CMD_READBACK 0xC0
Expand Down Expand Up @@ -302,29 +295,7 @@ static unsigned long find_random_addr(unsigned long minimum,
return slots_fetch_random();
}

static void add_kaslr_setup_data(struct boot_params *params, __u8 enabled)
{
struct setup_data *data;

kaslr_setup_data.type = SETUP_KASLR;
kaslr_setup_data.len = 1;
kaslr_setup_data.next = 0;
kaslr_setup_data.data[0] = enabled;

data = (struct setup_data *)(unsigned long)params->hdr.setup_data;

while (data && data->next)
data = (struct setup_data *)(unsigned long)data->next;

if (data)
data->next = (unsigned long)&kaslr_setup_data;
else
params->hdr.setup_data = (unsigned long)&kaslr_setup_data;

}

unsigned char *choose_kernel_location(struct boot_params *params,
unsigned char *input,
unsigned char *choose_kernel_location(unsigned char *input,
unsigned long input_size,
unsigned char *output,
unsigned long output_size)
Expand All @@ -335,17 +306,14 @@ unsigned char *choose_kernel_location(struct boot_params *params,
#ifdef CONFIG_HIBERNATION
if (!cmdline_find_option_bool("kaslr")) {
debug_putstr("KASLR disabled by default...\n");
add_kaslr_setup_data(params, 0);
goto out;
}
#else
if (cmdline_find_option_bool("nokaslr")) {
debug_putstr("KASLR disabled by cmdline...\n");
add_kaslr_setup_data(params, 0);
goto out;
}
#endif
add_kaslr_setup_data(params, 1);

/* Record the various known unsafe memory ranges. */
mem_avoid_init((unsigned long)input, input_size,
Expand Down
3 changes: 1 addition & 2 deletions arch/x86/boot/compressed/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,7 @@ asmlinkage __visible void *decompress_kernel(void *rmode, memptr heap,
* the entire decompressed kernel plus relocation table, or the
* entire decompressed kernel plus .bss and .brk sections.
*/
output = choose_kernel_location(real_mode, input_data, input_len,
output,
output = choose_kernel_location(input_data, input_len, output,
output_len > run_size ? output_len
: run_size);

Expand Down
6 changes: 2 additions & 4 deletions arch/x86/boot/compressed/misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,15 @@ int cmdline_find_option_bool(const char *option);

#if CONFIG_RANDOMIZE_BASE
/* aslr.c */
unsigned char *choose_kernel_location(struct boot_params *params,
unsigned char *input,
unsigned char *choose_kernel_location(unsigned char *input,
unsigned long input_size,
unsigned char *output,
unsigned long output_size);
/* cpuflags.c */
bool has_cpuflag(int flag);
#else
static inline
unsigned char *choose_kernel_location(struct boot_params *params,
unsigned char *input,
unsigned char *choose_kernel_location(unsigned char *input,
unsigned long input_size,
unsigned char *output,
unsigned long output_size)
Expand Down
4 changes: 2 additions & 2 deletions arch/x86/crypto/aesni-intel_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ static int __driver_rfc4106_decrypt(struct aead_request *req)
src = kmalloc(req->cryptlen + req->assoclen, GFP_ATOMIC);
if (!src)
return -ENOMEM;
assoc = (src + req->cryptlen + auth_tag_len);
assoc = (src + req->cryptlen);
scatterwalk_map_and_copy(src, req->src, 0, req->cryptlen, 0);
scatterwalk_map_and_copy(assoc, req->assoc, 0,
req->assoclen, 0);
Expand All @@ -1180,7 +1180,7 @@ static int __driver_rfc4106_decrypt(struct aead_request *req)
scatterwalk_done(&src_sg_walk, 0, 0);
scatterwalk_done(&assoc_sg_walk, 0, 0);
} else {
scatterwalk_map_and_copy(dst, req->dst, 0, req->cryptlen, 1);
scatterwalk_map_and_copy(dst, req->dst, 0, tempCipherLen, 1);
kfree(src);
}
return retval;
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/include/asm/fpu-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ static inline void drop_fpu(struct task_struct *tsk)
preempt_disable();
tsk->thread.fpu_counter = 0;
__drop_fpu(tsk);
clear_used_math();
clear_stopped_child_used_math(tsk);
preempt_enable();
}

Expand Down
2 changes: 0 additions & 2 deletions arch/x86/include/asm/page_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ extern int devmem_is_allowed(unsigned long pagenr);
extern unsigned long max_low_pfn_mapped;
extern unsigned long max_pfn_mapped;

extern bool kaslr_enabled;

static inline phys_addr_t get_max_mapped(void)
{
return (phys_addr_t)max_pfn_mapped << PAGE_SHIFT;
Expand Down
1 change: 0 additions & 1 deletion arch/x86/include/uapi/asm/bootparam.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#define SETUP_DTB 2
#define SETUP_PCI 3
#define SETUP_EFI 4
#define SETUP_KASLR 5

/* ram_size flags */
#define RAMDISK_IMAGE_START_MASK 0x07FF
Expand Down
25 changes: 25 additions & 0 deletions arch/x86/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,26 @@ static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
return 0;
}

/*
* ACPI offers an alternative platform interface model that removes
* ACPI hardware requirements for platforms that do not implement
* the PC Architecture.
*
* We initialize the Hardware-reduced ACPI model here:
*/
static void __init acpi_reduced_hw_init(void)
{
if (acpi_gbl_reduced_hardware) {
/*
* Override x86_init functions and bypass legacy pic
* in Hardware-reduced ACPI mode
*/
x86_init.timers.timer_init = x86_init_noop;
x86_init.irqs.pre_vector_init = x86_init_noop;
legacy_pic = &null_legacy_pic;
}
}

/*
* If your system is blacklisted here, but you find that acpi=force
* works for you, please contact linux-acpi@vger.kernel.org
Expand Down Expand Up @@ -1536,6 +1556,11 @@ int __init early_acpi_boot_init(void)
*/
early_acpi_process_madt();

/*
* Hardware-reduced ACPI mode initialization:
*/
acpi_reduced_hw_init();

return 0;
}

Expand Down
22 changes: 16 additions & 6 deletions arch/x86/kernel/apic/apic_numachip.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ static const struct apic apic_numachip;
static unsigned int get_apic_id(unsigned long x)
{
unsigned long value;
unsigned int id;
unsigned int id = (x >> 24) & 0xff;

rdmsrl(MSR_FAM10H_NODE_ID, value);
id = ((x >> 24) & 0xffU) | ((value << 2) & 0xff00U);
if (static_cpu_has_safe(X86_FEATURE_NODEID_MSR)) {
rdmsrl(MSR_FAM10H_NODE_ID, value);
id |= (value << 2) & 0xff00;
}

return id;
}
Expand Down Expand Up @@ -155,10 +157,18 @@ static int __init numachip_probe(void)

static void fixup_cpu_id(struct cpuinfo_x86 *c, int node)
{
if (c->phys_proc_id != node) {
c->phys_proc_id = node;
per_cpu(cpu_llc_id, smp_processor_id()) = node;
u64 val;
u32 nodes = 1;

this_cpu_write(cpu_llc_id, node);

/* Account for nodes per socket in multi-core-module processors */
if (static_cpu_has_safe(X86_FEATURE_NODEID_MSR)) {
rdmsrl(MSR_FAM10H_NODE_ID, val);
nodes = ((val >> 3) & 7) + 1;
}

c->phys_proc_id = node / nodes;
}

static int __init numachip_system_init(void)
Expand Down
10 changes: 9 additions & 1 deletion arch/x86/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,21 @@ do { \

#ifdef CONFIG_RANDOMIZE_BASE
static unsigned long module_load_offset;
static int randomize_modules = 1;

/* Mutex protects the module_load_offset. */
static DEFINE_MUTEX(module_kaslr_mutex);

static int __init parse_nokaslr(char *p)
{
randomize_modules = 0;
return 0;
}
early_param("nokaslr", parse_nokaslr);

static unsigned long int get_module_load_offset(void)
{
if (kaslr_enabled) {
if (randomize_modules) {
mutex_lock(&module_kaslr_mutex);
/*
* Calculate the module_load_offset the first time this
Expand Down
22 changes: 4 additions & 18 deletions arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@
unsigned long max_low_pfn_mapped;
unsigned long max_pfn_mapped;

bool __read_mostly kaslr_enabled = false;

#ifdef CONFIG_DMI
RESERVE_BRK(dmi_alloc, 65536);
#endif
Expand Down Expand Up @@ -427,11 +425,6 @@ static void __init reserve_initrd(void)
}
#endif /* CONFIG_BLK_DEV_INITRD */

static void __init parse_kaslr_setup(u64 pa_data, u32 data_len)
{
kaslr_enabled = (bool)(pa_data + sizeof(struct setup_data));
}

static void __init parse_setup_data(void)
{
struct setup_data *data;
Expand All @@ -457,9 +450,6 @@ static void __init parse_setup_data(void)
case SETUP_EFI:
parse_efi_setup(pa_data, data_len);
break;
case SETUP_KASLR:
parse_kaslr_setup(pa_data, data_len);
break;
default:
break;
}
Expand Down Expand Up @@ -842,14 +832,10 @@ static void __init trim_low_memory_range(void)
static int
dump_kernel_offset(struct notifier_block *self, unsigned long v, void *p)
{
if (kaslr_enabled)
pr_emerg("Kernel Offset: 0x%lx from 0x%lx (relocation range: 0x%lx-0x%lx)\n",
(unsigned long)&_text - __START_KERNEL,
__START_KERNEL,
__START_KERNEL_map,
MODULES_VADDR-1);
else
pr_emerg("Kernel Offset: disabled\n");
pr_emerg("Kernel Offset: 0x%lx from 0x%lx "
"(relocation range: 0x%lx-0x%lx)\n",
(unsigned long)&_text - __START_KERNEL, __START_KERNEL,
__START_KERNEL_map, MODULES_VADDR-1);

return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions arch/x86/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ dotraplinkage void do_bounds(struct pt_regs *regs, long error_code)
goto exit;
conditional_sti(regs);

if (!user_mode(regs))
if (!user_mode_vm(regs))
die("bounds", regs, error_code);

if (!cpu_feature_enabled(X86_FEATURE_MPX)) {
Expand Down Expand Up @@ -637,7 +637,7 @@ dotraplinkage void do_debug(struct pt_regs *regs, long error_code)
* then it's very likely the result of an icebp/int01 trap.
* User wants a sigtrap for that.
*/
if (!dr6 && user_mode(regs))
if (!dr6 && user_mode_vm(regs))
user_icebp = 1;

/* Catch kmemcheck conditions first of all! */
Expand Down
Loading