lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 9 May 2015 20:31:08 +0800
From:	Fengguang Wu <fengguang.wu@...el.com>
To:	Dave Hansen <dave.hansen@...el.com>
Cc:	fengguang.wu@...el.com, Fenghua Yu <fenghua.yu@...el.com>,
	LKP <lkp@...org>, linux-kernel@...r.kernel.org
Subject: [x86/xsave] WARNING: CPU: 0 PID: 1 at arch/x86/kernel/xsave.c:306
 save_xstate_sig()

Hi Dave,

Just in case this information will help: this patch adds one more warning message.

https://github.com/hansendc/linux.git github-mpx

commit 3701f7533ba43e0aec12bf2dffd49855499fa524
Author:     Dave Hansen <dave.hansen@...el.com>
AuthorDate: Thu May 7 16:03:57 2015 -0700
Commit:     Dave Hansen <dave.hansen@...el.com>
CommitDate: Thu May 7 16:03:57 2015 -0700

    x86/xsaves: Rename xstate_size to  kernel_xstate_size to explicitely distinguish xstate size in kernel from user  space
    
    User space uses standard format xsave area. fpstate in signal frame should
    have standard format size.
    
    To explicitly distinguish between xstate size in kernel space and the one
    in user space, we rename xstate_size to kernel_xstate_size. This patch is
    not fixing a bug. It just makes kernel code more clear.
    
    So we define the xsave area sizes in two global variables:
    
    kernel_xstate_size (previous xstate_size): the xsave area size used in
    xsave area allocated in kernel
    user_xstate_size: the xsave area size used in xsave area used by user.
    
    In no "xsaves" case, xsave area in both user space and kernel space are in
    standard format. Therefore, kernel_xstate_size and user_xstate_size are
    equal.
    
    In "xsaves" case, xsave area in user space is in standard format while
    xsave area in kernel space is in compact format. Therefore, kernel's
    xstate size is less than user's xstate size.
    
    Signed-off-by: Fenghua Yu <fenghua.yu@...el.com>
    Reviewed-by: Dave Hansen <dave.hansen@...el.com>

Attached dmesg for the parent commit, too, to help confirm whether it is a noise error.

+-----------------------------------------------------------+------------+------------+------------+
|                                                           | 4d90fc49c7 | 3701f7533b | 095555a8d0 |
+-----------------------------------------------------------+------------+------------+------------+
| boot_successes                                            | 31         | 19         | 8          |
| boot_failures                                             | 73         | 10         | 8          |
| Kernel_panic-not_syncing:Attempted_to_kill_init!exitcode= | 69         | 6          | 2          |
| backtrace:do_group_exit                                   | 69         | 6          | 2          |
| backtrace:SyS_exit_group                                  | 69         | 6          | 2          |
| Unexpected_close,not_stopping_watchdog                    | 2          | 1          |            |
| IP-Config:Auto-configuration_of_network_failed            | 2          | 2          | 2          |
| WARNING:at_arch/x86/kernel/xsave.c:#save_xstate_sig()     | 0          | 7          | 6          |
+-----------------------------------------------------------+------------+------------+------------+

debug traps:
[    3.025927] random: init urandom read with 27 bits of entropy available
[    3.044079] hostname (61) used greatest stack depth: 6960 bytes left
[    3.057396] ------------[ cut here ]------------
[    3.058044] WARNING: CPU: 0 PID: 1 at arch/x86/kernel/xsave.c:306 save_xstate_sig+0x329/0x340()
[    3.059684] mismatched xstate sizes
[    3.060227] Modules linked in:
[    3.060730] CPU: 0 PID: 1 Comm: init Not tainted 4.1.0-rc2-00026-g3701f75 #3
[    3.061705] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
[    3.063165]  d0837ea0 d0837ea0 d0837e5c cebd61c3 d0837e90 ce83a654 ced4e668 d0837ebc
[    3.064519]  00000001 ced52944 00000132 ce80bff9 00000132 ce80bff9 bfade7d0 d082c000
[    3.065826]  bfade840 d0837ea8 ce83a6be 00000009 d0837ea0 ced4e668 d0837ebc d0837ed4
[    3.067169] Call Trace:
[    3.067538]  [<cebd61c3>] dump_stack+0x16/0x18
[    3.068184]  [<ce83a654>] warn_slowpath_common+0x84/0xc0
[    3.068886]  [<ce80bff9>] ? save_xstate_sig+0x329/0x340
[    3.076023]  [<ce80bff9>] ? save_xstate_sig+0x329/0x340
[    3.076797]  [<ce83a6be>] warn_slowpath_fmt+0x2e/0x30
[    3.077664]  [<ce80bff9>] save_xstate_sig+0x329/0x340
[    3.078381]  [<ce802145>] do_signal+0x785/0xa20
[    3.079034]  [<ce8f6339>] ? vfs_read+0x69/0xf0
[    3.079711]  [<ce8f6c4d>] ? SyS_read+0x4d/0xa0
[    3.080403]  [<ce802418>] do_notify_resume+0x38/0x50
[    3.081170]  [<cebdc0a6>] work_notifysig+0x22/0x28
[    3.081841] ---[ end trace 60313aabd21503a7 ]---
[    3.111349] 99-trinity[64]: segfault at 0 ip   (null) sp bfba8070 error 14 in bash[8048000+dc000]

git bisect start 095555a8d0b69cc3e00a5675666942efab7821d0 5ebe6afaf0057ac3eaeb98defd5456894b446d22 --
git bisect good 8e2f9f5c8055fd77a6973509ea4375e2028d2ded  # 22:28     25+      2  Merge 'mlin/block-generic-req' into devel-lkp-nex05-rand-201505081410
git bisect  bad 0ffe556dae9ae5aa9adc7f5c50909ebcda7e92f6  # 22:44      0-     25  Merge 'hansendc/github-mpx' into devel-lkp-nex05-rand-201505081410
git bisect good d4400bcee070ddc90b8d74af691ee6c747c16b4f  # 23:13     25+      2  x86, mpx: do 32-bit-only cmpxchg for 32-bit apps
git bisect good d542d9b320141a1421b959585f2fc30174ead379  # 23:22     25+      4  x86, fpu: xsave directly when using compacted buffer format
git bisect  bad 3701f7533ba43e0aec12bf2dffd49855499fa524  # 23:26      0-      7  x86/xsaves: Rename xstate_size to  kernel_xstate_size to explicitely distinguish xstate size in kernel from user  space
git bisect good 1a745816a2d115124ab9a47181041836c1a248f6  # 23:31     25+      5  x86/xsave.c: Fix xstate offsets and sizes  enumeration
git bisect good 4d90fc49c73730c09d7afd515f9c4e08d30229bd  # 23:36     25+      5  x86/xsaves: Define and use user_xstate_size for  xstate size in signal context
# first bad commit: [3701f7533ba43e0aec12bf2dffd49855499fa524] x86/xsaves: Rename xstate_size to  kernel_xstate_size to explicitely distinguish xstate size in kernel from user  space
git bisect good 4d90fc49c73730c09d7afd515f9c4e08d30229bd  # 23:38     75+     73  x86/xsaves: Define and use user_xstate_size for  xstate size in signal context
# extra tests with DEBUG_INFO
git bisect  bad 3701f7533ba43e0aec12bf2dffd49855499fa524  # 23:59      0-     29  x86/xsaves: Rename xstate_size to  kernel_xstate_size to explicitely distinguish xstate size in kernel from user  space
# extra tests on HEAD of linux-devel/devel-lkp-nex05-rand-201505081410
git bisect  bad 095555a8d0b69cc3e00a5675666942efab7821d0  # 23:59      0-      8  0day head guard for 'devel-lkp-nex05-rand-201505081410'
# extra tests on tree/branch hansendc/github-mpx
git bisect  bad 50db9eb40ae8e9da7f8b05c78e99418946ba0f7e  # 00:46     64-     13  x86/fpu: always restore_xinit_state() when !use_eager_cpu()
# extra tests with first bad commit reverted
# extra tests on tree/branch linus/master
git bisect good 3e0283a53f7d2f2dae7bc4aa7f3104cb5988018f  # 00:50     78+      5  Merge tag 'pm+acpi-4.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
# extra tests on tree/branch next/master
git bisect good 675b3fb9606dc62afe1542b12f7b2ac3dbf753e5  # 01:32     78+      5  Add linux-next specific files for 20150508


This script may reproduce the error.

----------------------------------------------------------------------------
#!/bin/bash

kernel=$1
initrd=quantal-core-i386.cgz

wget --no-clobber https://github.com/fengguang/reproduce-kernel-bug/raw/master/initrd/$initrd

kvm=(
	qemu-system-x86_64
	-enable-kvm
	-cpu kvm64
	-kernel $kernel
	-initrd $initrd
	-m 300
	-smp 2
	-device e1000,netdev=net0
	-netdev user,id=net0
	-boot order=nc
	-no-reboot
	-watchdog i6300esb
	-rtc base=localtime
	-serial stdio
	-display none
	-monitor null 
)

append=(
	hung_task_panic=1
	earlyprintk=ttyS0,115200
	systemd.log_level=err
	debug
	apic=debug
	sysrq_always_enabled
	rcupdate.rcu_cpu_stall_timeout=100
	panic=-1
	softlockup_panic=1
	nmi_watchdog=panic
	oops=panic
	load_ramdisk=2
	prompt_ramdisk=0
	console=ttyS0,115200
	console=tty0
	vga=normal
	root=/dev/ram0
	rw
	drbd.minor_count=8
)

"${kvm[@]}" --append "${append[*]}"
----------------------------------------------------------------------------

Thanks,
Fengguang

View attachment "dmesg-quantal-ivb41-96:20150508232550:i386-randconfig-nexr1-0505:4.1.0-rc2-00026-g3701f75:3" of type "text/plain" (46254 bytes)

View attachment "dmesg-quantal-ivb41-100:20150508233632:i386-randconfig-nexr1-0505:4.1.0-rc2-00025-g4d90fc4:5" of type "text/plain" (44348 bytes)

View attachment "config-4.1.0-rc2-00026-g3701f75" of type "text/plain" (75512 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ