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:	Tue, 23 Sep 2014 16:12:04 -0400
From:	Dave Jones <davej@...hat.com>
To:	Michal Hocko <mhocko@...e.cz>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	mm-commits@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, linux-fsdevel@...r.kernel.org,
	linux-next@...r.kernel.org, sfr@...b.auug.org.au,
	Sasha Levin <sasha.levin@...cle.com>
Subject: Re: [PATCH] mm, debug: mm-introduce-vm_bug_on_mm-fix-fix.patch

On Tue, Sep 23, 2014 at 01:28:48PM +0200, Michal Hocko wrote:
 > And there is another one hitting during randconfig. The patch makes my
 > eyes bleed but I don't know about other way without breaking out the
 > thing into separate parts sounds worse because we can mix with other
 > messages then.

how about something along the lines of..

 bufptr = buffer = kmalloc()

 #if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION)
	bufptr += sprintf(bufptr, "tlb_flush_pending %d\n",
			mm->tlb_flush_pending);
 #endif

 #ifdef CONFIG_MMU
	bufptr += sprintf(bufptr, "...
 #endif

 ...

 printk(KERN_EMERG "%s", buffer);

 free(buffer);


Still ugly, but looks less like a trainwreck, and keeps the variables
with the associated text.

It does introduce an allocation though, which may be problematic
in this situation. Depending how big this gets, perhaps make it static
instead?

	Dave

--
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