mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Lucas Stach <l.stach@pengutronix.de>
Subject: Re: [ptxdist] [APPLIED] dtc: fix build with GCC11
Date: Thu, 27 May 2021 08:45:22 +0200	[thread overview]
Message-ID: <20210527064522.4039152-1-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <20210503103743.31995-1-l.stach@pengutronix.de>

Thanks, applied as c9de1f5357809c4d00396ebaf2f1ba3de1258269.

Michael

[sent from post-receive hook]

On Thu, 27 May 2021 08:45:21 +0200, Lucas Stach <l.stach@pengutronix.de> wrote:
> Pick patch from upstream to fix warning with GCC11.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Message-Id: <20210503103743.31995-1-l.stach@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/patches/dtc-v1.6.0/0001-fdtdump-Fix-gcc11-warning.patch b/patches/dtc-v1.6.0/0001-fdtdump-Fix-gcc11-warning.patch
> new file mode 100644
> index 000000000000..052419940a15
> --- /dev/null
> +++ b/patches/dtc-v1.6.0/0001-fdtdump-Fix-gcc11-warning.patch
> @@ -0,0 +1,30 @@
> +From: David Gibson <david@gibson.dropbear.id.au>
> +Date: Wed, 6 Jan 2021 14:52:26 +1100
> +Subject: [PATCH] fdtdump: Fix gcc11 warning
> +
> +In one place, fdtdump abuses fdt_set_magic(), passing it just a small char
> +array instead of the full fdt header it expects.  That's relying on the
> +fact that in fact fdt_set_magic() will only actually access the first 4
> +bytes of the buffer.
> +
> +This trips a new warning in GCC 11 - and it's entirely possible it was
> +always UB.  So, don't do that.
> +
> +Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> +---
> + fdtdump.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/fdtdump.c b/fdtdump.c
> +index 9613befede71..d9fb374a59be 100644
> +--- a/fdtdump.c
> ++++ b/fdtdump.c
> +@@ -217,7 +217,7 @@ int main(int argc, char *argv[])
> + 		char *p = buf;
> + 		char *endp = buf + len;
> + 
> +-		fdt_set_magic(smagic, FDT_MAGIC);
> ++		fdt32_st(smagic, FDT_MAGIC);
> + 
> + 		/* poor man's memmem */
> + 		while ((endp - p) >= FDT_MAGIC_SIZE) {
> diff --git a/patches/dtc-v1.6.0/series b/patches/dtc-v1.6.0/series
> new file mode 100644
> index 000000000000..a7e9d0319ba0
> --- /dev/null
> +++ b/patches/dtc-v1.6.0/series
> @@ -0,0 +1,4 @@
> +# generated by git-ptx-patches
> +#tag:base --start-number 1
> +0001-fdtdump-Fix-gcc11-warning.patch
> +# cb5c26c7ab3ae2082ecff7af4de4e8c5  - git-ptx-patches magic

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


      parent reply	other threads:[~2021-05-27  6:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-03 10:37 [ptxdist] [PATCH v2 1/5] " Lucas Stach
2021-05-03 10:37 ` [ptxdist] [PATCH v2 2/5] nspr: version bump 4.26 -> 4.30 Lucas Stach
2021-05-27  6:45   ` [ptxdist] [APPLIED] " Michael Olbrich
2021-05-03 10:37 ` [ptxdist] [PATCH v2 3/5] host-nss: disable array-parameter warning Lucas Stach
2021-05-27  6:45   ` [ptxdist] [APPLIED] " Michael Olbrich
2021-05-03 10:37 ` [ptxdist] [PATCH v2 4/5] host-fakeroot: version bump 1.25.1 -> 1.25.3 Lucas Stach
2021-05-27  6:45   ` [ptxdist] [APPLIED] " Michael Olbrich
2021-05-03 10:37 ` [ptxdist] [PATCH v2 5/5] qt5: fix build with GCC11 Lucas Stach
2021-05-27  6:45   ` [ptxdist] [APPLIED] " Michael Olbrich
2021-05-27  6:45 ` Michael Olbrich [this message]

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=20210527064522.4039152-1-m.olbrich@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=l.stach@pengutronix.de \
    --cc=ptxdist@pengutronix.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