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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 13 Jul 2011 16:37:12 +0800
From:	Américo Wang <xiyou.wangcong@...il.com>
To:	Seiji Aguchi <seiji.aguchi@....com>
Cc:	"kexec@...ts.infradead.org" <kexec@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Vivek Goyal <vgoyal@...hat.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Matthew Garrett <mjg@...hat.com>,
	"tony.luck@...el.com" <tony.luck@...el.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jarod Wilson <jwilson@...hat.com>,
	"hpa@...or.com" <hpa@...or.com>,
	"dle-develop@...ts.sourceforge.net" 
	<dle-develop@...ts.sourceforge.net>,
	Satoru Moriya <satoru.moriya@....com>
Subject: Re: [RFC][PATCH] Replace a function call chain of kmsg_dump(KMSG_DUMP_KEXEC)
 with static function calls

2011/7/11 Seiji Aguchi <seiji.aguchi@....com>:
> Hi,
>

Hi,

>
> [Patch Description]
>
>  For meeting Eric/Vivek's requirements and solving issues of pstore/efivars driver,  I propose a following patch.
>
>    - Remove kmsg_dump(KMSG_DUMP_KEXEC) from crash_kexec()

It is already removed in -mm, can you rebase your patch against -mm?

>    - Add kmsg_dump_kexec() to crash_kexec()
>        kmsg_dump_kexec() moved behind machine_crash_shutdown() so that
>        we can output kernel messages without getting any locks.
>
>    - Introduce CONFIG_KMSG_DUMP_KEXEC
>        - CONFIG_KMSG_DUMP_KEXEC depends on CONFIG_PRINTK which is required for kmsg_dumper.
>
>        - CONFIG_KMSG_DUMP_KEXEC=n (default)
>          Kernel message logging feature doesn't work in kdump path.
>
>        - CONFIG_KMSG_DUMP_KEXEC=y
>          following static functions are called in kdump path.
>          - kmsg_dump_kexec(): This is based on kmsg_dump() and just removed spinlock and a function call chain from it.
>          - do_kmsg_dump_kexec(): This is based on pstore_dump() and just removed mutex lock from it.
>
>        Some people who are not familiar with kexec may add function calls getting spin_lock/mutex_lock in kexec path.
>        These function calls causes failure of kexec.
>        So, I suggest replace a call chain with static function calls so that we can keep reliability of kexec.
>
>     - Add efi_kmsg_dump_kexec() which outputs kernel messages into NVRAM with EFI.
>       This is called by do_kmsg_dump_kexec() statically.
>       By applying to Matthew Garret's patch below, its kernel messages in NVRAM are visible through /dev/pstore.

This looks weird, kmsg_dump_kexec() calls do_kmsg_dump_kexec()
which then calls efi_kmsg_dump_kexec(), so, why not just call
efi_kmsg_dump_kexec()?
since there is no other user of kmsg_dump_kexec().

>From the name CONFIG_KMSG_DUMP_KEXEC, you seem to provide a generic method,
but actually only efi_kmsg_dump_kexec() is and can be called.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ