Re: [PATCH] objtool: Fix GCC 8 cold function processing without -freorder-functions

2018-06-27 Thread Josh Poimboeuf
On Wed, Jun 27, 2018 at 10:35:03AM +0100, Allan Xavier wrote: > Looks good overall, just one comment. > > On 26/06/18 19:44, Josh Poimboeuf wrote: > > + /* > > +* Unfortunately, -fnoreorder-functions puts the child > > +* inside the

Re: [PATCH] objtool: Fix GCC 8 cold function processing without -freorder-functions

2018-06-27 Thread Josh Poimboeuf
On Wed, Jun 27, 2018 at 10:35:03AM +0100, Allan Xavier wrote: > Looks good overall, just one comment. > > On 26/06/18 19:44, Josh Poimboeuf wrote: > > + /* > > +* Unfortunately, -fnoreorder-functions puts the child > > +* inside the

Re: [PATCH] objtool: Fix GCC 8 cold function processing without -freorder-functions

2018-06-27 Thread Allan Xavier
Looks good overall, just one comment. On 26/06/18 19:44, Josh Poimboeuf wrote: > + /* > + * Unfortunately, -fnoreorder-functions puts the child > + * inside the parent. Remove the overlap so we can > + * have sane

Re: [PATCH] objtool: Fix GCC 8 cold function processing without -freorder-functions

2018-06-27 Thread Allan Xavier
Looks good overall, just one comment. On 26/06/18 19:44, Josh Poimboeuf wrote: > + /* > + * Unfortunately, -fnoreorder-functions puts the child > + * inside the parent. Remove the overlap so we can > + * have sane

Re: [PATCH] objtool: Fix GCC 8 cold function processing without -freorder-functions

2018-06-26 Thread Josh Poimboeuf
On Tue, Jun 26, 2018 at 09:43:27PM +0200, Peter Zijlstra wrote: > On Tue, Jun 26, 2018 at 01:44:05PM -0500, Josh Poimboeuf wrote: > > On Tue, Jun 26, 2018 at 07:31:18PM +0100, Allan Xavier wrote: > > > > Is there a particular concern you're trying to address by having the > > > logic there > > >

Re: [PATCH] objtool: Fix GCC 8 cold function processing without -freorder-functions

2018-06-26 Thread Josh Poimboeuf
On Tue, Jun 26, 2018 at 09:43:27PM +0200, Peter Zijlstra wrote: > On Tue, Jun 26, 2018 at 01:44:05PM -0500, Josh Poimboeuf wrote: > > On Tue, Jun 26, 2018 at 07:31:18PM +0100, Allan Xavier wrote: > > > > Is there a particular concern you're trying to address by having the > > > logic there > > >

Re: [PATCH] objtool: Fix GCC 8 cold function processing without -freorder-functions

2018-06-26 Thread Peter Zijlstra
On Tue, Jun 26, 2018 at 01:44:05PM -0500, Josh Poimboeuf wrote: > On Tue, Jun 26, 2018 at 07:31:18PM +0100, Allan Xavier wrote: > > Is there a particular concern you're trying to address by having the logic > > there > > instead? > > Thanks for the patch and the excellent problem description.

Re: [PATCH] objtool: Fix GCC 8 cold function processing without -freorder-functions

2018-06-26 Thread Peter Zijlstra
On Tue, Jun 26, 2018 at 01:44:05PM -0500, Josh Poimboeuf wrote: > On Tue, Jun 26, 2018 at 07:31:18PM +0100, Allan Xavier wrote: > > Is there a particular concern you're trying to address by having the logic > > there > > instead? > > Thanks for the patch and the excellent problem description.

Re: [PATCH] objtool: Fix GCC 8 cold function processing without -freorder-functions

2018-06-26 Thread Josh Poimboeuf
On Tue, Jun 26, 2018 at 07:31:18PM +0100, Allan Xavier wrote: > Hi Peter, > > On 26/06/18 17:43, Peter Zijlstra wrote: > > On Tue, Jun 26, 2018 at 05:20:45PM +0100, Allan Xavier wrote: > >> 0500 g F .text 0034 nmi_panic > >> 0528 l F .text

Re: [PATCH] objtool: Fix GCC 8 cold function processing without -freorder-functions

2018-06-26 Thread Josh Poimboeuf
On Tue, Jun 26, 2018 at 07:31:18PM +0100, Allan Xavier wrote: > Hi Peter, > > On 26/06/18 17:43, Peter Zijlstra wrote: > > On Tue, Jun 26, 2018 at 05:20:45PM +0100, Allan Xavier wrote: > >> 0500 g F .text 0034 nmi_panic > >> 0528 l F .text

Re: [PATCH] objtool: Fix GCC 8 cold function processing without -freorder-functions

2018-06-26 Thread Allan Xavier
Hi Peter, On 26/06/18 17:43, Peter Zijlstra wrote: > On Tue, Jun 26, 2018 at 05:20:45PM +0100, Allan Xavier wrote: >> 0500 g F .text 0034 nmi_panic >> 0528 l F .text 000c nmi_panic.cold.7 >> >> This doesn't happen with -freorder-functions

Re: [PATCH] objtool: Fix GCC 8 cold function processing without -freorder-functions

2018-06-26 Thread Allan Xavier
Hi Peter, On 26/06/18 17:43, Peter Zijlstra wrote: > On Tue, Jun 26, 2018 at 05:20:45PM +0100, Allan Xavier wrote: >> 0500 g F .text 0034 nmi_panic >> 0528 l F .text 000c nmi_panic.cold.7 >> >> This doesn't happen with -freorder-functions

Re: [PATCH] objtool: Fix GCC 8 cold function processing without -freorder-functions

2018-06-26 Thread Peter Zijlstra
On Tue, Jun 26, 2018 at 05:20:45PM +0100, Allan Xavier wrote: > 0500 g F .text 0034 nmi_panic > 0528 l F .text 000c nmi_panic.cold.7 > > This doesn't happen with -freorder-functions in the first example as the > symbols don't overlap.

Re: [PATCH] objtool: Fix GCC 8 cold function processing without -freorder-functions

2018-06-26 Thread Peter Zijlstra
On Tue, Jun 26, 2018 at 05:20:45PM +0100, Allan Xavier wrote: > 0500 g F .text 0034 nmi_panic > 0528 l F .text 000c nmi_panic.cold.7 > > This doesn't happen with -freorder-functions in the first example as the > symbols don't overlap.

[PATCH] objtool: Fix GCC 8 cold function processing without -freorder-functions

2018-06-26 Thread Allan Xavier
As of commit 13810435b9a7 ("objtool: Support GCC 8's cold subfunctions") objtool can get stuck in an infinite loop when processing cold functions compiled without -freorder-functions. Using v4.17.2 and "gcc version 8.1.1 20180502 (Red Hat 8.1.1-1) (GCC)" from Fedora, this can be reproduced

[PATCH] objtool: Fix GCC 8 cold function processing without -freorder-functions

2018-06-26 Thread Allan Xavier
As of commit 13810435b9a7 ("objtool: Support GCC 8's cold subfunctions") objtool can get stuck in an infinite loop when processing cold functions compiled without -freorder-functions. Using v4.17.2 and "gcc version 8.1.1 20180502 (Red Hat 8.1.1-1) (GCC)" from Fedora, this can be reproduced