Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299696
b: refs/heads/master
c: a05a483
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Layton committed Apr 25, 2012
1 parent c6158d6 commit 0a326e8
Show file tree
Hide file tree
Showing 73 changed files with 450 additions and 822 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: 82b769063598d01a8b24abf250a53f8b437e09f1
refs/heads/master: a05a4830a32ef9f89e7bd372a7bae9b96b1ac266
14 changes: 13 additions & 1 deletion trunk/Documentation/security/keys.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ KEY SERVICE OVERVIEW

The key service provides a number of features besides keys:

(*) The key service defines two special key types:
(*) The key service defines three special key types:

(+) "keyring"

Expand All @@ -137,6 +137,18 @@ The key service provides a number of features besides keys:
blobs of data. These can be created, updated and read by userspace,
and aren't intended for use by kernel services.

(+) "logon"

Like a "user" key, a "logon" key has a payload that is an arbitrary
blob of data. It is intended as a place to store secrets which are
accessible to the kernel but not to userspace programs.

The description can be arbitrary, but must be prefixed with a non-zero
length string that describes the key "subclass". The subclass is
separated from the rest of the description by a ':'. "logon" keys can
be created and updated from userspace, but the payload is only
readable from kernel space.

(*) Each process subscribes to three keyrings: a thread-specific keyring, a
process-specific keyring, and a session-specific keyring.

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-ux500/mbox-db5500.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ static ssize_t mbox_read_fifo(struct device *dev,
return sprintf(buf, "0x%X\n", mbox_value);
}

static DEVICE_ATTR(fifo, S_IWUSR | S_IRUGO, mbox_read_fifo, mbox_write_fifo);
static DEVICE_ATTR(fifo, S_IWUGO | S_IRUGO, mbox_read_fifo, mbox_write_fifo);

static int mbox_show(struct seq_file *s, void *data)
{
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/tile/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ struct pci_controller {
*/
#define PCI_DMA_BUS_IS_PHYS 1

int __init tile_pci_init(void);
int __init pcibios_init(void);
int __devinit tile_pci_init(void);
int __devinit pcibios_init(void);

static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr) {}

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/tile/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static int __devinit tile_init_irqs(int controller_id,
*
* Returns the number of controllers discovered.
*/
int __init tile_pci_init(void)
int __devinit tile_pci_init(void)
{
int i;

Expand Down Expand Up @@ -287,7 +287,7 @@ static void __devinit fixup_read_and_payload_sizes(void)
* The controllers have been set up by the time we get here, by a call to
* tile_pci_init.
*/
int __init pcibios_init(void)
int __devinit pcibios_init(void)
{
int i;

Expand Down
14 changes: 3 additions & 11 deletions trunk/arch/x86/boot/compressed/head_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
__HEAD
ENTRY(startup_32)
#ifdef CONFIG_EFI_STUB
jmp preferred_addr

.balign 0x10
/*
* We don't need the return address, so set up the stack so
* efi_main() can find its arugments.
Expand All @@ -44,17 +41,12 @@ ENTRY(startup_32)

call efi_main
cmpl $0, %eax
je preferred_addr
movl %eax, %esi
jne 2f
call 1f
1:
/* EFI init failed, so hang. */
hlt
jmp 1b
2:
call 3f
3:
popl %eax
subl $3b, %eax
subl $1b, %eax
subl BP_pref_address(%esi), %eax
add BP_code32_start(%esi), %eax
leal preferred_addr(%eax), %eax
Expand Down
22 changes: 6 additions & 16 deletions trunk/arch/x86/boot/compressed/head_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -200,28 +200,18 @@ ENTRY(startup_64)
* entire text+data+bss and hopefully all of memory.
*/
#ifdef CONFIG_EFI_STUB
/*
* The entry point for the PE/COFF executable is 0x210, so only
* legacy boot loaders will execute this jmp.
*/
jmp preferred_addr

.org 0x210
pushq %rsi
mov %rcx, %rdi
mov %rdx, %rsi
call efi_main
movq %rax,%rsi
popq %rsi
cmpq $0,%rax
jne 2f
je preferred_addr
movq %rax,%rsi
call 1f
1:
/* EFI init failed, so hang. */
hlt
jmp 1b
2:
call 3f
3:
popq %rax
subq $3b, %rax
subq $1b, %rax
subq BP_pref_address(%rsi), %rax
add BP_code32_start(%esi), %eax
leaq preferred_addr(%rax), %rax
Expand Down
15 changes: 4 additions & 11 deletions trunk/arch/x86/boot/tools/build.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,8 @@ int main(int argc, char ** argv)
put_unaligned_le32(file_sz, &buf[pe_header + 0x50]);

#ifdef CONFIG_X86_32
/*
* Address of entry point.
*
* The EFI stub entry point is +16 bytes from the start of
* the .text section.
*/
put_unaligned_le32(i + 16, &buf[pe_header + 0x28]);
/* Address of entry point */
put_unaligned_le32(i, &buf[pe_header + 0x28]);

/* .text size */
put_unaligned_le32(file_sz, &buf[pe_header + 0xb0]);
Expand All @@ -222,11 +217,9 @@ int main(int argc, char ** argv)
/*
* Address of entry point. startup_32 is at the beginning and
* the 64-bit entry point (startup_64) is always 512 bytes
* after. The EFI stub entry point is 16 bytes after that, as
* the first instruction allows legacy loaders to jump over
* the EFI stub initialisation
* after.
*/
put_unaligned_le32(i + 528, &buf[pe_header + 0x28]);
put_unaligned_le32(i + 512, &buf[pe_header + 0x28]);

/* .text size */
put_unaligned_le32(file_sz, &buf[pe_header + 0xc0]);
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/x86/include/asm/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
#else
# ifdef __i386__
# include "posix_types_32.h"
# elif defined(__ILP32__)
# include "posix_types_x32.h"
# else
# elif defined(__LP64__)
# include "posix_types_64.h"
# else
# include "posix_types_x32.h"
# endif
#endif
2 changes: 1 addition & 1 deletion trunk/arch/x86/include/asm/sigcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ struct sigcontext {
__u64 oldmask;
__u64 cr2;
struct _fpstate __user *fpstate; /* zero when no FPU context */
#ifdef __ILP32__
#ifndef __LP64__
__u32 __fpstate_pad;
#endif
__u64 reserved1[8];
Expand Down
8 changes: 1 addition & 7 deletions trunk/arch/x86/include/asm/siginfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
#define _ASM_X86_SIGINFO_H

#ifdef __x86_64__
# ifdef __ILP32__ /* x32 */
typedef long long __kernel_si_clock_t __attribute__((aligned(4)));
# define __ARCH_SI_CLOCK_T __kernel_si_clock_t
# define __ARCH_SI_ATTRIBUTES __attribute__((aligned(8)))
# else /* x86-64 */
# define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
# endif
# define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
#endif

#include <asm-generic/siginfo.h>
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/x86/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@
#else
# ifdef __i386__
# include <asm/unistd_32.h>
# elif defined(__ILP32__)
# include <asm/unistd_x32.h>
# else
# elif defined(__LP64__)
# include <asm/unistd_64.h>
# else
# include <asm/unistd_x32.h>
# endif
#endif

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/x86/include/asm/x86_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,5 +195,6 @@ extern struct x86_msi_ops x86_msi;

extern void x86_init_noop(void);
extern void x86_init_uint_noop(unsigned int unused);
extern void x86_default_fixup_cpu_id(struct cpuinfo_x86 *c, int node);

#endif
4 changes: 0 additions & 4 deletions trunk/arch/x86/kernel/acpi/sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ unsigned long acpi_realmode_flags;
static char temp_stack[4096];
#endif

asmlinkage void acpi_enter_s3(void)
{
acpi_enter_sleep_state(3, wake_sleep_flags);
}
/**
* acpi_suspend_lowlevel - save kernel state
*
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/x86/kernel/acpi/sleep.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
*/

#include <asm/trampoline.h>
#include <linux/linkage.h>

extern unsigned long saved_video_mode;
extern long saved_magic;

extern int wakeup_pmode_return;

extern u8 wake_sleep_flags;
extern asmlinkage void acpi_enter_s3(void);

extern unsigned long acpi_copy_wakeup_routine(unsigned long);
extern void wakeup_long64(void);

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/x86/kernel/acpi/wakeup_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ restore_registers:
ENTRY(do_suspend_lowlevel)
call save_processor_state
call save_registers
call acpi_enter_s3
pushl $3
call acpi_enter_sleep_state
addl $4, %esp

# In case of S3 failure, we'll emerge here. Jump
# to ret_point to recover
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/x86/kernel/acpi/wakeup_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ ENTRY(do_suspend_lowlevel)
movq %rsi, saved_rsi

addq $8, %rsp
call acpi_enter_s3
movl $3, %edi
xorl %eax, %eax
call acpi_enter_sleep_state
/* in case something went wrong, restore the machine status and go on */
jmp resume_point

Expand Down
34 changes: 14 additions & 20 deletions trunk/arch/x86/kernel/apic/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1637,11 +1637,9 @@ static int __init apic_verify(void)
mp_lapic_addr = APIC_DEFAULT_PHYS_BASE;

/* The BIOS may have set up the APIC at some other address */
if (boot_cpu_data.x86 >= 6) {
rdmsr(MSR_IA32_APICBASE, l, h);
if (l & MSR_IA32_APICBASE_ENABLE)
mp_lapic_addr = l & MSR_IA32_APICBASE_BASE;
}
rdmsr(MSR_IA32_APICBASE, l, h);
if (l & MSR_IA32_APICBASE_ENABLE)
mp_lapic_addr = l & MSR_IA32_APICBASE_BASE;

pr_info("Found and enabled local APIC!\n");
return 0;
Expand All @@ -1659,15 +1657,13 @@ int __init apic_force_enable(unsigned long addr)
* MSR. This can only be done in software for Intel P6 or later
* and AMD K7 (Model > 1) or later.
*/
if (boot_cpu_data.x86 >= 6) {
rdmsr(MSR_IA32_APICBASE, l, h);
if (!(l & MSR_IA32_APICBASE_ENABLE)) {
pr_info("Local APIC disabled by BIOS -- reenabling.\n");
l &= ~MSR_IA32_APICBASE_BASE;
l |= MSR_IA32_APICBASE_ENABLE | addr;
wrmsr(MSR_IA32_APICBASE, l, h);
enabled_via_apicbase = 1;
}
rdmsr(MSR_IA32_APICBASE, l, h);
if (!(l & MSR_IA32_APICBASE_ENABLE)) {
pr_info("Local APIC disabled by BIOS -- reenabling.\n");
l &= ~MSR_IA32_APICBASE_BASE;
l |= MSR_IA32_APICBASE_ENABLE | addr;
wrmsr(MSR_IA32_APICBASE, l, h);
enabled_via_apicbase = 1;
}
return apic_verify();
}
Expand Down Expand Up @@ -2213,12 +2209,10 @@ static void lapic_resume(void)
* FIXME! This will be wrong if we ever support suspend on
* SMP! We'll need to do this as part of the CPU restore!
*/
if (boot_cpu_data.x86 >= 6) {
rdmsr(MSR_IA32_APICBASE, l, h);
l &= ~MSR_IA32_APICBASE_BASE;
l |= MSR_IA32_APICBASE_ENABLE | mp_lapic_addr;
wrmsr(MSR_IA32_APICBASE, l, h);
}
rdmsr(MSR_IA32_APICBASE, l, h);
l &= ~MSR_IA32_APICBASE_BASE;
l |= MSR_IA32_APICBASE_ENABLE | mp_lapic_addr;
wrmsr(MSR_IA32_APICBASE, l, h);
}

maxlvt = lapic_get_maxlvt();
Expand Down
7 changes: 2 additions & 5 deletions trunk/arch/x86/kernel/apic/apic_numachip.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,8 @@ static void __init map_csrs(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;
}
c->phys_proc_id = node;
per_cpu(cpu_llc_id, smp_processor_id()) = node;
}

static int __init numachip_system_init(void)
Expand Down
11 changes: 5 additions & 6 deletions trunk/arch/x86/kernel/cpu/amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
* contact AMD for precise details and a CPU swap.
*
* See http://www.multimania.com/poulot/k6bug.html
* and section 2.6.2 of "AMD-K6 Processor Revision Guide - Model 6"
* (Publication # 21266 Issue Date: August 1998)
* http://www.amd.com/K6/k6docs/revgd.html
*
* The following test is erm.. interesting. AMD neglected to up
* the chip setting when fixing the bug but they also tweaked some
Expand Down Expand Up @@ -95,6 +94,7 @@ static void __cpuinit init_amd_k6(struct cpuinfo_x86 *c)
"system stability may be impaired when more than 32 MB are used.\n");
else
printk(KERN_CONT "probably OK (after B9730xxxx).\n");
printk(KERN_INFO "Please see http://membres.lycos.fr/poulot/k6bug.html\n");
}

/* K6 with old style WHCR */
Expand Down Expand Up @@ -353,11 +353,10 @@ static void __cpuinit srat_detect_node(struct cpuinfo_x86 *c)
node = per_cpu(cpu_llc_id, cpu);

/*
* On multi-fabric platform (e.g. Numascale NumaChip) a
* platform-specific handler needs to be called to fixup some
* IDs of the CPU.
* If core numbers are inconsistent, it's likely a multi-fabric platform,
* so invoke platform-specific handler
*/
if (x86_cpuinit.fixup_cpu_id)
if (c->phys_proc_id != node)
x86_cpuinit.fixup_cpu_id(c, node);

if (!node_online(node)) {
Expand Down
9 changes: 9 additions & 0 deletions trunk/arch/x86/kernel/cpu/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,15 @@ static void dbg_restore_debug_regs(void)
#define dbg_restore_debug_regs()
#endif /* ! CONFIG_KGDB */

/*
* Prints an error where the NUMA and configured core-number mismatch and the
* platform didn't override this to fix it up
*/
void __cpuinit x86_default_fixup_cpu_id(struct cpuinfo_x86 *c, int node)
{
pr_err("NUMA core number %d differs from configured core number %d\n", node, c->phys_proc_id);
}

/*
* cpu_init() initializes state that is per-CPU. Some data is already
* initialized (naturally) in the bootstrap process, such as the GDT
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/x86/kernel/i387.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ int init_fpu(struct task_struct *tsk)
if (tsk_used_math(tsk)) {
if (HAVE_HWFP && tsk == current)
unlazy_fpu(tsk);
tsk->thread.fpu.last_cpu = ~0;
return 0;
}

Expand Down
Loading

0 comments on commit 0a326e8

Please sign in to comment.