Messages in this thread Patches in this message | | | Date | Sun, 13 Sep 2015 04:33:39 +0200 | Subject | Re: [llvmlinux] percpu | bitmap issue? (Cannot boot on bare metal due to a kernel NULL pointer dereference) | From | Sedat Dilek <> |
| |
On Sat, Sep 12, 2015 at 11:22 PM, Sedat Dilek <sedat.dilek@gmail.com> wrote: > On Wed, Sep 9, 2015 at 2:54 PM, Peter Zijlstra <peterz@infradead.org> wrote: >> On Wed, Sep 09, 2015 at 12:05:50PM +0200, Sedat Dilek wrote: >>> I can boot into a CLANG v3.7 compiled Linux-kernel when lib/bitmap is >>> compiled with GCC (here: v4.9). >>> >>> CONFIG_OPTIMIZE_INLINING has no effect on this. >>> >>> Attached are the single llvmlinux patch for AMD64 (x86_64), my >>> kernel-config and 2 objdumps with bitmap.o file alltogether. >> >> I suggest you go tell the LLVM people their compiler is broken. > > It looks like an inline-optimization bug in CLANG when the compiler's > optimization-level is higher than -O2. > > Level -O0 and -O1 are OK - I can boot in such Linux-kernel v4.2. > > With Level -Oz when CONFIG_CC_OPTIMIZE_FOR_SIZE=y (equivalent to GCC's > -Os) the objdump looked sane but I cannot boot on bare metal. > Re-compiling lib/bitmap with -O0 or -O1 is fine again. > > - Sedat - > > [1] http://lists.linuxfoundation.org/pipermail/llvmlinux/2015-September/001355.html
After some discussion on #llvm it turned out to be a known issue in LLVMLinux!
Unfortunately, an existing patch [1] got archived which is still required to build x86_64 correctly. I refreshed this patch against Linux v4.2 (see file attachments). ( According to llvm guys that patch should go upstream and affects also building with GCC. ) ( That's up to the experts. )
$ cat /proc/version Linux version 4.2.0-3-llvmlinux-amd64 (sedat.dilek@gmail.com@fambox) (clang version 3.7.0 (tags/RELEASE_370/final)) #1 SMP Sun Sep 13 02:02:47 CEST 2015
H00ray!
- Sedat -
[1] http://git.linuxfoundation.org/?p=llvmlinux.git;a=blob_plain;f=arch/x86_64/patches/ARCHIVE/0029-Fix-ARCH_HWEIGHT-for-compilation-with-clang.patch;hb=HEAD [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Initializing cgroup subsys cpuacct [ 0.000000] Linux version 4.2.0-3-llvmlinux-amd64 (sedat.dilek@gmail.com@fambox) (clang version 3.7.0 (tags/RELEASE_370/final)) #1 SMP Sun Sep 13 02:02:47 CEST 2015 [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.2.0-3-llvmlinux-amd64 root=UUID=001AADA61AAD9964 loop=/ubuntu/disks/root.disk ro [ 0.000000] KERNEL supported cpus: [ 0.000000] Intel GenuineIntel [ 0.000000] AMD AuthenticAMD [ 0.000000] Centaur CentaurHauls [ 0.000000] Disabled fast string operations [ 0.000000] x86/fpu: xstate_offset[2]: 0240, xstate_sizes[2]: 0100 [ 0.000000] x86/fpu: Supporting XSAVE feature 0x01: 'x87 floating point registers' [ 0.000000] x86/fpu: Supporting XSAVE feature 0x02: 'SSE registers' [ 0.000000] x86/fpu: Supporting XSAVE feature 0x04: 'AVX registers' [ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 0x340 bytes, using 'standard' format. [ 0.000000] x86/fpu: Using 'eager' FPU context switches. [ 0.000000] e820: BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009d7ff] usable [ 0.000000] BIOS-e820: [mem 0x000000000009d800-0x000000000009ffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001fffffff] usable [ 0.000000] BIOS-e820: [mem 0x0000000020000000-0x00000000201fffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000020200000-0x000000003fffffff] usable [ 0.000000] BIOS-e820: [mem 0x0000000040000000-0x00000000401fffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000040200000-0x00000000d9c9efff] usable [ 0.000000] BIOS-e820: [mem 0x00000000d9c9f000-0x00000000dae7efff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000dae7f000-0x00000000daf9efff] ACPI NVS [ 0.000000] BIOS-e820: [mem 0x00000000daf9f000-0x00000000daffefff] ACPI data [ 0.000000] BIOS-e820: [mem 0x00000000dafff000-0x00000000daffffff] usable [ 0.000000] BIOS-e820: [mem 0x00000000db000000-0x00000000df9fffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000f8000000-0x00000000fbffffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fed08000-0x00000000fed08fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fed10000-0x00000000fed19fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fed1c000-0x00000000fed1ffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000ffd80000-0x00000000ffffffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000011fdfffff] usable [ 0.000000] NX (Execute Disable) protection: active [ 0.000000] SMBIOS 2.6 present. [ 0.000000] DMI: SAMSUNG ELECTRONICS CO., LTD. 530U3BI/530U4BI/530U4BH/530U3BI/530U4BI/530U4BH, BIOS 13XK 03/28/2013 [ 0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved [ 0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable [ 0.000000] e820: last_pfn = 0x11fe00 max_arch_pfn = 0x400000000 [ 0.000000] MTRR default type: uncachable [ 0.000000] MTRR fixed ranges enabled: [ 0.000000] 00000-9FFFF write-back [ 0.000000] A0000-BFFFF uncachable [ 0.000000] C0000-FFFFF write-protect [ 0.000000] MTRR variable ranges enabled: [ 0.000000] 0 base 000000000 mask F80000000 write-back [ 0.000000] 1 base 080000000 mask FC0000000 write-back [ 0.000000] 2 base 0C0000000 mask FE0000000 write-back [ 0.000000] 3 base 0DC000000 mask FFC000000 uncachable [ 0.000000] 4 base 0DB000000 mask FFF000000 uncachable [ 0.000000] 5 base 100000000 mask FE0000000 write-back [ 0.000000] 6 base 11FE00000 mask FFFE00000 uncachable [ 0.000000] 7 base 0FFC00000 mask FFFC00000 write-protect [ 0.000000] 8 disabled [ 0.000000] 9 disabled [ 0.000000] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WC UC- WT [ 0.000000] e820: last_pfn = 0xdb000 max_arch_pfn = 0x400000000 [ 0.000000] found SMP MP-table at [mem 0x000f00e0-0x000f00ef] mapped at [ffff8800000f00e0] [ 0.000000] Scanning 1 areas for low memory corruption [ 0.000000] Base memory trampoline at [ffff880000096000] 96000 size 28672 [ 0.000000] reserving inaccessible SNB gfx pages [ 0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff] [ 0.000000] [mem 0x00000000-0x000fffff] page 4k [ 0.000000] BRK [0x03018000, 0x03018fff] PGTABLE [ 0.000000] BRK [0x03019000, 0x03019fff] PGTABLE [ 0.000000] BRK [0x0301a000, 0x0301afff] PGTABLE [ 0.000000] init_memory_mapping: [mem 0x11fc00000-0x11fdfffff] [ 0.000000] [mem 0x11fc00000-0x11fdfffff] page 2M [ 0.000000] BRK [0x0301b000, 0x0301bfff] PGTABLE [ 0.000000] init_memory_mapping: [mem 0x100000000-0x11fbfffff] [ 0.000000] [mem 0x100000000-0x11fbfffff] page 2M [ 0.000000] init_memory_mapping: [mem 0xc0000000-0xd9c9efff] [ 0.000000] [mem 0xc0000000-0xd9bfffff] page 2M [ 0.000000] [mem 0xd9c00000-0xd9c9efff] page 4k [ 0.000000] BRK [0x0301c000, 0x0301cfff] PGTABLE [ 0.000000] BRK [0x0301d000, 0x0301dfff] PGTABLE [ 0.000000] init_memory_mapping: [mem 0xdafff000-0xdaffffff] [ 0.000000] [mem 0xdafff000-0xdaffffff] page 4k [ 0.000000] init_memory_mapping: [mem 0x00100000-0x1fffffff] [ 0.000000] [mem 0x00100000-0x001fffff] page 4k [ 0.000000] [mem 0x00200000-0x1fffffff] page 2M [ 0.000000] init_memory_mapping: [mem 0x20200000-0x3fffffff] [ 0.000000] [mem 0x20200000-0x3fffffff] page 2M [ 0.000000] init_memory_mapping: [mem 0x40200000-0xbfffffff] [ 0.000000] [mem 0x40200000-0xbfffffff] page 2M [ 0.000000] RAMDISK: [mem 0x3788a000-0x37c3cfff] [ 0.000000] ACPI: Early table checksum verification disabled [ 0.000000] ACPI: RSDP 0x00000000000F0100 000024 (v02 SECCSD) [ 0.000000] ACPI: XSDT 0x00000000DAFFE170 00008C (v01 SECCSD LH43STAR 00000002 PTEC 00000002) [ 0.000000] ACPI: FACP 0x00000000DAFEF000 00010C (v05 SECCSD LH43STAR 00000002 PTL 00000002) [ 0.000000] ACPI: DSDT 0x00000000DAFF2000 0083AC (v02 SECCSD SNB-CPT 00000000 INTL 20061109) [ 0.000000] ACPI: FACS 0x00000000DAF47000 000040 [ 0.000000] ACPI: SLIC 0x00000000DAFFD000 000176 (v01 SECCSD LH43STAR 00000002 PTEC 00000001) [ 0.000000] ACPI: SSDT 0x00000000DAFFB000 001068 (v01 SECCSD PtidDevc 00001000 INTL 20061109) [ 0.000000] ACPI: ASF! 0x00000000DAFF1000 0000A5 (v32 SECCSD LH43STAR 00000002 PTL 00000002) [ 0.000000] ACPI: HPET 0x00000000DAFEE000 000038 (v01 SECCSD LH43STAR 00000002 PTL 00000002) [ 0.000000] ACPI: APIC 0x00000000DAFED000 000098 (v03 SECCSD LH43STAR 00000002 PTL 00000002) [ 0.000000] ACPI: MCFG 0x00000000DAFEC000 00003C (v01 SECCSD LH43STAR 00000002 PTL 00000002) [ 0.000000] ACPI: SSDT 0x00000000DAFEB000 000804 (v01 PmRef Cpu0Ist 00003000 INTL 20061109) [ 0.000000] ACPI: SSDT 0x00000000DAFEA000 000996 (v01 PmRef CpuPm 00003000 INTL 20061109) [ 0.000000] ACPI: UEFI 0x00000000DAFE9000 00003E (v01 SECCSD LH43STAR 00000002 PTL 00000002) [ 0.000000] ACPI: UEFI 0x00000000DAFE8000 000042 (v01 PTL COMBUF 00000001 PTL 00000001) [ 0.000000] ACPI: UEFI 0x00000000DAFE7000 00026A (v01 SECCSD LH43STAR 00000002 PTL 00000002) [ 0.000000] ACPI: SSDT 0x00000000DAFE6000 0000D0 (v01 Iffs IffsAsl 00003000 INTL 20061109) [ 0.000000] ACPI: Local APIC address 0xfee00000 [ 0.000000] No NUMA configuration found [ 0.000000] Faking a node at [mem 0x0000000000000000-0x000000011fdfffff] [ 0.000000] NODE_DATA(0) allocated [mem 0x11fdf8000-0x11fdfcfff] [ 0.000000] [ffffea0000000000-ffffea00047fffff] PMD -> [ffff88011b400000-ffff88011f3fffff] on node 0 [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff] [ 0.000000] DMA32 [mem 0x0000000001000000-0x00000000ffffffff] [ 0.000000] Normal [mem 0x0000000100000000-0x000000011fdfffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000001000-0x000000000009cfff] [ 0.000000] node 0: [mem 0x0000000000100000-0x000000001fffffff] [ 0.000000] node 0: [mem 0x0000000020200000-0x000000003fffffff] [ 0.000000] node 0: [mem 0x0000000040200000-0x00000000d9c9efff] [ 0.000000] node 0: [mem 0x00000000dafff000-0x00000000daffffff] [ 0.000000] node 0: [mem 0x0000000100000000-0x000000011fdfffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000011fdfffff] [ 0.000000] On node 0 totalpages: 1021500 [ 0.000000] DMA zone: 64 pages used for memmap [ 0.000000] DMA zone: 156 pages reserved [ 0.000000] DMA zone: 3996 pages, LIFO batch:0 [ 0.000000] DMA32 zone: 13859 pages used for memmap [ 0.000000] DMA32 zone: 886944 pages, LIFO batch:31 [ 0.000000] Normal zone: 2040 pages used for memmap [ 0.000000] Normal zone: 130560 pages, LIFO batch:31 [ 0.000000] Reserving Intel graphics stolen memory at 0xdba00000-0xdf9fffff [ 0.000000] ACPI: PM-Timer IO Port: 0x408 [ 0.000000] ACPI: Local APIC address 0xfee00000 [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1]) [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1]) [ 0.000000] IOAPIC[0]: apic_id 14, version 32, address 0xfec00000, GSI 0-23 [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) [ 0.000000] ACPI: IRQ0 used by override. [ 0.000000] ACPI: IRQ9 used by override. [ 0.000000] Using ACPI (MADT) for SMP configuration information [ 0.000000] ACPI: HPET id: 0x8086a301 base: 0xfed00000 [ 0.000000] smpboot: Allowing 8 CPUs, 4 hotplug CPUs [ 0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff] [ 0.000000] PM: Registered nosave memory: [mem 0x0009d000-0x0009dfff] [ 0.000000] PM: Registered nosave memory: [mem 0x0009e000-0x0009ffff] [ 0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000dffff] [ 0.000000] PM: Registered nosave memory: [mem 0x000e0000-0x000fffff] [ 0.000000] PM: Registered nosave memory: [mem 0x20000000-0x201fffff] [ 0.000000] PM: Registered nosave memory: [mem 0x40000000-0x401fffff] [ 0.000000] PM: Registered nosave memory: [mem 0xd9c9f000-0xdae7efff] [ 0.000000] PM: Registered nosave memory: [mem 0xdae7f000-0xdaf9efff] [ 0.000000] PM: Registered nosave memory: [mem 0xdaf9f000-0xdaffefff] [ 0.000000] PM: Registered nosave memory: [mem 0xdb000000-0xdf9fffff] [ 0.000000] PM: Registered nosave memory: [mem 0xdfa00000-0xf7ffffff] [ 0.000000] PM: Registered nosave memory: [mem 0xf8000000-0xfbffffff] [ 0.000000] PM: Registered nosave memory: [mem 0xfc000000-0xfebfffff] [ 0.000000] PM: Registered nosave memory: [mem 0xfec00000-0xfec00fff] [ 0.000000] PM: Registered nosave memory: [mem 0xfec01000-0xfed07fff] [ 0.000000] PM: Registered nosave memory: [mem 0xfed08000-0xfed08fff] [ 0.000000] PM: Registered nosave memory: [mem 0xfed09000-0xfed0ffff] [ 0.000000] PM: Registered nosave memory: [mem 0xfed10000-0xfed19fff] [ 0.000000] PM: Registered nosave memory: [mem 0xfed1a000-0xfed1bfff] [ 0.000000] PM: Registered nosave memory: [mem 0xfed1c000-0xfed1ffff] [ 0.000000] PM: Registered nosave memory: [mem 0xfed20000-0xfedfffff] [ 0.000000] PM: Registered nosave memory: [mem 0xfee00000-0xfee00fff] [ 0.000000] PM: Registered nosave memory: [mem 0xfee01000-0xffd7ffff] [ 0.000000] PM: Registered nosave memory: [mem 0xffd80000-0xffffffff] [ 0.000000] e820: [mem 0xdfa00000-0xf7ffffff] available for PCI devices [ 0.000000] Booting paravirtualized kernel on bare hardware [ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns [ 0.000000] setup_percpu: NR_CPUS:256 nr_cpumask_bits:256 nr_cpu_ids:8 nr_node_ids:1 [ 0.000000] PERCPU: Embedded 34 pages/cpu @ffff88011fa00000 s98440 r8192 d32632 u262144 [ 0.000000] pcpu-alloc: s98440 r8192 d32632 u262144 alloc=1*2097152 [ 0.000000] pcpu-alloc: [0] 0 1 2 3 4 5 6 7 [ 0.000000] Built 1 zonelists in Node order, mobility grouping on. Total pages: 1005381 [ 0.000000] Policy zone: Normal [ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.2.0-3-llvmlinux-amd64 root=UUID=001AADA61AAD9964 loop=/ubuntu/disks/root.disk ro [ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes) [ 0.000000] Calgary: detecting Calgary via BIOS EBDA area [ 0.000000] Calgary: Unable to locate Rio Grande table in EBDA - bailing! [ 0.000000] Memory: 3915164K/4086000K available (9337K kernel code, 1175K rwdata, 3364K rodata, 2956K init, 14356K bss, 170836K reserved, 0K cma-reserved) [ 0.000000] Running RCU self tests [ 0.000000] Hierarchical RCU implementation. [ 0.000000] RCU lockdep checking is enabled. [ 0.000000] Build-time adjustment of leaf fanout to 64. [ 0.000000] RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=8. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=8 [ 0.000000] NR_IRQS:16640 nr_irqs:488 16 [ 0.000000] Console: colour dummy device 80x25 [ 0.000000] console [tty0] enabled [ 0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar [ 0.000000] ... MAX_LOCKDEP_SUBCLASSES: 8 [ 0.000000] ... MAX_LOCK_DEPTH: 48 [ 0.000000] ... MAX_LOCKDEP_KEYS: 8191 [ 0.000000] ... CLASSHASH_SIZE: 4096 [ 0.000000] ... MAX_LOCKDEP_ENTRIES: 32768 [ 0.000000] ... MAX_LOCKDEP_CHAINS: 65536 [ 0.000000] ... CHAINHASH_SIZE: 32768 [ 0.000000] memory used by lock dependency info: 8159 kB [ 0.000000] per task-struct memory footprint: 1920 bytes [ 0.000000] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 133484882848 ns [ 0.000000] hpet clockevent registered [ 0.000000] tsc: Fast TSC calibration using PIT [ 0.000000] tsc: Detected 1596.341 MHz processor [ 0.000003] Calibrating delay loop (skipped), value calculated using timer frequency.. 3192.68 BogoMIPS (lpj=6385364) [ 0.000019] pid_max: default: 32768 minimum: 301 [ 0.000050] ACPI: Core revision 20150619 [ 0.024179] ACPI: All ACPI Tables successfully acquired [ 0.024324] Security Framework initialized [ 0.024341] AppArmor: AppArmor initialized [ 0.024348] Yama: becoming mindful. [ 0.025548] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes) [ 0.026924] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes) [ 0.027410] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes) [ 0.027437] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes) [ 0.029047] Initializing cgroup subsys blkio [ 0.029093] Initializing cgroup subsys memory [ 0.029127] Initializing cgroup subsys devices [ 0.029171] Initializing cgroup subsys freezer [ 0.029213] Initializing cgroup subsys perf_event [ 0.029229] Initializing cgroup subsys hugetlb [ 0.029285] Disabled fast string operations [ 0.029294] CPU: Physical Processor ID: 0 [ 0.029300] CPU: Processor Core ID: 0 [ 0.029310] ENERGY_PERF_BIAS: Set to 'normal', was 'performance' [ 0.029318] ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8) [ 0.029329] mce: CPU supports 7 MCE banks [ 0.029350] CPU0: Thermal monitoring enabled (TM1) [ 0.029376] process: using mwait in idle threads [ 0.029385] Last level iTLB entries: 4KB 512, 2MB 8, 4MB 8 [ 0.029393] Last level dTLB entries: 4KB 512, 2MB 32, 4MB 32, 1GB 0 [ 0.029657] Freeing SMP alternatives memory: 28K (ffffffff8220a000 - ffffffff82211000) [ 0.045739] ftrace: allocating 206624 entries in 808 pages [ 0.149705] x2apic: IRQ remapping doesn't support X2APIC mode [ 0.150345] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1 [ 0.190014] TSC deadline timer enabled [ 0.190020] smpboot: CPU0: Intel(R) Core(TM) i5-2467M CPU @ 1.60GHz (fam: 06, model: 2a, stepping: 07) [ 0.190078] Performance Events: PEBS fmt1+, 16-deep LBR, SandyBridge events, full-width counters, Intel PMU driver. [ 0.190123] ... version: 3 [ 0.190129] ... bit width: 48 [ 0.190133] ... generic registers: 4 [ 0.190138] ... value mask: 0000ffffffffffff [ 0.190144] ... max period: 0000ffffffffffff [ 0.190149] ... fixed-purpose events: 3 [ 0.190153] ... event mask: 000000070000000f [ 0.192207] x86: Booting SMP configuration: [ 0.192214] .... node #0, CPUs: #1 [ 0.193257] Disabled fast string operations [ 0.195888] NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter. [ 0.196430] #2 [ 0.197462] Disabled fast string operations [ 0.200062] #3<6>[ 0.201101] Disabled fast string operations [ 0.203262] x86: Booted up 1 node, 4 CPUs [ 0.203276] smpboot: Total of 4 processors activated (12770.72 BogoMIPS) [ 0.208593] devtmpfs: initialized [ 0.214795] evm: security.selinux [ 0.214801] evm: security.SMACK64 [ 0.214806] evm: security.capability [ 0.214979] PM: Registering ACPI NVS region [mem 0xdae7f000-0xdaf9efff] (1179648 bytes) [ 0.215382] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.216998] NET: Registered protocol family 16 [ 0.227506] cpuidle: using governor ladder [ 0.243423] cpuidle: using governor menu [ 0.243606] ACPI: bus type PCI registered [ 0.243915] PCI: MMCONFIG for domain 0000 [bus 00-3f] at [mem 0xf8000000-0xfbffffff] (base 0xf8000000) [ 0.243927] PCI: MMCONFIG at [mem 0xf8000000-0xfbffffff] reserved in E820 [ 0.243943] PCI: Using configuration type 1 for base access [ 0.244604] perf_event_intel: PMU erratum BJ122, BV98, HSD29 worked around, HT is on [ 0.265076] ACPI: Added _OSI(Module Device) [ 0.265085] ACPI: Added _OSI(Processor Device) [ 0.265091] ACPI: Added _OSI(3.0 _SCP Extensions) [ 0.265096] ACPI: Added _OSI(Processor Aggregator Device) [ 0.276325] ACPI: Executed 1 blocks of module-level executable AML code [ 0.284955] [Firmware Bug]: ACPI: BIOS _OSI(Linux) query ignored [ 0.286791] ACPI: Dynamic OEM Table Load: [ 0.286821] ACPI: SSDT 0xFFFF88011A2D1800 000688 (v01 PmRef Cpu0Cst 00003001 INTL 20061109) [ 0.288916] ACPI: Dynamic OEM Table Load: [ 0.288944] ACPI: SSDT 0xFFFF88011A2CB800 000303 (v01 PmRef ApIst 00003000 INTL 20061109) [ 0.290837] ACPI: Dynamic OEM Table Load: [ 0.290863] ACPI: SSDT 0xFFFF88011A2C8A00 000119 (v01 PmRef ApCst 00003000 INTL 20061109) [ 0.294124] ACPI : EC: EC started [ 0.295625] ACPI: Interpreter enabled [ 0.295650] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20150619/hwxface-578) [ 0.295712] ACPI: (supports S0 S1 S3 S4 S5) [ 0.295719] ACPI: Using IOAPIC for interrupt routing [ 0.295795] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug [ 0.317001] ACPI: Power Resource [FN00] (off) [ 0.317458] ACPI: Power Resource [FN01] (off) [ 0.317790] ACPI: Power Resource [FN02] (off) [ 0.318120] ACPI: Power Resource [FN03] (off) [ 0.318448] ACPI: Power Resource [FN04] (off) [ 0.320761] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-3e]) [ 0.320775] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI] [ 0.321374] \_SB_.PCI0:_OSC invalid UUID [ 0.321376] _OSC request data:1 1f 0 [ 0.321382] acpi PNP0A08:00: _OSC failed (AE_ERROR); disabling ASPM [ 0.322291] PCI host bridge to bus 0000:00 [ 0.322300] pci_bus 0000:00: root bus resource [bus 00-3e] [ 0.322308] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window] [ 0.322316] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window] [ 0.322324] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window] [ 0.322333] pci_bus 0000:00: root bus resource [mem 0xdfa00000-0xfeafffff window] [ 0.322342] pci_bus 0000:00: root bus resource [mem 0xfed40000-0xfed44fff window] [ 0.322403] pci 0000:00:00.0: [8086:0104] type 00 class 0x060000 [ 0.322784] pci 0000:00:02.0: [8086:0116] type 00 class 0x030000 [ 0.322811] pci 0000:00:02.0: reg 0x10: [mem 0xf0000000-0xf03fffff 64bit] [ 0.322822] pci 0000:00:02.0: reg 0x18: [mem 0xe0000000-0xefffffff 64bit pref] [ 0.322830] pci 0000:00:02.0: reg 0x20: [io 0x3000-0x303f] [ 0.323273] pci 0000:00:16.0: [8086:1c3a] type 00 class 0x078000 [ 0.323333] pci 0000:00:16.0: reg 0x10: [mem 0xf0705000-0xf070500f 64bit] [ 0.323449] pci 0000:00:16.0: PME# supported from D0 D3hot D3cold [ 0.323812] pci 0000:00:1a.0: [8086:1c2d] type 00 class 0x0c0320 [ 0.323866] pci 0000:00:1a.0: reg 0x10: [mem 0xf070a000-0xf070a3ff] [ 0.324001] pci 0000:00:1a.0: PME# supported from D0 D3hot D3cold [ 0.324309] pci 0000:00:1b.0: [8086:1c20] type 00 class 0x040300 [ 0.324368] pci 0000:00:1b.0: reg 0x10: [mem 0xf0700000-0xf0703fff 64bit] [ 0.324504] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold [ 0.324695] pci 0000:00:1b.0: System wakeup disabled by ACPI [ 0.324857] pci 0000:00:1c.0: [8086:1c10] type 01 class 0x060400 [ 0.325005] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold [ 0.325158] pci 0000:00:1c.0: System wakeup disabled by ACPI [ 0.325326] pci 0000:00:1c.3: [8086:1c16] type 01 class 0x060400 [ 0.325472] pci 0000:00:1c.3: PME# supported from D0 D3hot D3cold [ 0.325624] pci 0000:00:1c.3: System wakeup disabled by ACPI [ 0.325784] pci 0000:00:1c.4: [8086:1c18] type 01 class 0x060400 [ 0.325928] pci 0000:00:1c.4: PME# supported from D0 D3hot D3cold [ 0.326232] pci 0000:00:1d.0: [8086:1c26] type 00 class 0x0c0320 [ 0.326286] pci 0000:00:1d.0: reg 0x10: [mem 0xf0709000-0xf07093ff] [ 0.326420] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold [ 0.326711] pci 0000:00:1f.0: [8086:1c49] type 00 class 0x060100 [ 0.327142] pci 0000:00:1f.2: [8086:1c03] type 00 class 0x010601 [ 0.327200] pci 0000:00:1f.2: reg 0x10: [io 0x3088-0x308f] [ 0.327217] pci 0000:00:1f.2: reg 0x14: [io 0x3094-0x3097] [ 0.327234] pci 0000:00:1f.2: reg 0x18: [io 0x3080-0x3087] [ 0.327251] pci 0000:00:1f.2: reg 0x1c: [io 0x3090-0x3093] [ 0.327268] pci 0000:00:1f.2: reg 0x20: [io 0x3060-0x307f] [ 0.327285] pci 0000:00:1f.2: reg 0x24: [mem 0xf0708000-0xf07087ff] [ 0.327351] pci 0000:00:1f.2: PME# supported from D3hot [ 0.327664] pci 0000:00:1f.3: [8086:1c22] type 00 class 0x0c0500 [ 0.327701] pci 0000:00:1f.3: reg 0x10: [mem 0xf0704000-0xf07040ff 64bit] [ 0.327747] pci 0000:00:1f.3: reg 0x20: [io 0xefa0-0xefbf] [ 0.328402] pci 0000:01:00.0: [8086:0091] type 00 class 0x028000 [ 0.329009] pci 0000:01:00.0: reg 0x10: [mem 0xf0600000-0xf0601fff 64bit] [ 0.330294] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold [ 0.330550] pci 0000:01:00.0: System wakeup disabled by ACPI [ 0.335774] pci 0000:00:1c.0: PCI bridge to [bus 01] [ 0.335791] pci 0000:00:1c.0: bridge window [mem 0xf0600000-0xf06fffff] [ 0.336009] pci 0000:02:00.0: [10ec:8168] type 00 class 0x020000 [ 0.336207] pci 0000:02:00.0: reg 0x10: [io 0x2000-0x20ff] [ 0.336345] pci 0000:02:00.0: reg 0x18: [mem 0xf0404000-0xf0404fff 64bit pref] [ 0.336430] pci 0000:02:00.0: reg 0x20: [mem 0xf0400000-0xf0403fff 64bit pref] [ 0.336718] pci 0000:02:00.0: supports D1 D2 [ 0.336721] pci 0000:02:00.0: PME# supported from D0 D1 D2 D3hot D3cold [ 0.336857] pci 0000:02:00.0: System wakeup disabled by ACPI [ 0.343679] pci 0000:00:1c.3: PCI bridge to [bus 02] [ 0.343691] pci 0000:00:1c.3: bridge window [io 0x2000-0x2fff] [ 0.343706] pci 0000:00:1c.3: bridge window [mem 0xf0400000-0xf04fffff 64bit pref] [ 0.343872] pci 0000:03:00.0: [1b21:1042] type 00 class 0x0c0330 [ 0.343951] pci 0000:03:00.0: reg 0x10: [mem 0xf0500000-0xf0507fff 64bit] [ 0.344144] pci 0000:03:00.0: PME# supported from D3hot D3cold [ 0.344396] pci 0000:00:1c.4: PCI bridge to [bus 03] [ 0.344411] pci 0000:00:1c.4: bridge window [mem 0xf0500000-0xf05fffff] [ 0.346447] ACPI: PCI Interrupt Link [LNKA] (IRQs 1 3 4 5 6 10 *11 12 14 15) [ 0.346630] ACPI: PCI Interrupt Link [LNKB] (IRQs 1 3 4 5 6 10 11 12 14 15) *0, disabled. [ 0.346823] ACPI: PCI Interrupt Link [LNKC] (IRQs 1 3 4 5 6 *10 11 12 14 15) [ 0.346999] ACPI: PCI Interrupt Link [LNKD] (IRQs 1 3 4 5 6 *10 11 12 14 15) [ 0.347174] ACPI: PCI Interrupt Link [LNKE] (IRQs 1 3 4 5 6 10 11 12 14 15) *9 [ 0.347350] ACPI: PCI Interrupt Link [LNKF] (IRQs 1 3 4 5 6 10 11 12 14 15) *0, disabled. [ 0.347528] ACPI: PCI Interrupt Link [LNKG] (IRQs 1 3 4 5 6 10 *11 12 14 15) [ 0.347749] ACPI: PCI Interrupt Link [LNKH] (IRQs 1 3 4 5 6 10 11 12 14 15) *9 [ 0.349091] ACPI: Enabled 4 GPEs in block 00 to 3F [ 0.349230] ACPI : EC: GPE = 0x17, I/O: command/status = 0x66, data = 0x62 [ 0.349586] ACPI : EC: 0 stale EC events cleared [ 0.350375] vgaarb: setting as boot device: PCI:0000:00:02.0 [ 0.350383] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none [ 0.350399] vgaarb: loaded [ 0.350404] vgaarb: bridge control possible 0000:00:02.0 [ 0.351134] SCSI subsystem initialized [ 0.351310] libata version 3.00 loaded. [ 0.351408] ACPI: bus type USB registered [ 0.351484] usbcore: registered new interface driver usbfs [ 0.351524] usbcore: registered new interface driver hub [ 0.351646] usbcore: registered new device driver usb [ 0.352133] PCI: Using ACPI for IRQ routing [ 0.355746] PCI: pci_cache_line_size set to 64 bytes [ 0.355876] e820: reserve RAM buffer [mem 0x0009d800-0x0009ffff] [ 0.355886] e820: reserve RAM buffer [mem 0xd9c9f000-0xdbffffff] [ 0.355889] e820: reserve RAM buffer [mem 0xdb000000-0xdbffffff] [ 0.355892] e820: reserve RAM buffer [mem 0x11fe00000-0x11fffffff] [ 0.356667] NetLabel: Initializing [ 0.356673] NetLabel: domain hash size = 128 [ 0.356678] NetLabel: protocols = UNLABELED CIPSOv4 [ 0.356743] NetLabel: unlabeled traffic allowed by default [ 0.356985] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0, 0, 0, 0, 0 [ 0.357001] hpet0: 8 comparators, 64-bit 14.318180 MHz counter [ 0.359100] clocksource: Switched to clocksource hpet [ 0.399888] AppArmor: AppArmor Filesystem Enabled [ 0.400162] pnp: PnP ACPI init [ 0.400855] system 00:00: [io 0x0680-0x069f] has been reserved [ 0.400866] system 00:00: [io 0x1000-0x100f] has been reserved [ 0.400875] system 00:00: [io 0x5000-0x5003] has been reserved [ 0.400883] system 00:00: [io 0xffff] has been reserved [ 0.400891] system 00:00: [io 0x0400-0x0453] could not be reserved [ 0.400899] system 00:00: [io 0x0458-0x047f] has been reserved [ 0.400907] system 00:00: [io 0x0500-0x057f] has been reserved [ 0.400915] system 00:00: [io 0x0a00-0x0a0f] has been reserved [ 0.400924] system 00:00: [io 0x164e-0x164f] has been reserved [ 0.400932] system 00:00: [io 0x5000-0x500f] could not be reserved [ 0.400975] system 00:00: Plug and Play ACPI device, IDs PNP0c02 (active) [ 0.401070] pnp 00:01: Plug and Play ACPI device, IDs PNP0b00 (active) [ 0.401225] system 00:02: [io 0x0454-0x0457] has been reserved [ 0.401238] system 00:02: Plug and Play ACPI device, IDs INT3f0d PNP0c02 (active) [ 0.401335] pnp 00:03: Plug and Play ACPI device, IDs PNP0303 (active) [ 0.401462] pnp 00:04: Plug and Play ACPI device, IDs ETD0b00 SYN0002 PNP0f13 (active) [ 0.401901] system 00:05: [mem 0xfed1c000-0xfed1ffff] has been reserved [ 0.401911] system 00:05: [mem 0xfed10000-0xfed17fff] has been reserved [ 0.401920] system 00:05: [mem 0xfed18000-0xfed18fff] has been reserved [ 0.401928] system 00:05: [mem 0xfed19000-0xfed19fff] has been reserved [ 0.401940] system 00:05: [mem 0xf8000000-0xfbffffff] has been reserved [ 0.401948] system 00:05: [mem 0xfed20000-0xfed3ffff] has been reserved [ 0.401956] system 00:05: [mem 0xfed90000-0xfed93fff] has been reserved [ 0.401965] system 00:05: [mem 0xfed45000-0xfed8ffff] has been reserved [ 0.401974] system 00:05: [mem 0xff000000-0xffffffff] could not be reserved [ 0.401982] system 00:05: [mem 0xfee00000-0xfeefffff] could not be reserved [ 0.401994] system 00:05: Plug and Play ACPI device, IDs PNP0c02 (active) [ 0.402878] system 00:06: Plug and Play ACPI device, IDs PNP0c01 (active) [ 0.402932] pnp: PnP ACPI: found 7 devices [ 0.414207] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns [ 0.414272] pci 0000:00:1c.0: PCI bridge to [bus 01] [ 0.414286] pci 0000:00:1c.0: bridge window [mem 0xf0600000-0xf06fffff] [ 0.414306] pci 0000:00:1c.3: PCI bridge to [bus 02] [ 0.414315] pci 0000:00:1c.3: bridge window [io 0x2000-0x2fff] [ 0.414332] pci 0000:00:1c.3: bridge window [mem 0xf0400000-0xf04fffff 64bit pref] [ 0.414349] pci 0000:00:1c.4: PCI bridge to [bus 03] [ 0.414362] pci 0000:00:1c.4: bridge window [mem 0xf0500000-0xf05fffff] [ 0.414383] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7 window] [ 0.414385] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff window] [ 0.414388] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window] [ 0.414390] pci_bus 0000:00: resource 7 [mem 0xdfa00000-0xfeafffff window] [ 0.414392] pci_bus 0000:00: resource 8 [mem 0xfed40000-0xfed44fff window] [ 0.414395] pci_bus 0000:01: resource 1 [mem 0xf0600000-0xf06fffff] [ 0.414397] pci_bus 0000:02: resource 0 [io 0x2000-0x2fff] [ 0.414400] pci_bus 0000:02: resource 2 [mem 0xf0400000-0xf04fffff 64bit pref] [ 0.414402] pci_bus 0000:03: resource 1 [mem 0xf0500000-0xf05fffff] [ 0.414541] NET: Registered protocol family 2 [ 0.415258] TCP established hash table entries: 32768 (order: 6, 262144 bytes) [ 0.415753] TCP bind hash table entries: 32768 (order: 9, 2097152 bytes) [ 0.417647] TCP: Hash tables configured (established 32768 bind 32768) [ 0.417814] UDP hash table entries: 2048 (order: 6, 327680 bytes) [ 0.418128] UDP-Lite hash table entries: 2048 (order: 6, 327680 bytes) [ 0.418632] NET: Registered protocol family 1 [ 0.418667] pci 0000:00:02.0: Video device with shadowed ROM [ 0.420309] PCI: CLS 64 bytes, default 64 [ 0.420603] Trying to unpack rootfs image as initramfs... [ 0.521374] Freeing initrd memory: 3788K (ffff88003788a000 - ffff880037c3d000) [ 0.521398] PCI-DMA: Using software bounce buffering for IO (SWIOTLB) [ 0.521406] software IO TLB [mem 0xd5c9f000-0xd9c9f000] (64MB) mapped at [ffff8800d5c9f000-ffff8800d9c9efff] [ 0.521603] RAPL PMU detected, API unit is 2^-32 Joules, 3 fixed counters 163840 ms ovfl timer [ 0.521613] hw unit of domain pp0-core 2^-16 Joules [ 0.521618] hw unit of domain package 2^-16 Joules [ 0.521624] hw unit of domain pp1-gpu 2^-16 Joules [ 0.521916] microcode: CPU0 sig=0x206a7, pf=0x10, revision=0x28 [ 0.521944] microcode: CPU1 sig=0x206a7, pf=0x10, revision=0x28 [ 0.521969] microcode: CPU2 sig=0x206a7, pf=0x10, revision=0x28 [ 0.521994] microcode: CPU3 sig=0x206a7, pf=0x10, revision=0x28 [ 0.522204] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba [ 0.522284] Scanning for low memory corruption every 60 seconds [ 0.523793] futex hash table entries: 2048 (order: 6, 262144 bytes) [ 0.523937] Initialise system trusted keyring [ 0.524082] audit: initializing netlink subsys (disabled) [ 0.524175] audit: type=2000 audit(1442110585.460:1): initialized [ 0.525279] HugeTLB registered 2 MB page size, pre-allocated 0 pages [ 0.525928] VFS: Disk quotas dquot_6.6.0 [ 0.525977] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 0.526870] fuse init (API version 7.23) [ 0.529275] Key type asymmetric registered [ 0.529302] Asymmetric key parser 'x509' registered [ 0.529360] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251) [ 0.529537] io scheduler noop registered [ 0.529546] io scheduler deadline registered (default) [ 0.529590] io scheduler cfq registered [ 0.529598] start plist test [ 0.531732] end plist test [ 0.532812] pci_hotplug: PCI Hot Plug PCI Core version: 0.5 [ 0.532840] pciehp: PCI Express Hot Plug Controller Driver version: 0.4 [ 0.533076] intel_idle: MWAIT substates: 0x21120 [ 0.533078] intel_idle: v0.4 model 0x2A [ 0.533080] intel_idle: lapic_timer_reliable_states 0xffffffff [ 0.534479] ACPI: AC Adapter [ADP1] (on-line) [ 0.534746] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input0 [ 0.534804] ACPI: Lid Switch [LID0] [ 0.534948] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1 [ 0.535032] ACPI: Power Button [PWRB] [ 0.535184] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input2 [ 0.535197] ACPI: Power Button [PWRF] [ 0.539290] thermal LNXTHERM:00: registered as thermal_zone0 [ 0.539298] ACPI: Thermal Zone [TZ00] (69 C) [ 0.540013] thermal LNXTHERM:01: registered as thermal_zone1 [ 0.540020] ACPI: Thermal Zone [TZ01] (30 C) [ 0.540140] GHES: HEST is not enabled! [ 0.540445] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled [ 0.550204] ACPI: Battery Slot [BAT1] (battery present) [ 0.551158] Linux agpgart interface v0.103 [ 0.559971] brd: module loaded [ 0.564449] loop: module loaded [ 0.569171] ahci 0000:00:1f.2: version 3.0 [ 0.569528] ahci 0000:00:1f.2: SSS flag set, parallel bus scan disabled [ 0.583120] ahci 0000:00:1f.2: AHCI 0001.0300 32 slots 6 ports 6 Gbps 0x1b impl SATA mode [ 0.583135] ahci 0000:00:1f.2: flags: 64bit ncq sntf ilck stag pm led clo pio slum part ems sxs apst [ 0.609523] scsi host0: ahci [ 0.610162] scsi host1: ahci [ 0.610635] scsi host2: ahci [ 0.611168] scsi host3: ahci [ 0.611608] scsi host4: ahci [ 0.612097] scsi host5: ahci [ 0.612306] ata1: SATA max UDMA/133 abar m2048@0xf0708000 port 0xf0708100 irq 25 [ 0.612317] ata2: SATA max UDMA/133 abar m2048@0xf0708000 port 0xf0708180 irq 25 [ 0.612325] ata3: DUMMY [ 0.612331] ata4: SATA max UDMA/133 abar m2048@0xf0708000 port 0xf0708280 irq 25 [ 0.612341] ata5: SATA max UDMA/133 abar m2048@0xf0708000 port 0xf0708300 irq 25 [ 0.612349] ata6: DUMMY [ 0.614033] libphy: Fixed MDIO Bus: probed [ 0.614434] tun: Universal TUN/TAP device driver, 1.6 [ 0.614441] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com> [ 0.614626] PPP generic driver version 2.4.2 [ 0.615043] xhci_hcd 0000:03:00.0: xHCI Host Controller [ 0.615275] xhci_hcd 0000:03:00.0: new USB bus registered, assigned bus number 1 [ 0.625056] xhci_hcd 0000:03:00.0: hcc params 0x0200f180 hci version 0x96 quirks 0x00080000 [ 0.625825] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 [ 0.625833] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 0.625841] usb usb1: Product: xHCI Host Controller [ 0.625846] usb usb1: Manufacturer: Linux 4.2.0-3-llvmlinux-amd64 xhci-hcd [ 0.625852] usb usb1: SerialNumber: 0000:03:00.0 [ 0.626757] hub 1-0:1.0: USB hub found [ 0.626845] hub 1-0:1.0: 2 ports detected [ 0.627821] xhci_hcd 0000:03:00.0: xHCI Host Controller [ 0.627836] xhci_hcd 0000:03:00.0: new USB bus registered, assigned bus number 2 [ 0.627990] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM. [ 0.628107] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003 [ 0.628114] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 0.628122] usb usb2: Product: xHCI Host Controller [ 0.628127] usb usb2: Manufacturer: Linux 4.2.0-3-llvmlinux-amd64 xhci-hcd [ 0.628133] usb usb2: SerialNumber: 0000:03:00.0 [ 0.628710] hub 2-0:1.0: USB hub found [ 0.628773] hub 2-0:1.0: 2 ports detected [ 0.629297] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 0.629306] ehci-pci: EHCI PCI platform driver [ 0.629609] ehci-pci 0000:00:1a.0: EHCI Host Controller [ 0.629635] ehci-pci 0000:00:1a.0: new USB bus registered, assigned bus number 3 [ 0.629663] ehci-pci 0000:00:1a.0: debug port 2 [ 0.633588] ehci-pci 0000:00:1a.0: cache line size of 64 is not supported [ 0.633616] ehci-pci 0000:00:1a.0: irq 16, io mem 0xf070a000 [ 0.643113] ehci-pci 0000:00:1a.0: USB 2.0 started, EHCI 1.00 [ 0.643304] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002 [ 0.643312] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 0.643320] usb usb3: Product: EHCI Host Controller [ 0.643325] usb usb3: Manufacturer: Linux 4.2.0-3-llvmlinux-amd64 ehci_hcd [ 0.643331] usb usb3: SerialNumber: 0000:00:1a.0 [ 0.643947] hub 3-0:1.0: USB hub found [ 0.643979] hub 3-0:1.0: 2 ports detected [ 0.644778] ehci-pci 0000:00:1d.0: EHCI Host Controller [ 0.644800] ehci-pci 0000:00:1d.0: new USB bus registered, assigned bus number 4 [ 0.644827] ehci-pci 0000:00:1d.0: debug port 2 [ 0.648743] ehci-pci 0000:00:1d.0: cache line size of 64 is not supported [ 0.648773] ehci-pci 0000:00:1d.0: irq 23, io mem 0xf0709000 [ 0.659048] ehci-pci 0000:00:1d.0: USB 2.0 started, EHCI 1.00 [ 0.659239] usb usb4: New USB device found, idVendor=1d6b, idProduct=0002 [ 0.659247] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 0.659255] usb usb4: Product: EHCI Host Controller [ 0.659260] usb usb4: Manufacturer: Linux 4.2.0-3-llvmlinux-amd64 ehci_hcd [ 0.659266] usb usb4: SerialNumber: 0000:00:1d.0 [ 0.659838] hub 4-0:1.0: USB hub found [ 0.659868] hub 4-0:1.0: 2 ports detected [ 0.660292] ehci-platform: EHCI generic platform driver [ 0.660331] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 0.660349] ohci-pci: OHCI PCI platform driver [ 0.660389] ohci-platform: OHCI generic platform driver [ 0.660417] uhci_hcd: USB Universal Host Controller Interface driver [ 0.660545] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:EPAD] at 0x60,0x64 irq 1,12 [ 0.666716] serio: i8042 KBD port at 0x60,0x64 irq 1 [ 0.666788] serio: i8042 AUX port at 0x60,0x64 irq 12 [ 0.667759] mousedev: PS/2 mouse device common for all mice [ 0.669594] rtc_cmos 00:01: rtc core: registered rtc_cmos as rtc0 [ 0.669643] rtc_cmos 00:01: alarms up to one month, y3k, 242 bytes nvram, hpet irqs [ 0.669763] device-mapper: uevent: version 1.0.3 [ 0.670035] device-mapper: ioctl: 4.32.0-ioctl (2015-6-26) initialised: dm-devel@redhat.com [ 0.670077] Intel P-state driver initializing. [ 0.671206] ledtrig-cpu: registered to indicate activity on CPUs [ 0.671976] NET: Registered protocol family 10 [ 0.674304] NET: Registered protocol family 17 [ 0.674379] Key type dns_resolver registered [ 0.676141] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input3 [ 0.677349] Loading compiled-in X.509 certificates [ 0.678496] Loaded X.509 cert 'Build time autogenerated kernel key: 1e687f040f3142bb8a167b26e70c864d6a92e386' [ 0.678548] registered taskstats version 1 [ 0.685156] Key type trusted registered [ 0.695590] Key type encrypted registered [ 0.695608] AppArmor: AppArmor sha1 policy hashing enabled [ 0.695617] evm: HMAC attrs: 0x1 [ 0.696603] rtc_cmos 00:01: setting system clock to 2015-09-13 02:16:25 UTC (1442110585) [ 0.696784] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found [ 0.696792] EDD information not available. [ 0.934867] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [ 0.936171] ata1.00: ATA-8: Hitachi HTS545050A7E380, GG2OA6C0, max UDMA/133 [ 0.936194] ata1.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA [ 0.937587] ata1.00: configured for UDMA/133 [ 0.938577] scsi 0:0:0:0: Direct-Access ATA Hitachi HTS54505 A6C0 PQ: 0 ANSI: 5 [ 0.939759] sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/465 GiB) [ 0.939772] sd 0:0:0:0: [sda] 4096-byte physical blocks [ 0.940060] sd 0:0:0:0: [sda] Write Protect is off [ 0.940072] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 [ 0.940177] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 0.940278] sd 0:0:0:0: Attached scsi generic sg0 type 0 [ 0.954711] usb 3-1: new high-speed USB device number 2 using ehci-pci [ 0.970682] usb 4-1: new high-speed USB device number 2 using ehci-pci [ 0.983703] sda: sda1 sda2 sda3 [ 0.985218] sd 0:0:0:0: [sda] Attached SCSI disk [ 0.994774] usb 1-1: new low-speed USB device number 2 using xhci_hcd [ 1.087790] usb 3-1: New USB device found, idVendor=8087, idProduct=0024 [ 1.087801] usb 3-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 1.088621] hub 3-1:1.0: USB hub found [ 1.088880] hub 3-1:1.0: 6 ports detected [ 1.103523] usb 4-1: New USB device found, idVendor=8087, idProduct=0024 [ 1.103534] usb 4-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 1.104190] hub 4-1:1.0: USB hub found [ 1.104516] hub 4-1:1.0: 6 ports detected [ 1.188858] usb 1-1: New USB device found, idVendor=046d, idProduct=c00e [ 1.188878] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 1.188885] usb 1-1: Product: USB-PS/2 Optical Mouse [ 1.188890] usb 1-1: Manufacturer: Logitech [ 1.189248] usb 1-1: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes [ 1.258636] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [ 1.259530] ata2.00: ATA-8: SanDisk iSSD P4 16GB, SSD 9.14, max UDMA/133 [ 1.259552] ata2.00: 31277232 sectors, multi 1: LBA48 [ 1.260285] ata2.00: configured for UDMA/133 [ 1.260671] scsi 1:0:0:0: Direct-Access ATA SanDisk iSSD P4 9.14 PQ: 0 ANSI: 5 [ 1.261505] sd 1:0:0:0: [sdb] 31277232 512-byte logical blocks: (16.0 GB/14.9 GiB) [ 1.261623] sd 1:0:0:0: Attached scsi generic sg1 type 0 [ 1.261685] sd 1:0:0:0: [sdb] Write Protect is off [ 1.261693] sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00 [ 1.261744] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 1.263307] sdb: sdb1 sdb2 [ 1.264183] sd 1:0:0:0: [sdb] Attached SCSI disk [ 1.362550] usb 3-1.4: new high-speed USB device number 3 using ehci-pci [ 1.378543] usb 4-1.4: new high-speed USB device number 3 using ehci-pci [ 1.480655] usb 4-1.4: New USB device found, idVendor=04a9, idProduct=2225 [ 1.480667] usb 4-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 1.480675] usb 4-1.4: Product: CanoScan [ 1.480681] usb 4-1.4: Manufacturer: Canon [ 1.518566] tsc: Refined TSC clocksource calibration: 1596.374 MHz [ 1.518578] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x1702c3a922f, max_idle_ns: 440795242034 ns [ 1.554402] usb 4-1.5: new full-speed USB device number 4 using ehci-pci [ 1.578388] ata4: SATA link down (SStatus 0 SControl 300) [ 1.615467] usb 3-1.4: New USB device found, idVendor=2232, idProduct=1018 [ 1.615479] usb 3-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 1.615487] usb 3-1.4: Product: WebCam SC-13HDL11431N [ 1.615492] usb 3-1.4: Manufacturer: 123 [ 1.651801] usb 4-1.5: New USB device found, idVendor=8086, idProduct=0189 [ 1.651812] usb 4-1.5: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 1.898183] ata5: SATA link down (SStatus 0 SControl 300) [ 1.899450] Freeing unused kernel memory: 2956K (ffffffff81f27000 - ffffffff8220a000) [ 1.899464] Write protecting the kernel read-only data: 14336k [ 1.900479] Freeing unused kernel memory: 892K (ffff880001921000 - ffff880001a00000) [ 1.901016] Freeing unused kernel memory: 732K (ffff880001d49000 - ffff880001e00000) [ 1.941864] udevd[142]: starting version 175 [ 2.213335] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded [ 2.213373] r8169 0000:02:00.0: can't disable ASPM; OS doesn't have ASPM control [ 2.215362] r8169 0000:02:00.0 eth0: RTL8168evl/8111evl at 0xffffc900009e4000, e8:03:9a:36:17:a9, XID 0c900800 IRQ 31 [ 2.215387] r8169 0000:02:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko] [ 2.287367] usbcore: registered new interface driver usbhid [ 2.287385] usbhid: USB HID core driver [ 2.369964] input: Logitech USB-PS/2 Optical Mouse as /devices/pci0000:00/0000:00:1c.4/0000:03:00.0/usb1/1-1/1-1:1.0/0003:046D:C00E.0001/input/input5 [ 2.370542] hid-generic 0003:046D:C00E.0001: input: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:03:00.0-1/input0 [ 2.518053] clocksource: Switched to clocksource tsc [ 3.113671] EXT4-fs (loop0): mounted filesystem with ordered data mode. Opts: (null) [ 3.520815] random: nonblocking pool is initialized [ 4.160449] usb 3-1.2: new high-speed USB device number 4 using ehci-pci [ 4.254977] usb 3-1.2: New USB device found, idVendor=12d1, idProduct=1446 [ 4.254998] usb 3-1.2: New USB device strings: Mfr=3, Product=2, SerialNumber=0 [ 4.255016] usb 3-1.2: Product: HUAWEI Mobile [ 4.255028] usb 3-1.2: Manufacturer: HUAWEI Technology [ 5.643000] init: ureadahead main process (436) terminated with status 5 [ 10.158398] Adding 262140k swap on /host/ubuntu/disks/swap.disk. Priority:-1 extents:1 across:262140k FS [ 10.359417] EXT4-fs (loop0): re-mounted. Opts: errors=remount-ro [ 10.610398] udevd[670]: starting version 175 [ 11.780748] lp: driver loaded but no devices found [ 13.884697] wmi: Mapper loaded [ 14.076204] ACPI Warning: SystemIO range 0x0000000000000428-0x000000000000042F conflicts with OpRegion 0x0000000000000400-0x000000000000047F (\PMIO) (20150619/utaddress-245) [ 14.076214] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver [ 14.076220] ACPI Warning: SystemIO range 0x0000000000000540-0x000000000000054F conflicts with OpRegion 0x0000000000000500-0x0000000000000563 (\GPIO) (20150619/utaddress-245) [ 14.076225] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver [ 14.076228] ACPI Warning: SystemIO range 0x0000000000000530-0x000000000000053F conflicts with OpRegion 0x0000000000000500-0x0000000000000563 (\GPIO) (20150619/utaddress-245) [ 14.076232] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver [ 14.076234] ACPI Warning: SystemIO range 0x0000000000000500-0x000000000000052F conflicts with OpRegion 0x0000000000000500-0x0000000000000563 (\GPIO) (20150619/utaddress-245) [ 14.076238] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver [ 14.076240] lpc_ich: Resource conflict(s) found affecting gpio_ich [ 14.101685] samsung_laptop: detected SABI interface: SwSmi@ [ 15.748924] [drm] Initialized drm 1.1.0 20060810 [ 15.892403] psmouse serio1: elantech: assuming hardware version 3 (with firmware version 0x450f00) [ 15.907976] psmouse serio1: elantech: Synaptics capabilities query result 0x08, 0x17, 0x0c. [ 15.923079] psmouse serio1: elantech: Elan sample query result 03, 3f, 86 [ 16.002724] input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio1/input/input6 [ 16.180089] usb-storage 3-1.2:1.0: USB Mass Storage device detected [ 16.180559] scsi host6: usb-storage 3-1.2:1.0 [ 16.180922] usb-storage 3-1.2:1.1: USB Mass Storage device detected [ 16.181110] scsi host7: usb-storage 3-1.2:1.1 [ 16.181419] usbcore: registered new interface driver usb-storage [ 16.766964] Bluetooth: Core ver 2.20 [ 16.767022] NET: Registered protocol family 31 [ 16.767025] Bluetooth: HCI device and connection manager initialized [ 16.767143] Bluetooth: HCI socket layer initialized [ 16.767153] Bluetooth: L2CAP socket layer initialized [ 16.767270] Bluetooth: SCO socket layer initialized [ 17.181818] scsi 6:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2 [ 17.181941] scsi 7:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2 [ 17.184686] sd 7:0:0:0: Attached scsi generic sg2 type 0 [ 17.187382] sd 7:0:0:0: [sdc] Attached SCSI removable disk [ 17.207254] sr 6:0:0:0: [sr0] scsi-1 drive [ 17.207260] cdrom: Uniform CD-ROM driver Revision: 3.20 [ 17.209374] sr 6:0:0:0: Attached scsi CD-ROM sr0 [ 17.210053] sr 6:0:0:0: Attached scsi generic sg3 type 5 [ 17.251095] audit: type=1400 audit(1442103402.058:2): apparmor="STATUS" operation="profile_load" name="/sbin/dhclient" pid=1051 comm="apparmor_parser" [ 17.251113] audit: type=1400 audit(1442103402.058:3): apparmor="STATUS" operation="profile_load" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=1051 comm="apparmor_parser" [ 17.251124] audit: type=1400 audit(1442103402.058:4): apparmor="STATUS" operation="profile_load" name="/usr/lib/connman/scripts/dhclient-script" pid=1051 comm="apparmor_parser" [ 17.251514] audit: type=1400 audit(1442103402.062:5): apparmor="STATUS" operation="profile_replace" name="/sbin/dhclient" pid=1012 comm="apparmor_parser" [ 17.251531] audit: type=1400 audit(1442103402.062:6): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=1012 comm="apparmor_parser" [ 17.251544] audit: type=1400 audit(1442103402.062:7): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=1012 comm="apparmor_parser" [ 17.252338] audit: type=1400 audit(1442103402.062:8): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=1051 comm="apparmor_parser" [ 17.252354] audit: type=1400 audit(1442103402.062:9): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=1051 comm="apparmor_parser" [ 17.252406] audit: type=1400 audit(1442103402.062:10): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=1012 comm="apparmor_parser" [ 17.252420] audit: type=1400 audit(1442103402.062:11): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=1012 comm="apparmor_parser" [ 17.315448] cfg80211: World regulatory domain updated: [ 17.315454] cfg80211: DFS Master region: unset [ 17.315456] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time) [ 17.315459] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A) [ 17.315462] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm), (N/A) [ 17.315464] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm), (N/A) [ 17.315466] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A) [ 17.315468] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A) [ 17.770151] usbcore: registered new interface driver btusb [ 17.885191] Linux video capture interface: v2.00 [ 17.978133] Intel(R) Wireless WiFi driver for Linux [ 17.978139] Copyright(c) 2003- 2015 Intel Corporation [ 17.978500] iwlwifi 0000:01:00.0: can't disable ASPM; OS doesn't have ASPM control [ 18.025808] init: failsafe main process (1082) killed by TERM signal [ 18.542361] usb 3-1.2: USB disconnect, device number 4 [ 18.574588] iwlwifi 0000:01:00.0: loaded firmware version 18.168.6.1 op_mode iwldvm [ 18.845989] uvcvideo: Found UVC 1.00 device WebCam SC-13HDL11431N (2232:1018) [ 18.865956] input: WebCam SC-13HDL11431N as /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/input/input7 [ 18.866428] usbcore: registered new interface driver uvcvideo [ 18.866431] USB Video Class driver (1.1.1) [ 20.491805] ppdev: user-space parallel port driver [ 20.631178] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 20.631184] Bluetooth: BNEP filters: protocol multicast [ 20.631197] Bluetooth: BNEP socket layer initialized [ 20.745233] Bluetooth: RFCOMM TTY layer initialized [ 20.745264] Bluetooth: RFCOMM socket layer initialized [ 20.745281] Bluetooth: RFCOMM ver 1.11 [ 21.631860] [drm] Memory usable by graphics device = 2048M [ 21.631954] [drm] Replacing VGA console driver [ 21.658360] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). [ 21.658365] [drm] Driver supports precise vblank timestamp query. [ 21.659702] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem [ 21.675803] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no) [ 21.676810] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input8 [ 21.678316] [drm] Initialized i915 1.6.0 20150522 for 0000:00:02.0 on minor 0 [ 21.686514] fbcon: inteldrmfb (fb0) is primary device [ 21.834704] iwlwifi 0000:01:00.0: CONFIG_IWLWIFI_DEBUG disabled [ 21.834706] iwlwifi 0000:01:00.0: CONFIG_IWLWIFI_DEBUGFS enabled [ 21.834707] iwlwifi 0000:01:00.0: CONFIG_IWLWIFI_DEVICE_TRACING enabled [ 21.834710] iwlwifi 0000:01:00.0: Detected Intel(R) Centrino(R) Advanced-N 6230 AGN, REV=0xB0 [ 21.835248] iwlwifi 0000:01:00.0: L1 Enabled - LTR Disabled [ 21.851055] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC269VC: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker [ 21.851058] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0) [ 21.851059] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x15/0x0/0x0/0x0/0x0) [ 21.851060] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0 [ 21.851062] snd_hda_codec_realtek hdaudioC0D0: inputs: [ 21.851064] snd_hda_codec_realtek hdaudioC0D0: Internal Mic=0x19 [ 21.851067] snd_hda_codec_realtek hdaudioC0D0: Mic=0x18 [ 21.880764] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input9 [ 21.882245] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input10 [ 21.884950] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input11 [ 21.972666] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs' [ 22.579399] usb 3-1.2: new high-speed USB device number 5 using ehci-pci [ 22.673911] usb 3-1.2: New USB device found, idVendor=12d1, idProduct=1436 [ 22.673914] usb 3-1.2: New USB device strings: Mfr=4, Product=3, SerialNumber=0 [ 22.673915] usb 3-1.2: Product: HUAWEI Mobile [ 22.673917] usb 3-1.2: Manufacturer: HUAWEI Technology [ 22.677171] usb-storage 3-1.2:1.0: USB Mass Storage device detected [ 22.678423] usb-storage 3-1.2:1.1: USB Mass Storage device detected [ 22.678910] usb-storage 3-1.2:1.2: USB Mass Storage device detected [ 22.679486] usb-storage 3-1.2:1.3: USB Mass Storage device detected [ 22.680004] usb-storage 3-1.2:1.4: USB Mass Storage device detected [ 22.680516] usb-storage 3-1.2:1.5: USB Mass Storage device detected [ 22.681090] scsi host13: usb-storage 3-1.2:1.5 [ 22.681760] usb-storage 3-1.2:1.6: USB Mass Storage device detected [ 22.682208] scsi host14: usb-storage 3-1.2:1.6 [ 22.690795] Console: switching to colour frame buffer device 170x48 [ 22.699160] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device [ 22.699163] i915 0000:00:02.0: registered panic notifier [ 22.825838] usbcore: registered new interface driver usbserial [ 22.966137] cdc_ether 3-1.2:1.1 wwan0: register 'cdc_ether' at usb-0000:00:1a.0-1.2, Mobile Broadband Network Device, 02:50:f3:00:00:00 [ 22.966429] usbcore: registered new interface driver cdc_ether [ 23.681254] scsi 14:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2 [ 23.681434] scsi 13:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2 [ 23.684517] sd 14:0:0:0: Attached scsi generic sg2 type 0 [ 23.686515] sd 14:0:0:0: [sdc] Attached SCSI removable disk [ 23.696749] sr 13:0:0:0: [sr0] scsi-1 drive [ 23.702754] BUG: sleeping function called from invalid context at kernel/workqueue.c:2680 [ 23.702818] in_atomic(): 0, irqs_disabled(): 1, pid: 1405, name: acpid [ 23.702864] 3 locks held by acpid/1405: [ 23.702865] #0: (&evdev->mutex){+.+...}, at: [<ffffffff8173bf7c>] evdev_release+0xbc/0xf0 [ 23.702875] #1: (&dev->mutex#2){+.+...}, at: [<ffffffff817336e7>] input_close_device+0x27/0x70 [ 23.702883] #2: (hid_open_mut){+.+...}, at: [<ffffffffa0056378>] usbhid_close+0x28/0xb0 [usbhid] [ 23.702891] irq event stamp: 20078 [ 23.702892] hardirqs last enabled at (20077): [<ffffffff819185d2>] _raw_spin_unlock_irq+0x32/0x60 [ 23.702897] hardirqs last disabled at (20078): [<ffffffff81120477>] del_timer_sync+0x37/0x110 [ 23.702901] softirqs last enabled at (19228): [<ffffffff81094da0>] __do_softirq+0x530/0x5a0 [ 23.702906] softirqs last disabled at (19201): [<ffffffff8109505d>] irq_exit+0x9d/0x120 [ 23.702911] CPU: 0 PID: 1405 Comm: acpid Not tainted 4.2.0-3-llvmlinux-amd64 #1 [ 23.702913] Hardware name: SAMSUNG ELECTRONICS CO., LTD. 530U3BI/530U4BI/530U4BH/530U3BI/530U4BI/530U4BH, BIOS 13XK 03/28/2013 [ 23.702915] ffff8800d31d2948 0000000000000092 0000000000000000 ffff8800bc10baa8 [ 23.702919] ffffffff8149288d ffff8800bc10bad8 ffffffff810cbf7a ffffffff81c51a14 [ 23.702922] ffff8800bcd957c0 0000000000000000 0000000000000a78 ffff8800bc10bb18 [ 23.702926] Call Trace: [ 23.702930] [<ffffffff8149288d>] dump_stack+0x7d/0xa0 [ 23.702934] [<ffffffff810cbf7a>] ___might_sleep+0x28a/0x2a0 [ 23.702938] [<ffffffff810cbc7f>] __might_sleep+0x4f/0xc0 [ 23.702941] [<ffffffff810ae8ff>] start_flush_work+0x2f/0x290 [ 23.702943] [<ffffffff810ae8ac>] flush_work+0x5c/0x80 [ 23.702945] [<ffffffff810ae86a>] ? flush_work+0x1a/0x80 [ 23.702949] [<ffffffff810eddcd>] ? trace_hardirqs_off+0xd/0x10 [ 23.702953] [<ffffffff810ad938>] ? try_to_grab_pending+0x48/0x360 [ 23.702956] [<ffffffff819183f3>] ? _raw_spin_lock_irqsave+0x73/0x80 [ 23.702958] [<ffffffff810aecf9>] __cancel_work_timer+0x179/0x260 [ 23.702961] [<ffffffff81918572>] ? _raw_spin_unlock_irqrestore+0x52/0x80 [ 23.702964] [<ffffffff8112042d>] ? try_to_del_timer_sync+0xad/0xc0 [ 23.702967] [<ffffffff810aeb78>] cancel_work_sync+0x18/0x20 [ 23.702970] [<ffffffffa00563c5>] usbhid_close+0x75/0xb0 [usbhid] [ 23.702976] [<ffffffffa0039431>] hidinput_close+0x31/0x40 [hid] [ 23.702980] [<ffffffffa0039400>] ? hidinput_open+0x40/0x40 [hid] [ 23.702983] [<ffffffff81733708>] input_close_device+0x48/0x70 [ 23.702986] [<ffffffff8173bf96>] evdev_release+0xd6/0xf0 [ 23.702990] [<ffffffff8126ed47>] __fput+0x107/0x240 [ 23.702994] [<ffffffff8126ebd6>] ____fput+0x16/0x20 [ 23.702997] [<ffffffff810b8107>] task_work_run+0x87/0x130 [ 23.703001] [<ffffffff810173ef>] do_notify_resume+0x9cf/0xa00 [ 23.703004] [<ffffffff810edddd>] ? trace_hardirqs_on+0xd/0x10 [ 23.703009] [<ffffffff811d1cd3>] ? context_tracking_user_enter+0x13/0x20 [ 23.703012] [<ffffffff81029c31>] ? syscall_trace_leave+0x111/0x340 [ 23.703015] [<ffffffff8126eb66>] ? fput+0x76/0xd0 [ 23.703018] [<ffffffff8126b425>] ? filp_close+0x65/0x90 [ 23.703021] [<ffffffff81003017>] ? trace_hardirqs_on_thunk+0x17/0x19 [ 23.703025] [<ffffffff8191936e>] int_signal+0x12/0x17 [ 23.706263] sr 13:0:0:0: Attached scsi CD-ROM sr0 [ 23.706714] sr 13:0:0:0: Attached scsi generic sg3 type 5 [ 24.811987] r8169 0000:02:00.0 eth0: link down [ 24.812258] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 25.261820] usbcore: registered new interface driver option [ 25.264277] usbserial: USB Serial support registered for GSM modem (1-port) [ 25.265328] option 3-1.2:1.0: GSM modem (1-port) converter detected [ 25.267047] usb 3-1.2: GSM modem (1-port) converter now attached to ttyUSB0 [ 25.267723] option 3-1.2:1.3: GSM modem (1-port) converter detected [ 25.268344] usb 3-1.2: GSM modem (1-port) converter now attached to ttyUSB1 [ 25.268444] option 3-1.2:1.4: GSM modem (1-port) converter detected [ 25.268859] usb 3-1.2: GSM modem (1-port) converter now attached to ttyUSB2 [ 64.861004] usb 4-1.5: USB disconnect, device number 4 [ 65.373270] PPP BSD Compression module registered [ 65.382013] PPP Deflate Compression module registered From 8b4a16c3fe0d1edbd7228bccdf6718dc29d6cf97 Mon Sep 17 00:00:00 2001 From: Sedat Dilek <sedat.dilek@gmail.com> Date: Sun, 13 Sep 2015 01:27:08 +0200 Subject: [PATCH] llvmlinux: Fix ARCH_HWEIGHT for compilation with clang
--- arch/x86/include/asm/arch_hweight.h | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/arch/x86/include/asm/arch_hweight.h b/arch/x86/include/asm/arch_hweight.h index 9686c3d9ff73..a187db48e77d 100644 --- a/arch/x86/include/asm/arch_hweight.h +++ b/arch/x86/include/asm/arch_hweight.h @@ -23,13 +23,7 @@ */ static inline unsigned int __arch_hweight32(unsigned int w) { - unsigned int res = 0; - - asm (ALTERNATIVE("call __sw_hweight32", POPCNT32, X86_FEATURE_POPCNT) - : "="REG_OUT (res) - : REG_IN (w)); - - return res; + return __sw_hweight32(w); } static inline unsigned int __arch_hweight16(unsigned int w) @@ -44,18 +38,13 @@ static inline unsigned int __arch_hweight8(unsigned int w) static inline unsigned long __arch_hweight64(__u64 w) { - unsigned long res = 0; #ifdef CONFIG_X86_32 return __arch_hweight32((u32)w) + __arch_hweight32((u32)(w >> 32)); -#else - asm (ALTERNATIVE("call __sw_hweight64", POPCNT64, X86_FEATURE_POPCNT) - : "="REG_OUT (res) - : REG_IN (w)); #endif /* CONFIG_X86_32 */ - return res; + return __sw_hweight64(w); } #endif -- 2.5.2 [unhandled content-type:application/octet-stream]Behan Webster (19): kbuild-clang-detect kbuild, LLVMLinux: Add better clang cross build support kbuild, LLVMLinux: Add more compiler options for clang kbuild, LLVMLinux: Fix asm-offset generation to work with clang mpi, LLVMLinux: Fix ASM for clang in mpi mpi, LLVMLinux: Remove use of extern inline from lib/mpi mpi, LLVMLinux: Don't use __attribute__ ((mode(QI))) for lib/mpi mpi, LLVMLinux: Remove unused headers from mpi-internal.h md, sysfs, LLVMLinux: Remove nested function from bcache sysfs scsi, megaraid, sas, LLVMLinux: Remove inline DO-NOT-UPSTREAM scsi, osd, LLVMLinux: Remove __weak attribute exofs, LLVMLinux: Remove VLAIS from exofs md, raid10, LLVMLinux: Remove VLAIS from raid10 driver fs, nfs, LLVMLinux: Remove VLAIS from nfs net, wimax, i2400, LLVMLinux: Remove VLAIS from wimax i2400m driver Mark inline functions as __maybe_unused LLVMLinux: use -Oz instead of -Os when using clang makefile-print kbuild: LLVMLinux: Clang doesn't support the gcc flags set by CONFIG_ARCH_HWEIGHT_CFLAGS
Jan-Simon Möller (3): x86: LLVMLinux: Add option for clang in export of memcpy. WORKAROUND DO-NOT-UPSTREAM x86, boot: Work around clang PR18415. Revert "x86: Align jump targets to 1-byte boundaries"
Mark Charlebois (3): Kbuild: LLVMLinux: Disable the use of the Integrated Assembler when compiling with Clang fs, LLVMLinux: Remove warning from COMPATIBLE_IOCTL kbuild, LLVMLinux: Add -Werror to cc-option to support clang
Sedat Dilek (4): Revert "ppp: fix device unregistration upon netns deletion" llvmlinux: Fix ARCH_HWEIGHT for compilation with clang Merge branch 'for-4.2/llvmlinux-fixes' into 4.2.0-3-llvmlinux-amd64 Merge branch 'for-4.2/llvmlinux-arch_hweight-fixes' into 4.2.0-3-llvmlinux-amd64
Vinícius Tinti (3): kbuild: LLVMLinux: Add support to generate LLVM bitcode files apparmor: LLVMLinux: Remove VLAIS DO-NOT-UPSTREAM xen, LLVMLinux: Remove VLAIS from xen mmu
.gitignore | 1 + Kbuild | 8 ++-- Makefile | 59 +++++++++++++++++------ arch/x86/Makefile | 6 --- arch/x86/boot/memory.c | 7 ++- arch/x86/boot/string.h | 2 + arch/x86/include/asm/arch_hweight.h | 15 +----- arch/x86/um/ksyms.c | 2 +- arch/x86/xen/mmu.c | 35 +++++++------- drivers/md/bcache/sysfs.c | 10 ++-- drivers/md/raid10.c | 16 +++---- drivers/net/ppp/ppp_generic.c | 78 ++++++++++++++----------------- drivers/net/wimax/i2400m/fw.c | 2 +- drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- fs/compat_ioctl.c | 2 +- fs/exofs/Kconfig | 2 +- fs/exofs/super.c | 22 ++++----- fs/nfs/Kconfig | 2 +- fs/nfs/objlayout/objio_osd.c | 5 +- include/linux/compiler-gcc.h | 10 ++-- include/linux/kbuild.h | 6 +-- include/scsi/osd_types.h | 2 +- lib/Makefile | 2 + lib/mpi/Makefile | 2 + lib/mpi/longlong.h | 9 ++-- lib/mpi/mpi-inline.h | 2 +- lib/mpi/mpi-internal.h | 10 +--- scripts/Kbuild.include | 6 +-- scripts/Makefile.build | 14 ++++++ scripts/mod/Makefile | 8 ++-- security/apparmor/crypto.c | 17 +++---- 31 files changed, 190 insertions(+), 174 deletions(-)
diff --git a/.gitignore b/.gitignore index 4ad4a98b884b..bbd5f34bd5c5 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ *.lzo *.patch *.gcno +*.ll modules.builtin Module.symvers *.dwo diff --git a/Kbuild b/Kbuild index f55cefd9bf29..0bbb86358942 100644 --- a/Kbuild +++ b/Kbuild @@ -8,10 +8,10 @@ # Default sed regexp - multiline due to syntax constraints define sed-y - "/^->/{s:->#\(.*\):/* \1 */:; \ - s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \ - s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ - s:->::; p;}" + "/^@->/{s:@->#\(.*\):/* \1 */:; \ + s:^@->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \ + s:^@->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ + s:@->::; p;}" endef # Use filechk to avoid rebuilds when a header changes, but the resulting file diff --git a/Makefile b/Makefile index c3615937df38..0e333fd142a1 100644 --- a/Makefile +++ b/Makefile @@ -302,7 +302,7 @@ HOSTCXXFLAGS = -O2 ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"), 1) HOSTCFLAGS += -Wno-unused-value -Wno-unused-parameter \ - -Wno-missing-field-initializers -fno-delete-null-pointer-checks + -Wno-missing-field-initializers endif # Decide whether to build built-in, modular, or both. @@ -366,6 +366,26 @@ CFLAGS_KERNEL = AFLAGS_KERNEL = CFLAGS_GCOV = -fprofile-arcs -ftest-coverage +ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang version"), 1) +COMPILER := clang +else +COMPILER := gcc +endif +export COMPILER + +ifeq ($(COMPILER),clang) +ifneq ($(CROSS_COMPILE),) +CLANG_TARGET := -target $(notdir $(CROSS_COMPILE:%-=%)) +GCC_TOOLCHAIN := $(dir $(CROSS_COMPILE)) +endif +ifneq ($(GCC_TOOLCHAIN),) +CLANG_GCC_TC := -gcc-toolchain $(GCC_TOOLCHAIN) +endif +ifneq ($(CLANG_ENABLE_IA),1) +CLANG_IA_FLAG = -no-integrated-as +endif +CLANG_FLAGS := $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_IA_FLAG) +endif # Use USERINCLUDE when you must reference the UAPI directories only. USERINCLUDE := \ @@ -391,11 +411,11 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common \ -Werror-implicit-function-declaration \ -Wno-format-security \ - -std=gnu89 + -std=gnu89 $(CLANG_FLAGS) KBUILD_AFLAGS_KERNEL := KBUILD_CFLAGS_KERNEL := -KBUILD_AFLAGS := -D__ASSEMBLY__ +KBUILD_AFLAGS := -D__ASSEMBLY__ $(CLANG_FLAGS) KBUILD_AFLAGS_MODULE := -DMODULE KBUILD_CFLAGS_MODULE := -DMODULE KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds @@ -604,10 +624,9 @@ ARCH_AFLAGS := ARCH_CFLAGS := include arch/$(SRCARCH)/Makefile -KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,) - ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE -KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) +KBUILD_CFLAGS += $(call cc-option,-Oz,-Os) +KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,) else KBUILD_CFLAGS += -O2 endif @@ -666,28 +685,26 @@ endif endif KBUILD_CFLAGS += $(stackp-flag) -ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang version"), 1) -COMPILER := clang -else -COMPILER := gcc -endif -export COMPILER - ifeq ($(COMPILER),clang) KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,) -KBUILD_CPPFLAGS += $(call cc-option,-Wno-unknown-warning-option,) KBUILD_CFLAGS += $(call cc-disable-warning, unused-variable) KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier) KBUILD_CFLAGS += $(call cc-disable-warning, gnu) +KBUILD_CFLAGS += -Wno-asm-operand-widths +KBUILD_CFLAGS += -Wno-initializer-overrides +KBUILD_CFLAGS += -fno-builtin + # Quiet clang warning: comparison of unsigned expression < 0 is always false KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare) + # CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the # source of a reference will be _MergedGlobals and not on of the whitelisted names. # See modpost pattern 2 KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,) -KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior) + else +KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,) # This warning generated too much noise in a regular build. # Use make W=1 to enable this warning (see scripts/Makefile.build) KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) @@ -1263,6 +1280,8 @@ help: @echo ' (default: $$(INSTALL_MOD_PATH)/lib/firmware)' @echo ' dir/ - Build all files in dir and below' @echo ' dir/file.[oisS] - Build specified target only' + @echo ' dir/file.ll - Build the LLVM bitcode file' + @echo ' (requires compiler support for LLVM bitcode generation)' @echo ' dir/file.lst - Build specified mixed source/assembly target only' @echo ' (requires a recent binutils and recent build (System.map))' @echo ' dir/file.ko - Build module including final link' @@ -1539,6 +1558,10 @@ endif $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) %.symtypes: %.c prepare scripts FORCE $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) +%.ll: %.c prepare scripts FORCE + $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) +%.ll: %.S prepare scripts FORCE + $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) # Modules /: prepare scripts FORCE @@ -1594,3 +1617,9 @@ FORCE: # Declare the contents of the .PHONY variable as phony. We keep that # information in a variable so we can use it in if_changed and friends. .PHONY: $(PHONY) + +print-%: + @echo '$*=$($*)' + @echo ' origin = $(origin $*)' + @echo ' flavor = $(flavor $*)' + @echo ' value = $(value $*)' diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 118e6debc483..4fea5e90c941 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -77,12 +77,6 @@ else KBUILD_AFLAGS += -m64 KBUILD_CFLAGS += -m64 - # Align jump targets to 1 byte, not the default 16 bytes: - KBUILD_CFLAGS += -falign-jumps=1 - - # Pack loops tightly as well: - KBUILD_CFLAGS += -falign-loops=1 - # Don't autogenerate traditional x87 instructions KBUILD_CFLAGS += $(call cc-option,-mno-80387) KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387) diff --git a/arch/x86/boot/memory.c b/arch/x86/boot/memory.c index db75d07c3645..7af65046dfad 100644 --- a/arch/x86/boot/memory.c +++ b/arch/x86/boot/memory.c @@ -63,8 +63,13 @@ static int detect_memory_e820(void) count = 0; break; } - +#ifdef __clang__ + /* PR18415 */ + memcpy(desc, &buf, sizeof(*desc)); + desc++; +#else *desc++ = buf; +#endif count++; } while (ireg.ebx && count < ARRAY_SIZE(boot_params.e820_map)); diff --git a/arch/x86/boot/string.h b/arch/x86/boot/string.h index 725e820602b1..3e07af1d80e3 100644 --- a/arch/x86/boot/string.h +++ b/arch/x86/boot/string.h @@ -14,8 +14,10 @@ int memcmp(const void *s1, const void *s2, size_t len); * Access builtin version by default. If one needs to use optimized version, * do "undef memcpy" in .c file and link against right string.c */ +#ifndef __clang__ /* PR18415 */ #define memcpy(d,s,l) __builtin_memcpy(d,s,l) #define memset(d,c,l) __builtin_memset(d,c,l) #define memcmp __builtin_memcmp +#endif #endif /* BOOT_STRING_H */ diff --git a/arch/x86/include/asm/arch_hweight.h b/arch/x86/include/asm/arch_hweight.h index 9686c3d9ff73..a187db48e77d 100644 --- a/arch/x86/include/asm/arch_hweight.h +++ b/arch/x86/include/asm/arch_hweight.h @@ -23,13 +23,7 @@ */ static inline unsigned int __arch_hweight32(unsigned int w) { - unsigned int res = 0; - - asm (ALTERNATIVE("call __sw_hweight32", POPCNT32, X86_FEATURE_POPCNT) - : "="REG_OUT (res) - : REG_IN (w)); - - return res; + return __sw_hweight32(w); } static inline unsigned int __arch_hweight16(unsigned int w) @@ -44,18 +38,13 @@ static inline unsigned int __arch_hweight8(unsigned int w) static inline unsigned long __arch_hweight64(__u64 w) { - unsigned long res = 0; #ifdef CONFIG_X86_32 return __arch_hweight32((u32)w) + __arch_hweight32((u32)(w >> 32)); -#else - asm (ALTERNATIVE("call __sw_hweight64", POPCNT64, X86_FEATURE_POPCNT) - : "="REG_OUT (res) - : REG_IN (w)); #endif /* CONFIG_X86_32 */ - return res; + return __sw_hweight64(w); } #endif diff --git a/arch/x86/um/ksyms.c b/arch/x86/um/ksyms.c index 2e8f43ec6214..04aedcecd887 100644 --- a/arch/x86/um/ksyms.c +++ b/arch/x86/um/ksyms.c @@ -4,7 +4,7 @@ #ifndef CONFIG_X86_32 /*XXX: we need them because they would be exported by x86_64 */ -#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4 +#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4 || defined(__clang__) EXPORT_SYMBOL(memcpy); #else EXPORT_SYMBOL(__memcpy); diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index dd151b2045b0..0c12e370860e 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -1271,36 +1271,37 @@ static void xen_flush_tlb_others(const struct cpumask *cpus, struct mm_struct *mm, unsigned long start, unsigned long end) { - struct { - struct mmuext_op op; -#ifdef CONFIG_SMP - DECLARE_BITMAP(mask, num_processors); -#else - DECLARE_BITMAP(mask, NR_CPUS); -#endif - } *args; struct multicall_space mcs; + struct mmuext_op *op; + struct cpumask *mask; trace_xen_mmu_flush_tlb_others(cpus, mm, start, end); if (cpumask_empty(cpus)) return; /* nothing to do */ - mcs = xen_mc_entry(sizeof(*args)); - args = mcs.args; - args->op.arg2.vcpumask = to_cpumask(args->mask); +#ifdef CONFIG_SMP + mcs = xen_mc_entry(sizeof(struct mmuext_op) + BITS_TO_LONGS(num_processors)*sizeof(unsigned long)); +#else + mcs = xen_mc_entry(sizeof(struct mmuext_op) + BITS_TO_LONGS(NR_CPUS)*sizeof(unsigned long)); +#endif + /* Extract fields */ + op = mcs.args; + mask = to_cpumask(mcs.args + sizeof(struct mmuext_op)); + + op->arg2.vcpumask = mask; /* Remove us, and any offline CPUS. */ - cpumask_and(to_cpumask(args->mask), cpus, cpu_online_mask); - cpumask_clear_cpu(smp_processor_id(), to_cpumask(args->mask)); + cpumask_and(mask, cpus, cpu_online_mask); + cpumask_clear_cpu(smp_processor_id(), mask); - args->op.cmd = MMUEXT_TLB_FLUSH_MULTI; + op->cmd = MMUEXT_TLB_FLUSH_MULTI; if (end != TLB_FLUSH_ALL && (end - start) <= PAGE_SIZE) { - args->op.cmd = MMUEXT_INVLPG_MULTI; - args->op.arg1.linear_addr = start; + op->cmd = MMUEXT_INVLPG_MULTI; + op->arg1.linear_addr = start; } - MULTI_mmuext_op(mcs.mc, &args->op, 1, NULL, DOMID_SELF); + MULTI_mmuext_op(mcs.mc, op, 1, NULL, DOMID_SELF); xen_mc_issue(PARAVIRT_LAZY_MMU); } diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c index b3ff57d61dde..53d8baa741fb 100644 --- a/drivers/md/bcache/sysfs.c +++ b/drivers/md/bcache/sysfs.c @@ -731,6 +731,11 @@ static struct attribute *bch_cache_set_internal_files[] = { }; KTYPE(bch_cache_set_internal); +static int __bch_cache_cmp(const void *l, const void *r) +{ + return *((uint16_t *) r) - *((uint16_t *) l); +} + SHOW(__bch_cache) { struct cache *ca = container_of(kobj, struct cache, kobj); @@ -755,9 +760,6 @@ SHOW(__bch_cache) CACHE_REPLACEMENT(&ca->sb)); if (attr == &sysfs_priority_stats) { - int cmp(const void *l, const void *r) - { return *((uint16_t *) r) - *((uint16_t *) l); } - struct bucket *b; size_t n = ca->sb.nbuckets, i; size_t unused = 0, available = 0, dirty = 0, meta = 0; @@ -786,7 +788,7 @@ SHOW(__bch_cache) p[i] = ca->buckets[i].prio; mutex_unlock(&ca->set->bucket_lock); - sort(p, n, sizeof(uint16_t), cmp, NULL); + sort(p, n, sizeof(uint16_t), __bch_cache_cmp, NULL); while (n && !cached[n - 1]) diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 38c58e19cfce..f3d0859c07da 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -711,11 +711,9 @@ static int raid10_mergeable_bvec(struct mddev *mddev, max = biovec->bv_len; if (mddev->merge_check_needed) { - struct { - struct r10bio r10_bio; - struct r10dev devs[conf->copies]; - } on_stack; - struct r10bio *r10_bio = &on_stack.r10_bio; + /* Allocate space for r10bio on stack */ + u8 r10bio_on_stack[sizeof(struct r10bio) + conf->copies * sizeof(struct r10dev)]; + struct r10bio *r10_bio = (struct r10bio*) r10bio_on_stack; int s; if (conf->reshape_progress != MaxSector) { /* Cannot give any guidance during reshape */ @@ -4548,11 +4546,9 @@ static int handle_reshape_read_error(struct mddev *mddev, /* Use sync reads to get the blocks from somewhere else */ int sectors = r10_bio->sectors; struct r10conf *conf = mddev->private; - struct { - struct r10bio r10_bio; - struct r10dev devs[conf->copies]; - } on_stack; - struct r10bio *r10b = &on_stack.r10_bio; + /* Allocate space for r10bio on stack */ + u8 r10bio_on_stack[sizeof(struct r10bio) + conf->copies * sizeof(struct r10dev)]; + struct r10bio *r10b = (struct r10bio *) r10bio_on_stack; int slot = 0; int idx = 0; struct bio_vec *bvec = r10_bio->master_bio->bi_io_vec; diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index fa8f5046afe9..9d15566521a7 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c @@ -269,9 +269,9 @@ static void ppp_ccp_peek(struct ppp *ppp, struct sk_buff *skb, int inbound); static void ppp_ccp_closed(struct ppp *ppp); static struct compressor *find_compressor(int type); static void ppp_get_stats(struct ppp *ppp, struct ppp_stats *st); -static struct ppp *ppp_create_interface(struct net *net, int unit, - struct file *file, int *retp); +static struct ppp *ppp_create_interface(struct net *net, int unit, int *retp); static void init_ppp_file(struct ppp_file *pf, int kind); +static void ppp_shutdown_interface(struct ppp *ppp); static void ppp_destroy_interface(struct ppp *ppp); static struct ppp *ppp_find_unit(struct ppp_net *pn, int unit); static struct channel *ppp_find_channel(struct ppp_net *pn, int unit); @@ -392,10 +392,8 @@ static int ppp_release(struct inode *unused, struct file *file) file->private_data = NULL; if (pf->kind == INTERFACE) { ppp = PF_TO_PPP(pf); - rtnl_lock(); if (file == ppp->owner) - unregister_netdevice(ppp->dev); - rtnl_unlock(); + ppp_shutdown_interface(ppp); } if (atomic_dec_and_test(&pf->refcnt)) { switch (pf->kind) { @@ -595,10 +593,8 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) mutex_lock(&ppp_mutex); if (pf->kind == INTERFACE) { ppp = PF_TO_PPP(pf); - rtnl_lock(); if (file == ppp->owner) - unregister_netdevice(ppp->dev); - rtnl_unlock(); + ppp_shutdown_interface(ppp); } if (atomic_long_read(&file->f_count) < 2) { ppp_release(NULL, file); @@ -842,10 +838,11 @@ static int ppp_unattached_ioctl(struct net *net, struct ppp_file *pf, /* Create a new ppp unit */ if (get_user(unit, p)) break; - ppp = ppp_create_interface(net, unit, file, &err); + ppp = ppp_create_interface(net, unit, &err); if (!ppp) break; file->private_data = &ppp->file; + ppp->owner = file; err = -EFAULT; if (put_user(ppp->file.index, p)) break; @@ -919,16 +916,6 @@ static __net_init int ppp_init_net(struct net *net) static __net_exit void ppp_exit_net(struct net *net) { struct ppp_net *pn = net_generic(net, ppp_net_id); - struct ppp *ppp; - LIST_HEAD(list); - int id; - - rtnl_lock(); - idr_for_each_entry(&pn->units_idr, ppp, id) - unregister_netdevice_queue(ppp->dev, &list); - - unregister_netdevice_many(&list); - rtnl_unlock(); idr_destroy(&pn->units_idr); } @@ -1101,28 +1088,8 @@ static int ppp_dev_init(struct net_device *dev) return 0; } -static void ppp_dev_uninit(struct net_device *dev) -{ - struct ppp *ppp = netdev_priv(dev); - struct ppp_net *pn = ppp_pernet(ppp->ppp_net); - - ppp_lock(ppp); - ppp->closing = 1; - ppp_unlock(ppp); - - mutex_lock(&pn->all_ppp_mutex); - unit_put(&pn->units_idr, ppp->file.index); - mutex_unlock(&pn->all_ppp_mutex); - - ppp->owner = NULL; - - ppp->file.dead = 1; - wake_up_interruptible(&ppp->file.rwait); -} - static const struct net_device_ops ppp_netdev_ops = { .ndo_init = ppp_dev_init, - .ndo_uninit = ppp_dev_uninit, .ndo_start_xmit = ppp_start_xmit, .ndo_do_ioctl = ppp_net_ioctl, .ndo_get_stats64 = ppp_get_stats64, @@ -2700,8 +2667,8 @@ ppp_get_stats(struct ppp *ppp, struct ppp_stats *st) * or if there is already a unit with the requested number. * unit == -1 means allocate a new number. */ -static struct ppp *ppp_create_interface(struct net *net, int unit, - struct file *file, int *retp) +static struct ppp * +ppp_create_interface(struct net *net, int unit, int *retp) { struct ppp *ppp; struct ppp_net *pn; @@ -2721,7 +2688,6 @@ static struct ppp *ppp_create_interface(struct net *net, int unit, ppp->mru = PPP_MRU; init_ppp_file(&ppp->file, INTERFACE); ppp->file.hdrlen = PPP_HDRLEN - 2; /* don't count proto bytes */ - ppp->owner = file; for (i = 0; i < NUM_NP; ++i) ppp->npmode[i] = NPMODE_PASS; INIT_LIST_HEAD(&ppp->channels); @@ -2810,6 +2776,34 @@ init_ppp_file(struct ppp_file *pf, int kind) } /* + * Take down a ppp interface unit - called when the owning file + * (the one that created the unit) is closed or detached. + */ +static void ppp_shutdown_interface(struct ppp *ppp) +{ + struct ppp_net *pn; + + pn = ppp_pernet(ppp->ppp_net); + mutex_lock(&pn->all_ppp_mutex); + + /* This will call dev_close() for us. */ + ppp_lock(ppp); + if (!ppp->closing) { + ppp->closing = 1; + ppp_unlock(ppp); + unregister_netdev(ppp->dev); + unit_put(&pn->units_idr, ppp->file.index); + } else + ppp_unlock(ppp); + + ppp->file.dead = 1; + ppp->owner = NULL; + wake_up_interruptible(&ppp->file.rwait); + + mutex_unlock(&pn->all_ppp_mutex); +} + +/* * Free the memory used by a ppp unit. This is only called once * there are no channels connected to the unit and no file structs * that reference the unit. diff --git a/drivers/net/wimax/i2400m/fw.c b/drivers/net/wimax/i2400m/fw.c index c9c711dcd0e6..a89b5685e68b 100644 --- a/drivers/net/wimax/i2400m/fw.c +++ b/drivers/net/wimax/i2400m/fw.c @@ -652,7 +652,7 @@ static int i2400m_download_chunk(struct i2400m *i2400m, const void *chunk, struct device *dev = i2400m_dev(i2400m); struct { struct i2400m_bootrom_header cmd; - u8 cmd_payload[chunk_len]; + u8 cmd_payload[]; } __packed *buf; struct i2400m_bootrom_header ack; diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 71b884dae27c..8aeb7c72aab8 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -228,7 +228,7 @@ struct megasas_cmd *megasas_get_cmd(struct megasas_instance * @instance: Adapter soft state * @cmd: Command packet to be returned to free command pool */ -inline void +void megasas_return_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd) { unsigned long flags; diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 48851f6ea6ec..67ffab2d33b9 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -811,7 +811,7 @@ static int compat_ioctl_preallocate(struct file *file, */ #define XFORM(i) (((i) ^ ((i) << 27) ^ ((i) << 17)) & 0xffffffff) -#define COMPATIBLE_IOCTL(cmd) XFORM(cmd), +#define COMPATIBLE_IOCTL(cmd) XFORM((u32)cmd), /* ioctl should not be warned about even if it's not implemented. Valid reasons to use this: - It is implemented with ->compat_ioctl on some device, but programs diff --git a/fs/exofs/Kconfig b/fs/exofs/Kconfig index 86194b2f799d..492746f9e61b 100644 --- a/fs/exofs/Kconfig +++ b/fs/exofs/Kconfig @@ -1,6 +1,6 @@ config EXOFS_FS tristate "exofs: OSD based file system support" - depends on SCSI_OSD_ULD + depends on SCSI_OSD_ULD && BROKEN help EXOFS is a file system that uses an OSD storage device, as its backing storage. diff --git a/fs/exofs/super.c b/fs/exofs/super.c index b795c567b5e1..2357dc538bb7 100644 --- a/fs/exofs/super.c +++ b/fs/exofs/super.c @@ -546,27 +546,25 @@ static int exofs_devs_2_odi(struct exofs_dt_device_info *dt_dev, static int __alloc_dev_table(struct exofs_sb_info *sbi, unsigned numdevs, struct exofs_dev **peds) { - struct __alloc_ore_devs_and_exofs_devs { - /* Twice bigger table: See exofs_init_comps() and comment at - * exofs_read_lookup_dev_table() - */ - struct ore_dev *oreds[numdevs * 2 - 1]; - struct exofs_dev eds[numdevs]; - } *aoded; + size_t numoreds = numdevs * 2 - 1; struct exofs_dev *eds; unsigned i; - aoded = kzalloc(sizeof(*aoded), GFP_KERNEL); - if (unlikely(!aoded)) { + /* Twice bigger table: See exofs_init_comps() and comment at + * exofs_read_lookup_dev_table() + * XXX: why -1? + */ + sbi->oc.ods = kzalloc(numoreds * sizeof(struct ore_dev) + + numdevs * sizeof(struct exofs_dev), GFP_KERNEL); + if (unlikely(!sbi->oc.ods)) { EXOFS_ERR("ERROR: failed allocating Device array[%d]\n", numdevs); return -ENOMEM; } - sbi->oc.ods = aoded->oreds; - *peds = eds = aoded->eds; + *peds = eds = (void *)sbi->oc.ods[numoreds]; for (i = 0; i < numdevs; ++i) - aoded->oreds[i] = &eds[i].ored; + sbi->oc.ods[i] = &eds[i].ored; return 0; } diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig index f31fd0dd92c6..e6ef7b3725db 100644 --- a/fs/nfs/Kconfig +++ b/fs/nfs/Kconfig @@ -125,7 +125,7 @@ config PNFS_BLOCK config PNFS_OBJLAYOUT tristate - depends on NFS_V4_1 && SCSI_OSD_ULD + depends on NFS_V4_1 && SCSI_OSD_ULD && BROKEN default NFS_V4 config PNFS_FLEXFILE_LAYOUT diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c index 5aaed363556a..9259037f1cec 100644 --- a/fs/nfs/objlayout/objio_osd.c +++ b/fs/nfs/objlayout/objio_osd.c @@ -301,10 +301,11 @@ objio_alloc_io_state(struct pnfs_layout_hdr *pnfs_layout_type, bool is_reading, int ret; struct __alloc_objio_state { struct objio_state objios; - struct pnfs_osd_ioerr ioerrs[objio_seg->oc.numdevs]; + struct pnfs_osd_ioerr ioerrs[]; } *aos; - aos = kzalloc(sizeof(*aos), gfp_flags); + aos = kzalloc(sizeof(*aos) + objio_seg->oc.numdevs * + sizeof(struct pnfs_osd_ioerr), gfp_flags); if (unlikely(!aos)) return -ENOMEM; diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index dfaa7b3e9ae9..929a3f0d2b08 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -70,14 +70,14 @@ */ #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) -#define inline inline __attribute__((always_inline)) notrace -#define __inline__ __inline__ __attribute__((always_inline)) notrace +#define inline inline __attribute__((always_inline)) notrace __maybe_unused +#define __inline__ __inline__ __attribute__((always_inline)) notrace __maybe_unused #define __inline __inline __attribute__((always_inline)) notrace #else /* A lot of inline functions can cause havoc with function tracing */ -#define inline inline notrace -#define __inline__ __inline__ notrace -#define __inline __inline notrace +#define inline inline notrace __maybe_unused +#define __inline__ __inline__ notrace __maybe_unused +#define __inline __inline notrace __maybe_unused #endif #define __always_inline inline __attribute__((always_inline)) diff --git a/include/linux/kbuild.h b/include/linux/kbuild.h index 22a72198c14b..75fa2c3e0e1d 100644 --- a/include/linux/kbuild.h +++ b/include/linux/kbuild.h @@ -2,14 +2,14 @@ #define __LINUX_KBUILD_H #define DEFINE(sym, val) \ - asm volatile("\n->" #sym " %0 " #val : : "i" (val)) + asm volatile("\n@->" #sym " %0 " #val : : "i" (val)) -#define BLANK() asm volatile("\n->" : : ) +#define BLANK() asm volatile("\n@->" : : ) #define OFFSET(sym, str, mem) \ DEFINE(sym, offsetof(struct str, mem)) #define COMMENT(x) \ - asm volatile("\n->#" x) + asm volatile("\n@->#" x) #endif diff --git a/include/scsi/osd_types.h b/include/scsi/osd_types.h index 48e8a165e136..c7ae7211d15d 100644 --- a/include/scsi/osd_types.h +++ b/include/scsi/osd_types.h @@ -28,7 +28,7 @@ struct osd_obj_id { osd_id id; }; -static const struct __weak osd_obj_id osd_root_object = {0, 0}; +static const struct osd_obj_id osd_root_object __maybe_unused = {0, 0}; struct osd_attr { u32 attr_page; diff --git a/lib/Makefile b/lib/Makefile index 6897b527581a..068188564a6a 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -55,7 +55,9 @@ obj-$(CONFIG_CHECK_SIGNATURE) += check_signature.o obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o GCOV_PROFILE_hweight.o := n +ifneq ($(COMPILER),clang) CFLAGS_hweight.o = $(subst $(quote),,$(CONFIG_ARCH_HWEIGHT_CFLAGS)) +endif obj-$(CONFIG_GENERIC_HWEIGHT) += hweight.o obj-$(CONFIG_BTREE) += btree.o diff --git a/lib/mpi/Makefile b/lib/mpi/Makefile index 019a68c90144..d5553f6b9f09 100644 --- a/lib/mpi/Makefile +++ b/lib/mpi/Makefile @@ -4,6 +4,8 @@ obj-$(CONFIG_MPILIB) = mpi.o +CFLAGS_KERNEL += $(call cc-option,-fheinous-gnu-extensions) + mpi-y = \ generic_mpih-lshift.o \ generic_mpih-mul1.o \ diff --git a/lib/mpi/longlong.h b/lib/mpi/longlong.h index a89d041592c8..d4477621f1eb 100644 --- a/lib/mpi/longlong.h +++ b/lib/mpi/longlong.h @@ -193,8 +193,7 @@ extern UDItype __udiv_qrnnd(UDItype *, UDItype, UDItype, UDItype); "rI" ((USItype)(bl))) #if defined __ARM_ARCH_2__ || defined __ARM_ARCH_3__ #define umul_ppmm(xh, xl, a, b) \ - __asm__ ("%@ Inlined umul_ppmm\n" \ - "mov %|r0, %2, lsr #16 @ AAAA\n" \ + __asm__ ("mov %|r0, %2, lsr #16 @ AAAA\n" \ "mov %|r2, %3, lsr #16 @ BBBB\n" \ "bic %|r1, %2, %|r0, lsl #16 @ aaaa\n" \ "bic %0, %3, %|r2, lsl #16 @ bbbb\n" \ @@ -213,10 +212,8 @@ extern UDItype __udiv_qrnnd(UDItype *, UDItype, UDItype, UDItype); : "r0", "r1", "r2") #else #define umul_ppmm(xh, xl, a, b) \ - __asm__ ("%@ Inlined umul_ppmm\n" \ - "umull %r1, %r0, %r2, %r3" \ - : "=&r" ((USItype)(xh)), \ - "=r" ((USItype)(xl)) \ + __asm__ ("umull %1, %0, %2, %3" \ + : "=&r" ((xh)), "=r" ((xl)) \ : "r" ((USItype)(a)), \ "r" ((USItype)(b)) \ : "r0", "r1") diff --git a/lib/mpi/mpi-inline.h b/lib/mpi/mpi-inline.h index e2b39852b30a..c245ea31f785 100644 --- a/lib/mpi/mpi-inline.h +++ b/lib/mpi/mpi-inline.h @@ -30,7 +30,7 @@ #define G10_MPI_INLINE_H #ifndef G10_MPI_INLINE_DECL -#define G10_MPI_INLINE_DECL extern inline +#define G10_MPI_INLINE_DECL static inline #endif G10_MPI_INLINE_DECL mpi_limb_t diff --git a/lib/mpi/mpi-internal.h b/lib/mpi/mpi-internal.h index c65dd1bff45a..09e9f13c5ba0 100644 --- a/lib/mpi/mpi-internal.h +++ b/lib/mpi/mpi-internal.h @@ -168,20 +168,12 @@ void mpi_rshift_limbs(MPI a, unsigned int count); int mpi_lshift_limbs(MPI a, unsigned int count); /*-- mpihelp-add.c --*/ -mpi_limb_t mpihelp_add_1(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, - mpi_size_t s1_size, mpi_limb_t s2_limb); mpi_limb_t mpihelp_add_n(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_ptr_t s2_ptr, mpi_size_t size); -mpi_limb_t mpihelp_add(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size, - mpi_ptr_t s2_ptr, mpi_size_t s2_size); /*-- mpihelp-sub.c --*/ -mpi_limb_t mpihelp_sub_1(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, - mpi_size_t s1_size, mpi_limb_t s2_limb); mpi_limb_t mpihelp_sub_n(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_ptr_t s2_ptr, mpi_size_t size); -mpi_limb_t mpihelp_sub(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size, - mpi_ptr_t s2_ptr, mpi_size_t s2_size); /*-- mpihelp-cmp.c --*/ int mpihelp_cmp(mpi_ptr_t op1_ptr, mpi_ptr_t op2_ptr, mpi_size_t size); @@ -238,7 +230,7 @@ mpi_limb_t mpihelp_rshift(mpi_ptr_t wp, mpi_ptr_t up, mpi_size_t usize, #define W_TYPE_SIZE BITS_PER_MPI_LIMB typedef mpi_limb_t UWtype; typedef unsigned int UHWtype; -#if defined(__GNUC__) +#if defined(__GNUC__) && !defined(__clang__) typedef unsigned int UQItype __attribute__ ((mode(QI))); typedef int SItype __attribute__ ((mode(SI))); typedef unsigned int USItype __attribute__ ((mode(SI))); diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index d3437b82ac25..bd5a3e26a277 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -111,12 +111,12 @@ as-instr = $(call try-run,\ # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) cc-option = $(call try-run,\ - $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2)) + $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2)) # cc-option-yn # Usage: flag := $(call cc-option-yn,-march=winchip-c6) cc-option-yn = $(call try-run,\ - $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n) + $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n) # cc-option-align # Prefix align with either -falign or -malign @@ -126,7 +126,7 @@ cc-option-align = $(subst -functions=0,,\ # cc-disable-warning # Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable) cc-disable-warning = $(call try-run,\ - $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) + $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) # cc-version cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 01df30af4d4a..6ff524dac82b 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -174,6 +174,20 @@ cmd_cc_symtypes_c = \ $(obj)/%.symtypes : $(src)/%.c FORCE $(call cmd,cc_symtypes_c) +# LLVM bitcode +# Generate .ll files from .s and .c +quiet_cmd_cc_ll_c = CC $(quiet_modtag) $@ + cmd_cc_ll_c = $(CC) $(c_flags) -emit-llvm -S -o $@ $< + +$(obj)/%.ll: $(src)/%.c FORCE + $(call if_changed_dep,cc_ll_c) + +quiet_cmd_as_ll_S = CPP $(quiet_modtag) $@ + cmd_as_ll_S = $(CPP) $(a_flags) -o $@ $< + +$(obj)/%.ll: $(src)/%.S FORCE + $(call if_changed_dep,as_ll_S) + # C (.c) files # The C file is compiled and updated dependency information is generated. # (See cmd_cc_o_c + relevant part of rule_cc_o_c) diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile index c11212ff3510..86f6b852cd93 100644 --- a/scripts/mod/Makefile +++ b/scripts/mod/Makefile @@ -6,10 +6,10 @@ modpost-objs := modpost.o file2alias.o sumversion.o devicetable-offsets-file := devicetable-offsets.h define sed-y - "/^->/{s:->#\(.*\):/* \1 */:; \ - s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \ - s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ - s:->::; p;}" + "/^@->/{s:@->#\(.*\):/* \1 */:; \ + s:^@->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \ + s:^@->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ + s:@->::; p;}" endef quiet_cmd_offsets = GEN $@ diff --git a/security/apparmor/crypto.c b/security/apparmor/crypto.c index 532471d0b3a0..c948247e90c2 100644 --- a/security/apparmor/crypto.c +++ b/security/apparmor/crypto.c @@ -32,10 +32,7 @@ unsigned int aa_hash_size(void) int aa_calc_profile_hash(struct aa_profile *profile, u32 version, void *start, size_t len) { - struct { - struct shash_desc shash; - char ctx[crypto_shash_descsize(apparmor_tfm)]; - } desc; + SHASH_DESC_ON_STACK(shash, apparmor_tfm); int error = -ENOMEM; u32 le32_version = cpu_to_le32(version); @@ -46,19 +43,19 @@ int aa_calc_profile_hash(struct aa_profile *profile, u32 version, void *start, if (!profile->hash) goto fail; - desc.shash.tfm = apparmor_tfm; - desc.shash.flags = 0; + shash->tfm = apparmor_tfm; + shash->flags = 0; - error = crypto_shash_init(&desc.shash); + error = crypto_shash_init(shash); if (error) goto fail; - error = crypto_shash_update(&desc.shash, (u8 *) &le32_version, 4); + error = crypto_shash_update(shash, (u8 *) &le32_version, 4); if (error) goto fail; - error = crypto_shash_update(&desc.shash, (u8 *) start, len); + error = crypto_shash_update(shash, (u8 *) start, len); if (error) goto fail; - error = crypto_shash_final(&desc.shash, profile->hash); + error = crypto_shash_final(shash, profile->hash); if (error) goto fail; | |