public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Thorsten Glaser <tg@mirbsd.de>
Cc: linux-m68k@vger.kernel.org,
	Debian Kernel Team <debian-kernel@lists.debian.org>
Subject: Re: aufs vs. m68k conflict, please advice
Date: Sat, 17 Dec 2011 20:57:19 +0100	[thread overview]
Message-ID: <20111217195719.GM24496@pengutronix.de> (raw)
In-Reply-To: <Pine.BSM.4.64L.1112171856380.856@herc.mirbsd.org>

On Sat, Dec 17, 2011 at 07:00:00PM +0000, Thorsten Glaser wrote:
> Uwe Kleine-K�nig dixit:
Your mailer is broken. And it added:

	X-Message-Flag: Your mailer is broken. Get an update at http://www.washington.edu/pine/getpine/pcpine.html for free.

to your mail :-) I guess it means you not me?

> >On Sat, Dec 17, 2011 at 02:28:35PM +0000, Thorsten Glaser wrote:
> 
> >> Maybe something like this?
> […]
> >> Just an idea of the moment,
> 
> Well, it does make the thing compile with minimal effort.
> 
> >IMHO the problem is that aufs provides an incomplete definition of
> >pr_fmt. Either it should define AUFS_NAME on the commandline, too, or
> >should define pr_fmt in an aufs header (or a .c file) #included after
> >all other headers and only when AUFS_NAME is defined, too.
> 
> My initial thoughts, too.
> 
> >The ugly thing about aufs' pr_fmt being already there when ack_bad_irq
> >is defined is, that the message printed by the pr_crit suddenly looks
> >aufs specific which it clearly isn't. So it should better make sure that
> >the definition isn't available to ack_bad_irq.
> 
> True, but looking at the actual changes, it doesn’t look too aufs
> specific to me. (If the function ack_bad_irq is instantiated in
> the aufs code at all, which is debatable; a quick fgrep -r doesn’t
> find anything.)
Right, probably pr_something just shouldn't be used in headers I think.

The easiest fix would be:

-ccflags-y += -D'pr_fmt(fmt)=AUFS_NAME"\040%s:%d:%s[%d]:\040"fmt,__func__,__LINE__,current->comm,current->pid'
+ccflags-y += -D'pr_fmt(fmt)="aufs\040%s:%d:%s[%d]:\040"fmt,__func__,__LINE__,current->comm,current->pid'

But as it is ugly to have that in a Makefile, you can also try the patch
below.

Best regards
Uwe

From ad5d7fd2630feea17a1a6fffac74fdcb0505b2ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
Date: Sat, 17 Dec 2011 20:45:21 +0100
Subject: [PATCH] new patch to not leak pr_fmt to foreign headers

---
 patches/features/all/aufs3/dont-leak-pr_fmt.patch |  211 +++++++++++++++++++++
 patches/series/base                               |    1 +
 2 files changed, 212 insertions(+), 0 deletions(-)
 create mode 100644 patches/features/all/aufs3/dont-leak-pr_fmt.patch

diff --git a/patches/features/all/aufs3/dont-leak-pr_fmt.patch b/patches/features/all/aufs3/dont-leak-pr_fmt.patch
new file mode 100644
index 0000000..93e05ca
--- /dev/null
+++ b/patches/features/all/aufs3/dont-leak-pr_fmt.patch
@@ -0,0 +1,211 @@
+From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+Subject: [PATCH] don't leak incomplete definition of pr_fmt to headers
+
+This fixes a build problem on m68k, more details can be found at:
+http://lists.debian.org/debian-kernel/2011/12/msg00460.html
+---
+ fs/aufs/Makefile  |    2 --
+ fs/aufs/aufs.h    |    4 ++++
+ fs/aufs/branch.h  |    1 -
+ fs/aufs/cpup.h    |    1 -
+ fs/aufs/dbgaufs.h |    1 -
+ fs/aufs/debug.h   |    1 -
+ fs/aufs/dentry.h  |    1 -
+ fs/aufs/dir.h     |    1 -
+ fs/aufs/dynop.h   |    1 -
+ fs/aufs/file.h    |    1 -
+ fs/aufs/fstype.h  |    1 -
+ fs/aufs/inode.h   |    1 -
+ fs/aufs/opts.h    |    1 -
+ fs/aufs/rdu.c     |    1 -
+ fs/aufs/super.h   |    1 -
+ fs/aufs/sysaufs.h |    1 -
+ fs/aufs/whout.h   |    1 -
+ fs/aufs/wkq.h     |    1 -
+ 18 files changed, 4 insertions(+), 18 deletions(-)
+
+--- source_amd64_none.orig/fs/aufs/Makefile
++++ source_amd64_none/fs/aufs/Makefile
+@@ -8,8 +8,6 @@
+ # cf. include/linux/kernel.h
+ # enable pr_debug
+ ccflags-y += -DDEBUG
+-# sparse doesn't allow spaces
+-ccflags-y += -D'pr_fmt(fmt)=AUFS_NAME"\040%s:%d:%s[%d]:\040"fmt,__func__,__LINE__,current->comm,current->pid'
+ 
+ obj-$(CONFIG_AUFS_FS) += aufs.o
+ aufs-y := module.o sbinfo.o super.o branch.o xino.o sysaufs.o opts.o \
+--- source_amd64_none.orig/fs/aufs/aufs.h
++++ source_amd64_none/fs/aufs/aufs.h
+@@ -33,6 +33,11 @@
+ #define AuStubInt0(name, ...) \
+ 	AuStub(int, name, return 0, __VA_ARGS__)
+ 
++#include <linux/aufs_type.h>
++
++#undef pr_fmt
++#define pr_fmt(fmt) AUFS_NAME " %s:%d:%s[%d]: " fmt, __func__, __LINE__, current->comm, current->pid
++
+ #include "debug.h"
+ 
+ #include "branch.h"
+--- source_amd64_none.orig/fs/aufs/debug.h
++++ source_amd64_none/fs/aufs/debug.h
+@@ -35,7 +35,6 @@
+ #include <linux/delay.h>
+ /* #include <linux/kd.h> */
+ #include <linux/sysrq.h>
+-#include <linux/aufs_type.h>
+ 
+ #include <asm/system.h>
+ 
+--- source_amd64_none.orig/fs/aufs/file.h
++++ source_amd64_none/fs/aufs/file.h
+@@ -28,7 +28,6 @@
+ #include <linux/file.h>
+ #include <linux/fs.h>
+ #include <linux/poll.h>
+-#include <linux/aufs_type.h>
+ #include "rwsem.h"
+ 
+ struct au_branch;
+--- source_amd64_none.orig/fs/aufs/inode.h
++++ source_amd64_none/fs/aufs/inode.h
+@@ -27,7 +27,6 @@
+ 
+ #include <linux/fs.h>
+ #include <linux/fsnotify.h>
+-#include <linux/aufs_type.h>
+ #include "rwsem.h"
+ 
+ struct vfsmount;
+--- source_amd64_none.orig/fs/aufs/rdu.c
++++ source_amd64_none/fs/aufs/rdu.c
+@@ -24,7 +24,6 @@
+ #include <linux/fs_stack.h>
+ #include <linux/security.h>
+ #include <linux/uaccess.h>
+-#include <linux/aufs_type.h>
+ #include "aufs.h"
+ 
+ /* bits for struct aufs_rdu.flags */
+--- source_amd64_none.orig/fs/aufs/branch.h
++++ source_amd64_none/fs/aufs/branch.h
+@@ -27,7 +27,6 @@
+ 
+ #include <linux/fs.h>
+ #include <linux/mount.h>
+-#include <linux/aufs_type.h>
+ #include "dynop.h"
+ #include "rwsem.h"
+ #include "super.h"
+--- source_amd64_none.orig/fs/aufs/cpup.h
++++ source_amd64_none/fs/aufs/cpup.h
+@@ -27,7 +27,6 @@
+ 
+ #include <linux/path.h>
+ #include <linux/time.h>
+-#include <linux/aufs_type.h>
+ 
+ struct inode;
+ struct file;
+--- source_amd64_none.orig/fs/aufs/dbgaufs.h
++++ source_amd64_none/fs/aufs/dbgaufs.h
+@@ -26,7 +26,6 @@
+ #ifdef __KERNEL__
+ 
+ #include <linux/init.h>
+-#include <linux/aufs_type.h>
+ 
+ struct super_block;
+ struct au_sbinfo;
+--- source_amd64_none.orig/fs/aufs/dentry.h
++++ source_amd64_none/fs/aufs/dentry.h
+@@ -26,7 +26,6 @@
+ #ifdef __KERNEL__
+ 
+ #include <linux/dcache.h>
+-#include <linux/aufs_type.h>
+ #include "rwsem.h"
+ 
+ struct au_hdentry {
+--- source_amd64_none.orig/fs/aufs/dir.h
++++ source_amd64_none/fs/aufs/dir.h
+@@ -26,7 +26,6 @@
+ #ifdef __KERNEL__
+ 
+ #include <linux/fs.h>
+-#include <linux/aufs_type.h>
+ 
+ /* ---------------------------------------------------------------------- */
+ 
+--- source_amd64_none.orig/fs/aufs/dynop.h
++++ source_amd64_none/fs/aufs/dynop.h
+@@ -28,7 +28,6 @@
+ #include <linux/fs.h>
+ #include <linux/mm.h>
+ #include <linux/rcupdate.h>
+-#include <linux/aufs_type.h>
+ #include "inode.h"
+ 
+ enum {AuDy_AOP, AuDyLast};
+--- source_amd64_none.orig/fs/aufs/fstype.h
++++ source_amd64_none/fs/aufs/fstype.h
+@@ -28,7 +28,6 @@
+ #include <linux/fs.h>
+ #include <linux/magic.h>
+ #include <linux/romfs_fs.h>
+-#include <linux/aufs_type.h>
+ 
+ static inline int au_test_aufs(struct super_block *sb)
+ {
+--- source_amd64_none.orig/fs/aufs/opts.h
++++ source_amd64_none/fs/aufs/opts.h
+@@ -26,7 +26,6 @@
+ #ifdef __KERNEL__
+ 
+ #include <linux/path.h>
+-#include <linux/aufs_type.h>
+ 
+ struct file;
+ struct super_block;
+--- source_amd64_none.orig/fs/aufs/super.h
++++ source_amd64_none/fs/aufs/super.h
+@@ -26,7 +26,6 @@
+ #ifdef __KERNEL__
+ 
+ #include <linux/fs.h>
+-#include <linux/aufs_type.h>
+ #include "rwsem.h"
+ #include "spl.h"
+ #include "wkq.h"
+--- source_amd64_none.orig/fs/aufs/sysaufs.h
++++ source_amd64_none/fs/aufs/sysaufs.h
+@@ -26,7 +26,6 @@
+ #ifdef __KERNEL__
+ 
+ #include <linux/sysfs.h>
+-#include <linux/aufs_type.h>
+ #include "module.h"
+ 
+ struct super_block;
+--- source_amd64_none.orig/fs/aufs/whout.h
++++ source_amd64_none/fs/aufs/whout.h
+@@ -25,7 +25,6 @@
+ 
+ #ifdef __KERNEL__
+ 
+-#include <linux/aufs_type.h>
+ #include "dir.h"
+ 
+ /* whout.c */
+--- source_amd64_none.orig/fs/aufs/wkq.h
++++ source_amd64_none/fs/aufs/wkq.h
+@@ -28,7 +28,6 @@
+ 
+ #include <linux/sched.h>
+ #include <linux/wait.h>
+-#include <linux/aufs_type.h>
+ 
+ struct super_block;
+ 
diff --git a/patches/series/base b/patches/series/base
index dc8b037..98916b1 100644
--- a/patches/series/base
+++ b/patches/series/base
@@ -14,6 +14,7 @@
 + features/all/aufs3/aufs3-add.patch
 # mark as staging/crap
 + features/all/aufs3/mark-as-staging.patch
++ features/all/aufs3/dont-leak-pr_fmt.patch
 
 + bugfix/ia64/hardcode-arch-script-output.patch
 + bugfix/mips/disable-advansys.patch
-- 
1.7.7.3


-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2011-12-17 19:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-16 14:42 aufs vs. m68k conflict, please advice Thorsten Glaser
2011-12-16 16:48 ` Ben Hutchings
2011-12-16 17:15   ` Thorsten Glaser
2011-12-17 14:28   ` Thorsten Glaser
2011-12-17 16:24     ` Thorsten Glaser
2011-12-17 16:29     ` Ben Hutchings
2011-12-17 18:49     ` Uwe Kleine-König
2011-12-17 19:00       ` Thorsten Glaser
2011-12-17 19:57         ` Uwe Kleine-König [this message]
2011-12-17 20:09 ` [PATCH] m68k/irq: don't use pr_crit in an header Uwe Kleine-König
2011-12-17 21:19   ` Thorsten Glaser
2011-12-18 10:32   ` Geert Uytterhoeven
2011-12-18 10:42     ` Uwe Kleine-König
2011-12-18 17:06       ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111217195719.GM24496@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=debian-kernel@lists.debian.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=tg@mirbsd.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox