From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: "Chen, Yu C" <yu.c.chen@intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
"H. Peter Anvin" <hpa@zytor.com>,
Peter Zijlstra <peterz@infradead.org>,
"linux-next@vger.kernel.org" <linux-next@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Denys Vlasenko <dvlasenk@redhat.com>
Subject: Re: linux-next: build failure after merge of the tip tree
Date: Thu, 29 Sep 2016 22:50:16 +0200
Message-ID: <1816035.f2tsDuC7cs@vostro.rjw.lan> (raw)
In-Reply-To: <36DF59CE26D8EE47B0655C516E9CE6405E617A77@shsmsx102.ccr.corp.intel.com>
On Thursday, September 29, 2016 03:54:24 PM Chen, Yu C wrote:
> Hi,
>
> > -----Original Message-----
> > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net]
> > Sent: Thursday, September 29, 2016 8:25 PM
> > To: Stephen Rothwell
> > Cc: Thomas Gleixner; Ingo Molnar; H. Peter Anvin; Peter Zijlstra; linux-
> > next@vger.kernel.org; linux-kernel@vger.kernel.org; Denys Vlasenko; Chen, Yu
> > C
> > Subject: Re: linux-next: build failure after merge of the tip tree
> >
> > On Thursday, September 29, 2016 01:20:07 PM Stephen Rothwell wrote:
> > > Hi all,
> > >
> > > After merging the tip tree, today's linux-next build (x86_64
> > > allmodconfig) failed like this:
> > >
> > > arch/x86/power/hibernate_64.c: In function 'hibernation_e820_save':
> > > arch/x86/power/hibernate_64.c:236:15: error: passing argument 1 of
> > 'get_e820_md5' from incompatible pointer type [-Werror=incompatible-
> > pointer-types]
> > > get_e820_md5(&e820_saved, buf);
> > > ^
> > > arch/x86/power/hibernate_64.c:203:12: note: expected 'struct e820map *'
> > but argument is of type 'struct e820map **'
> > > static int get_e820_md5(struct e820map *map, void *buf)
> > > ^
> > > arch/x86/power/hibernate_64.c: In function 'hibernation_e820_mismatch':
> > > arch/x86/power/hibernate_64.c:249:21: error: passing argument 1 of
> > 'get_e820_md5' from incompatible pointer type [-Werror=incompatible-
> > pointer-types]
> > > ret = get_e820_md5(&e820_saved, result);
> > > ^
> > > arch/x86/power/hibernate_64.c:203:12: note: expected 'struct e820map *'
> > but argument is of type 'struct e820map **'
> > > static int get_e820_md5(struct e820map *map, void *buf)
> > > ^
> > >
> > > Caused by commit
> > >
> > > 475339684ef1 ("x86/e820: Prepare e280 code for switch to dynamic
> > > storage")
> > >
> > > interacting with commit
> > >
> > > 6f95ad2b6162 ("PM / hibernate: Verify e820 memory map by MD5
> > > digest")
> > >
> > > from the pm tree.
> > >
> > > I have applied the following merge fix patch:
> > >
> > > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > > Date: Thu, 29 Sep 2016 13:13:45 +1000
> > > Subject: [PATCH] pm/hibernate: merge fix for type of e820_saved
> > > changing
> > >
> > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > ---
> > > arch/x86/power/hibernate_64.c | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/arch/x86/power/hibernate_64.c
> > > b/arch/x86/power/hibernate_64.c index 72f2c9531b03..904048f7a9c9
> > > 100644
> > > --- a/arch/x86/power/hibernate_64.c
> > > +++ b/arch/x86/power/hibernate_64.c
> > > @@ -233,7 +233,7 @@ static int get_e820_md5(struct e820map *map, void
> > > *buf)
> > >
> > > static void hibernation_e820_save(void *buf) {
> > > - get_e820_md5(&e820_saved, buf);
> > > + get_e820_md5(e820_saved, buf);
> > > }
> > >
> > > static bool hibernation_e820_mismatch(void *buf) @@ -246,7 +246,7 @@
> > > static bool hibernation_e820_mismatch(void *buf)
> > > if (!memcmp(result, buf, MD5_DIGEST_SIZE))
> > > return false;
> > >
> > > - ret = get_e820_md5(&e820_saved, result);
> > > + ret = get_e820_md5(e820_saved, result);
> > > if (ret)
> > > return true;
> > >
> > >
> >
> > Looks good to me, thanks Stephen!
> >
> > Rafael
> Thanks for the fix!
>
> I made a double check of the patch :
> "x86/e820: Prepare e280 code for switch to dynamic storage"
> It looks like this patch has reallocate the e820 & e820_save to their actual size:
> + size = offsetof(struct e820map, map) + sizeof(struct e820entry) * e820->nr_map;
> + n = kmalloc(size, GFP_KERNEL);
>
> however the previous patch to verify the md5 hash during hibernation will
> use the original e820_map structure by sizeof(struct e820map), which might
> read invalid value after the latest patch applied. I think I need to modify the
> hibernation e820 checking patch to only generate md5 digest based on the actual
> e820_save size by sizeof(struct e820entry) * e820->nr_map.
>
> I don't have a machine in hand now, will test later and give feedback later. Thanks again!
OK, dropping the hibernation patch for now.
I'll wait for an update on top of 4.9-rc1.
Thanks,
Rafael
next prev parent reply index
Thread overview: 245+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-29 3:20 Stephen Rothwell
2016-09-29 12:25 ` Rafael J. Wysocki
2016-09-29 15:54 ` Chen, Yu C
2016-09-29 20:50 ` Rafael J. Wysocki [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-11-21 3:54 Stephen Rothwell
2019-11-21 8:36 ` Peter Zijlstra
2019-11-21 18:37 ` Alex Deucher
2019-11-18 3:11 Stephen Rothwell
2019-11-18 9:49 ` Jiri Slaby
2019-11-18 12:49 ` Borislav Petkov
2019-10-21 2:13 Stephen Rothwell
2019-10-21 5:51 ` Ingo Molnar
2019-10-21 6:37 ` Stephen Rothwell
2019-10-10 2:14 Stephen Rothwell
2019-10-10 8:02 ` Ingo Molnar
2019-10-10 11:23 ` Stephen Rothwell
2019-10-10 13:44 ` Daniel Vetter
2019-11-06 2:53 ` Stephen Rothwell
2019-11-27 23:39 ` Stephen Rothwell
2019-08-29 6:20 Stephen Rothwell
2019-08-29 7:46 ` Peter Zijlstra
2019-08-29 12:24 ` Thomas Gleixner
2019-08-29 13:04 ` Peter Zijlstra
2019-08-08 4:48 Stephen Rothwell
2019-08-01 3:38 Stephen Rothwell
2019-07-09 6:54 Stephen Rothwell
2019-07-10 0:01 ` Stephen Rothwell
2019-07-10 18:21 ` Ilya Dryomov
2019-07-10 21:38 ` Stephen Rothwell
2019-07-02 5:33 Stephen Rothwell
2019-07-02 10:28 ` David Sterba
2019-07-02 12:57 ` Stephen Rothwell
2019-07-08 6:50 ` Stephen Rothwell
2019-06-25 6:04 Stephen Rothwell
2019-06-25 6:23 ` Kalle Valo
2019-06-25 6:26 ` Thomas Gleixner
2019-06-25 6:36 ` Stephen Rothwell
2019-06-25 6:51 ` Kalle Valo
2019-06-25 6:56 ` Thomas Gleixner
2019-06-25 7:47 ` Kalle Valo
2019-07-09 0:09 ` Stephen Rothwell
2019-07-09 3:46 ` Stephen Rothwell
2018-11-06 0:43 Stephen Rothwell
2018-08-08 23:24 Stephen Rothwell
2018-08-09 9:41 ` Joerg Roedel
2018-04-03 5:41 Stephen Rothwell
2018-04-03 9:30 ` Peter Zijlstra
2018-04-03 12:39 ` David Howells
2018-04-03 12:42 ` Peter Zijlstra
2018-04-03 12:41 ` David Howells
2017-11-08 2:47 Stephen Rothwell
2017-11-08 3:01 ` Josh Poimboeuf
2017-11-08 7:35 ` Stephen Rothwell
2017-11-08 9:18 ` Ingo Molnar
2017-11-08 12:14 ` Stephen Rothwell
2017-11-09 6:18 ` Ingo Molnar
2017-11-08 13:17 ` Josh Poimboeuf
2017-11-09 3:03 ` Stephen Rothwell
2017-11-01 10:51 Stephen Rothwell
2017-11-01 14:32 ` Kees Cook
2017-06-28 3:43 Stephen Rothwell
2017-06-28 4:00 ` jeffy
2017-06-28 4:24 ` Stephen Rothwell
2017-07-03 3:01 ` Stephen Rothwell
2017-05-02 3:17 Stephen Rothwell
2017-04-24 3:32 Stephen Rothwell
2017-04-24 5:31 ` Ingo Molnar
2017-04-05 3:36 Stephen Rothwell
2017-04-05 7:24 ` Mikko Perttunen
2016-12-07 1:37 Stephen Rothwell
2016-12-07 7:45 ` Ingo Molnar
2016-12-07 8:12 ` Jiri Olsa
2016-12-07 14:49 ` Arnaldo Carvalho de Melo
2016-12-07 18:56 ` Ingo Molnar
2016-12-07 20:32 ` Stephen Rothwell
2016-11-17 3:22 Stephen Rothwell
2016-09-21 3:23 Stephen Rothwell
2016-09-21 6:44 ` Viresh Kumar
2016-07-18 8:29 Stephen Rothwell
2016-07-18 14:27 ` Paul Gortmaker
2016-07-18 5:15 Stephen Rothwell
2016-04-18 3:03 Stephen Rothwell
2016-04-14 2:14 Stephen Rothwell
2016-04-14 12:35 ` Arnaldo Carvalho de Melo
2016-04-14 12:55 ` Michael Ellerman
2016-04-14 15:08 ` Arnaldo Carvalho de Melo
2016-04-15 21:15 ` Arnaldo Carvalho de Melo
2016-04-15 21:28 ` Arnaldo Carvalho de Melo
2016-04-17 12:12 ` Jiri Olsa
2016-04-17 13:04 ` Jiri Olsa
2016-04-18 13:24 ` Arnaldo Carvalho de Melo
2016-04-18 13:28 ` Jiri Olsa
2016-03-01 1:29 Stephen Rothwell
2016-03-01 7:07 ` Ingo Molnar
2016-03-01 7:28 ` Sedat Dilek
2016-03-01 7:39 ` H. Peter Anvin
2016-03-01 8:41 ` Sedat Dilek
2016-03-01 9:45 ` Ingo Molnar
2016-03-01 9:40 ` Stephen Rothwell
2015-09-16 1:30 Stephen Rothwell
2015-09-16 4:53 ` David Miller
2015-09-16 0:12 Stephen Rothwell
2015-09-16 6:16 ` Jiri Olsa
2015-09-16 6:38 ` Jiri Olsa
2015-09-16 7:30 ` Stephen Rothwell
2015-09-16 14:17 ` Arnaldo Carvalho de Melo
2015-09-17 0:34 ` Stephen Rothwell
2015-09-30 2:56 ` Stephen Rothwell
2015-09-30 6:08 ` Jiri Olsa
2015-09-30 6:17 ` Stephen Rothwell
2015-07-28 5:33 Stephen Rothwell
2015-07-28 16:34 ` Luis R. Rodriguez
2015-07-28 18:17 ` Luis R. Rodriguez
2015-07-28 2:43 Stephen Rothwell
2015-07-28 8:41 ` Sudeep Holla
2015-07-28 9:43 ` Gregory CLEMENT
2015-07-15 1:01 Stephen Rothwell
2015-07-08 0:56 Stephen Rothwell
2015-07-08 9:40 ` Thomas Gleixner
2015-06-12 10:51 Michael Ellerman
[not found] ` <BY1PR0701MB17063C25D627AF725A9E0D46FEBB0@BY1PR0701MB1706.namprd07.prod.outlook.com>
2015-06-12 21:22 ` David Miller
2015-06-12 21:25 ` Chickles, Derek
2015-06-09 7:15 Stephen Rothwell
2015-04-07 7:18 Stephen Rothwell
2015-04-07 8:48 ` Ingo Molnar
2015-04-07 8:56 ` Daniel Borkmann
2015-04-07 9:05 ` Stephen Rothwell
2015-04-07 11:13 ` Daniel Borkmann
2015-04-07 16:18 ` Alexei Starovoitov
2015-04-07 19:54 ` Daniel Borkmann
2015-04-08 5:03 ` Stephen Rothwell
2015-04-15 1:25 ` Stephen Rothwell
2015-04-07 8:53 ` Peter Zijlstra
2015-03-30 6:13 Stephen Rothwell
2015-03-30 7:15 ` Russell King - ARM Linux
2015-03-30 8:08 ` Stephen Rothwell
2015-03-30 14:57 ` Nathan Lynch
2015-03-30 15:08 ` Russell King - ARM Linux
2015-03-30 15:24 ` Nathan Lynch
2015-04-13 23:34 ` Stephen Rothwell
2014-07-25 4:45 Stephen Rothwell
2014-07-29 23:56 ` Stephen Rothwell
2014-07-30 3:10 ` John Stultz
2014-06-04 6:05 Stephen Rothwell
2014-06-04 10:49 ` Thomas Gleixner
2014-06-04 14:46 ` Linus Torvalds
2014-06-04 16:23 ` Olof Johansson
2014-06-04 20:02 ` Thomas Gleixner
2014-05-23 7:14 Stephen Rothwell
2014-05-29 1:38 ` Stephen Rothwell
2014-04-24 3:51 Stephen Rothwell
2014-02-12 2:41 Stephen Rothwell
2014-02-12 4:48 ` Preeti U Murthy
2014-02-11 3:00 Stephen Rothwell
2014-01-16 3:58 Stephen Rothwell
2014-01-16 12:19 ` Peter Zijlstra
2014-01-16 20:46 ` Stephen Rothwell
2014-01-16 22:25 ` Peter Zijlstra
2014-01-16 22:34 ` Stephen Rothwell
2014-01-16 22:51 ` H. Peter Anvin
2014-01-17 3:45 ` Stephen Rothwell
2014-01-18 9:46 ` Mike Galbraith
2014-01-18 12:44 ` Peter Zijlstra
2014-01-18 14:06 ` Sabrina Dubroca
2014-01-18 15:21 ` Mike Galbraith
2014-01-18 19:14 ` H. Peter Anvin
2014-01-18 21:54 ` Peter Zijlstra
2014-01-20 3:51 ` Stephen Rothwell
2014-01-20 8:42 ` Sedat Dilek
2014-01-20 8:46 ` Sedat Dilek
2014-01-20 13:10 ` Stephen Rothwell
2014-01-20 15:28 ` Sedat Dilek
2014-01-20 9:17 ` Mike Galbraith
2014-01-20 9:25 ` Sedat Dilek
2014-01-20 9:48 ` Mike Galbraith
2014-01-20 4:45 ` Len Brown
2014-01-20 8:26 ` Peter Zijlstra
2014-01-20 8:56 ` H. Peter Anvin
2014-01-20 9:16 ` Peter Zijlstra
2014-01-20 9:23 ` H. Peter Anvin
2014-01-20 9:29 ` Ingo Molnar
2014-01-20 21:39 ` Len Brown
2014-01-20 21:51 ` Peter Zijlstra
2014-01-21 3:26 ` Mike Galbraith
2014-01-21 10:47 ` Ingo Molnar
2014-01-20 9:55 ` Peter Zijlstra
2014-01-20 11:00 ` H. Peter Anvin
2014-01-20 11:05 ` Peter Zijlstra
2014-01-16 20:56 ` H. Peter Anvin
2014-01-20 1:00 ` Len Brown
2014-01-20 1:07 ` H. Peter Anvin
2014-01-20 8:30 ` Peter Zijlstra
2014-01-20 10:13 ` Peter Zijlstra
2014-01-20 10:19 ` H. Peter Anvin
2014-01-20 11:06 ` Peter Zijlstra
2014-01-14 3:26 Stephen Rothwell
2014-01-14 14:14 ` Peter Zijlstra
2014-01-14 19:06 ` Mikulas Patocka
2014-01-14 20:05 ` Peter Zijlstra
2014-01-14 21:43 ` Mikulas Patocka
2014-01-14 22:03 ` Rafael J. Wysocki
2014-01-14 21:52 ` Mikulas Patocka
2014-01-14 22:18 ` Rafael J. Wysocki
2014-01-16 12:14 ` Peter Zijlstra
2013-10-28 9:24 Stephen Rothwell
2013-10-28 10:18 ` Thierry Reding
2013-10-28 10:26 ` Ingo Molnar
2013-10-29 6:00 ` Stephen Rothwell
2013-04-29 5:45 Stephen Rothwell
2013-02-14 2:30 Stephen Rothwell
2013-02-21 2:04 ` Stephen Rothwell
2013-02-02 5:04 Stephen Rothwell
2012-08-16 3:12 Stephen Rothwell
2012-08-16 19:46 ` Paul E. McKenney
2012-08-17 0:56 ` Stephen Rothwell
2012-08-17 11:50 ` Paul E. McKenney
2012-08-20 4:54 ` Stephen Rothwell
2012-08-20 15:09 ` Paul E. McKenney
2012-03-08 4:21 Stephen Rothwell
2012-03-08 18:00 ` Greg KH
2012-03-20 22:00 ` Stephen Rothwell
2012-03-20 22:32 ` Greg KH
2012-03-21 9:53 ` Alan Cox
2012-03-21 12:19 ` Alan Cox
2012-03-21 12:29 ` Stephen Rothwell
2012-02-24 3:47 Stephen Rothwell
2012-02-24 3:34 Stephen Rothwell
2011-10-05 6:25 Stephen Rothwell
2011-10-05 8:46 ` Peter Zijlstra
2011-10-11 6:15 ` Stephen Rothwell
2011-06-27 4:22 Stephen Rothwell
2011-06-28 10:55 ` Stijn Devriendt
2011-04-01 2:00 Stephen Rothwell
2011-01-31 4:42 Stephen Rothwell
2011-02-17 3:47 ` Stephen Rothwell
2011-02-17 13:18 ` Michal Marek
2011-02-17 15:02 ` Michal Marek
2011-02-17 17:11 ` Ingo Molnar
2011-02-17 22:47 ` Stephen Rothwell
2011-02-18 3:54 ` Stephen Rothwell
2010-10-19 5:13 Stephen Rothwell
2010-07-29 3:04 Stephen Rothwell
2010-05-10 4:49 Stephen Rothwell
2010-05-10 5:09 ` H. Peter Anvin
2010-03-12 4:00 Stephen Rothwell
Reply instructions:
You may reply publically 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=1816035.f2tsDuC7cs@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=dvlasenk@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=sfr@canb.auug.org.au \
--cc=tglx@linutronix.de \
--cc=yu.c.chen@intel.com \
/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
Linux-Next Archive on lore.kernel.org
Archives are clonable:
git clone --mirror https://lore.kernel.org/linux-next/0 linux-next/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 linux-next linux-next/ https://lore.kernel.org/linux-next \
linux-next@vger.kernel.org
public-inbox-index linux-next
Example config snippet for mirrors
Newsgroup available over NNTP:
nntp://nntp.lore.kernel.org/org.kernel.vger.linux-next
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git