All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Kees Cook <keescook@google.com>,
	Linux-Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: linux-next: manual merge of the akpm-current tree with the kspp tree
Date: Mon, 15 Jan 2018 13:41:10 +0100	[thread overview]
Message-ID: <CAK8P3a2kjx2x=iC7ei9q36A9TooiZR+d4QTQkfJL6ys7XLtwiQ@mail.gmail.com> (raw)
In-Reply-To: <20180115155710.36e146ab@canb.auug.org.au>

On Mon, Jan 15, 2018 at 5:57 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Andrew,
>
> Today's linux-next merge of the akpm-current tree got a conflict in:
>
>   arch/cris/include/arch-v10/arch/bug.h
>
> between commit:
>
>   c8133e59edb0 ("cris: Mark end of BUG() implementation as unreachable")
>
> from the kspp tree and commit:
>
>   c5a1e183a75a ("bug.h: work around GCC PR82365 in BUG()")
>
> from the akpm-current tree.
>
> I fixed it up (I just used the akpm-current tree version) and can
> carry the fix as necessary. This is now fixed as far as linux-next is
> concerned, but any non trivial conflicts should be mentioned to your
> upstream maintainer when your tree is submitted for merging.  You may
> also want to consider cooperating with the maintainer of the conflicting
> tree to minimise any particularly complex conflicts.

Kees,

it seems you ran into the same issue that I did, and got the same fix
for the first BUG() variant, but I think my version for the second one
is slightly better:

 /* This just causes an oops. */
-#define BUG() (*(int *)0 = 0)
+#define BUG()                                                          \
+do {                                                                   \
+       barrier_before_unreachable();                                   \
+       __builtin_trap();                                               \
+} while (0)

compared to yours:

 /* This just causes an oops. */
-#define BUG() (*(int *)0 = 0)
+#define BUG()                                                          \
+do {                                                                   \
+       (*(int *)0 = 0);                                                \
+       do {} while (1);                                                \
+       unreachable();                                                  \
+} while (0)

which relies on a NULL pointer dereference to trap but otherwise
does the same thing. The easiest solution for the conflict seems to
be that you just drop your patch.

       Arnd

  reply	other threads:[~2018-01-15 14:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15  4:57 linux-next: manual merge of the akpm-current tree with the kspp tree Stephen Rothwell
2018-01-15 12:41 ` Arnd Bergmann [this message]
2018-01-15 20:07   ` Kees Cook
  -- strict thread matches above, loose matches on Subject: below --
2022-03-03  8:15 Stephen Rothwell
2021-06-25 10:37 Stephen Rothwell
2020-11-25 10:05 Stephen Rothwell
2019-02-13  6:03 Stephen Rothwell
2017-11-02  8:05 Stephen Rothwell
2017-06-20  5:18 Stephen Rothwell
2017-06-20  5:15 Stephen Rothwell
2017-07-03  1:31 ` Stephen Rothwell
2017-02-17  4:53 Stephen Rothwell
2016-07-27  6:23 Stephen Rothwell
2016-06-22  4:58 Stephen Rothwell

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='CAK8P3a2kjx2x=iC7ei9q36A9TooiZR+d4QTQkfJL6ys7XLtwiQ@mail.gmail.com' \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=keescook@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.