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]
Message-Id: <20140923135258.faf628403a58701da5a981df@linux-foundation.org>
Date:	Tue, 23 Sep 2014 13:52:58 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Valdis.Kletnieks@...edu
Cc:	Michal Hocko <mhocko@...e.cz>, 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, 23 Sep 2014 12:19:49 -0400 Valdis.Kletnieks@...edu wrote:

> On Tue, 23 Sep 2014 13:28:48 +0200, Michal Hocko said:
> > And there is another one hitting during randconfig. The patch makes my
> > eyes bleed
> 
> Amen.  But I'm not seeing a better fix either.
> 
> >  #if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION)
> > -		"tlb_flush_pending %d\n",
> > +		"tlb_flush_pending %d\n"
> >  #endif
> > -		mm, mm->mmap, mm->vmacache_seqnum, mm->task_size,
> > +		, mm, mm->mmap, mm->vmacache_seqnum, mm->task_size,
> 
> I'm surprised that checkpatch doesn't explode on this.  And I'm starting
> a pool on how soon somebody submits a patch to "fix" this. :)

It is all pretty godawful.  We can eliminate the tricks with the comma
separators by adding an always-there, does-nothing argument:


--- a/mm/debug.c~mm-debug-mm-introduce-vm_bug_on_mm-fix-fixpatch-fix
+++ a/mm/debug.c
@@ -197,7 +197,9 @@ void dump_mm(const struct mm_struct *mm)
 #if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION)
 		"tlb_flush_pending %d\n"
 #endif
-		, mm, mm->mmap, mm->vmacache_seqnum, mm->task_size,
+		"%s",	/* This is here to hold the comma */
+
+		mm, mm->mmap, mm->vmacache_seqnum, mm->task_size,
 #ifdef CONFIG_MMU
 		mm->get_unmapped_area,
 #endif
@@ -218,16 +220,17 @@ void dump_mm(const struct mm_struct *mm)
 #ifdef CONFIG_MEMCG
 		mm->owner,
 #endif
-		mm->exe_file
+		mm->exe_file,
 #ifdef CONFIG_MMU_NOTIFIER
-		, mm->mmu_notifier_mm
+		mm->mmu_notifier_mm,
 #endif
 #ifdef CONFIG_NUMA_BALANCING
-		, mm->numa_next_scan, mm->numa_scan_offset, mm->numa_scan_seq
+		mm->numa_next_scan, mm->numa_scan_offset, mm->numa_scan_seq,
 #endif
 #if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION)
-		, mm->tlb_flush_pending
+		mm->tlb_flush_pending,
 #endif
+		""		/* This is here to not have a comma! */
 		);
 
 		dump_flags(mm->def_flags, vmaflags_names,
_

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