Re: [PATCH v1 0/2] kexec: Remove "weak" annotations from headers

2018-04-17 Thread Baoquan He
On 04/17/18 at 09:07am, Bjorn Helgaas wrote:
> On Fri, Apr 13, 2018 at 05:29:08PM +0800, Baoquan He wrote:
> > Hi Bjorn,
> > 
> > There are changes I have made to solve 5-level conflict with
> > kexec/kdump and also interface unification task, they will involve x86
> > 64 only changes on these functions, I don't think we need remove them if
> > without any obvious impact or error reported.
> 
> Removing the weak attribute from the declaration in the header file
> does not prevent you from defining a weak function later in the .c
> file.

OK, sounds good to me. Then I have no concern to this, thanks.
Will see if other people have comments.

Thanks
Baoquan


Re: [PATCH v1 0/2] kexec: Remove "weak" annotations from headers

2018-04-17 Thread Baoquan He
On 04/17/18 at 09:07am, Bjorn Helgaas wrote:
> On Fri, Apr 13, 2018 at 05:29:08PM +0800, Baoquan He wrote:
> > Hi Bjorn,
> > 
> > There are changes I have made to solve 5-level conflict with
> > kexec/kdump and also interface unification task, they will involve x86
> > 64 only changes on these functions, I don't think we need remove them if
> > without any obvious impact or error reported.
> 
> Removing the weak attribute from the declaration in the header file
> does not prevent you from defining a weak function later in the .c
> file.

OK, sounds good to me. Then I have no concern to this, thanks.
Will see if other people have comments.

Thanks
Baoquan


Re: [PATCH v1 0/2] kexec: Remove "weak" annotations from headers

2018-04-17 Thread Bjorn Helgaas
On Fri, Apr 13, 2018 at 11:08:20AM +0200, Philipp Rudo wrote:
> Hi Bjorn,
> 
> in recent patches AKASHI [1] and I [2] made some changes to the declarations
> you are touching and already removed some of the weak statements. The patches
> got accepted on linux-next and will (hopefully) be pulled for v4.17. So you
> should prepare for some merge conflicts. Nevertheless three weak statements
> still remain (arch_kexec_walk_mem & arch_kexec_apply_relocations*) so your
> patch still makes totally sense.

Thanks, I see those changes in v4.17-rc1.  I'll update my patches and
post a v2.


Re: [PATCH v1 0/2] kexec: Remove "weak" annotations from headers

2018-04-17 Thread Bjorn Helgaas
On Fri, Apr 13, 2018 at 11:08:20AM +0200, Philipp Rudo wrote:
> Hi Bjorn,
> 
> in recent patches AKASHI [1] and I [2] made some changes to the declarations
> you are touching and already removed some of the weak statements. The patches
> got accepted on linux-next and will (hopefully) be pulled for v4.17. So you
> should prepare for some merge conflicts. Nevertheless three weak statements
> still remain (arch_kexec_walk_mem & arch_kexec_apply_relocations*) so your
> patch still makes totally sense.

Thanks, I see those changes in v4.17-rc1.  I'll update my patches and
post a v2.


Re: [PATCH v1 0/2] kexec: Remove "weak" annotations from headers

2018-04-17 Thread Bjorn Helgaas
On Fri, Apr 13, 2018 at 05:29:08PM +0800, Baoquan He wrote:
> Hi Bjorn,
> 
> There are changes I have made to solve 5-level conflict with
> kexec/kdump and also interface unification task, they will involve x86
> 64 only changes on these functions, I don't think we need remove them if
> without any obvious impact or error reported.

Removing the weak attribute from the declaration in the header file
does not prevent you from defining a weak function later in the .c
file.

We should remove the weak attribute from the header file declaration
because it can lead to non-obvious errors, e.g., calling the wrong
version of the function.  There's no build-time or run-time indication
that this happens, so it's a real trap.

Bjorn


Re: [PATCH v1 0/2] kexec: Remove "weak" annotations from headers

2018-04-17 Thread Bjorn Helgaas
On Fri, Apr 13, 2018 at 05:29:08PM +0800, Baoquan He wrote:
> Hi Bjorn,
> 
> There are changes I have made to solve 5-level conflict with
> kexec/kdump and also interface unification task, they will involve x86
> 64 only changes on these functions, I don't think we need remove them if
> without any obvious impact or error reported.

Removing the weak attribute from the declaration in the header file
does not prevent you from defining a weak function later in the .c
file.

We should remove the weak attribute from the header file declaration
because it can lead to non-obvious errors, e.g., calling the wrong
version of the function.  There's no build-time or run-time indication
that this happens, so it's a real trap.

Bjorn


Re: [PATCH v1 0/2] kexec: Remove "weak" annotations from headers

2018-04-13 Thread Baoquan He
Hi Bjorn,

There are changes I have made to solve 5-level conflict with
kexec/kdump and also interface unification task, they will involve x86
64 only changes on these functions, I don't think we need remove them if
without any obvious impact or error reported.

Thanks
Baoquan

On 04/13/18 at 11:08am, Philipp Rudo wrote:
> Hi Bjorn,
> 
> in recent patches AKASHI [1] and I [2] made some changes to the declarations
> you are touching and already removed some of the weak statements. The patches
> got accepted on linux-next and will (hopefully) be pulled for v4.17. So you
> should prepare for some merge conflicts. Nevertheless three weak statements
> still remain (arch_kexec_walk_mem & arch_kexec_apply_relocations*) so your
> patch still makes totally sense.
> 
> Thanks
> Philipp
> 
> [1] https://lkml.org/lkml/2018/3/6/201
> [2] https://lkml.org/lkml/2018/3/21/278
> 
> On Thu, 12 Apr 2018 13:23:29 -0500
> Bjorn Helgaas  wrote:
> 
> > "Weak" annotations in header files are error-prone because they make
> > every definition weak.  Remove them from include/linux/kexec.h.
> > 
> > These were introduced in two separate commits, so this is in two
> > patches so they can be easily backported to stable kernels (some of
> > them date back to v4.3 and one only goes back to v4.10).
> > 
> > ---
> > 
> > Bjorn Helgaas (2):
> >   kexec: Remove "weak" from kexec_file function declarations
> >   kexec: Remove "weak" from arch_kexec_walk_mem() declaration
> > 
> > 
> >  include/linux/kexec.h |   24 
> >  1 file changed, 12 insertions(+), 12 deletions(-)
> > 
> > ___
> > kexec mailing list
> > ke...@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/kexec
> > 
> 
> 
> ___
> kexec mailing list
> ke...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec


Re: [PATCH v1 0/2] kexec: Remove "weak" annotations from headers

2018-04-13 Thread Baoquan He
Hi Bjorn,

There are changes I have made to solve 5-level conflict with
kexec/kdump and also interface unification task, they will involve x86
64 only changes on these functions, I don't think we need remove them if
without any obvious impact or error reported.

Thanks
Baoquan

On 04/13/18 at 11:08am, Philipp Rudo wrote:
> Hi Bjorn,
> 
> in recent patches AKASHI [1] and I [2] made some changes to the declarations
> you are touching and already removed some of the weak statements. The patches
> got accepted on linux-next and will (hopefully) be pulled for v4.17. So you
> should prepare for some merge conflicts. Nevertheless three weak statements
> still remain (arch_kexec_walk_mem & arch_kexec_apply_relocations*) so your
> patch still makes totally sense.
> 
> Thanks
> Philipp
> 
> [1] https://lkml.org/lkml/2018/3/6/201
> [2] https://lkml.org/lkml/2018/3/21/278
> 
> On Thu, 12 Apr 2018 13:23:29 -0500
> Bjorn Helgaas  wrote:
> 
> > "Weak" annotations in header files are error-prone because they make
> > every definition weak.  Remove them from include/linux/kexec.h.
> > 
> > These were introduced in two separate commits, so this is in two
> > patches so they can be easily backported to stable kernels (some of
> > them date back to v4.3 and one only goes back to v4.10).
> > 
> > ---
> > 
> > Bjorn Helgaas (2):
> >   kexec: Remove "weak" from kexec_file function declarations
> >   kexec: Remove "weak" from arch_kexec_walk_mem() declaration
> > 
> > 
> >  include/linux/kexec.h |   24 
> >  1 file changed, 12 insertions(+), 12 deletions(-)
> > 
> > ___
> > kexec mailing list
> > ke...@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/kexec
> > 
> 
> 
> ___
> kexec mailing list
> ke...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec


Re: [PATCH v1 0/2] kexec: Remove "weak" annotations from headers

2018-04-13 Thread Philipp Rudo
Hi Bjorn,

in recent patches AKASHI [1] and I [2] made some changes to the declarations
you are touching and already removed some of the weak statements. The patches
got accepted on linux-next and will (hopefully) be pulled for v4.17. So you
should prepare for some merge conflicts. Nevertheless three weak statements
still remain (arch_kexec_walk_mem & arch_kexec_apply_relocations*) so your
patch still makes totally sense.

Thanks
Philipp

[1] https://lkml.org/lkml/2018/3/6/201
[2] https://lkml.org/lkml/2018/3/21/278

On Thu, 12 Apr 2018 13:23:29 -0500
Bjorn Helgaas  wrote:

> "Weak" annotations in header files are error-prone because they make
> every definition weak.  Remove them from include/linux/kexec.h.
> 
> These were introduced in two separate commits, so this is in two
> patches so they can be easily backported to stable kernels (some of
> them date back to v4.3 and one only goes back to v4.10).
> 
> ---
> 
> Bjorn Helgaas (2):
>   kexec: Remove "weak" from kexec_file function declarations
>   kexec: Remove "weak" from arch_kexec_walk_mem() declaration
> 
> 
>  include/linux/kexec.h |   24 
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> ___
> kexec mailing list
> ke...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
> 



Re: [PATCH v1 0/2] kexec: Remove "weak" annotations from headers

2018-04-13 Thread Philipp Rudo
Hi Bjorn,

in recent patches AKASHI [1] and I [2] made some changes to the declarations
you are touching and already removed some of the weak statements. The patches
got accepted on linux-next and will (hopefully) be pulled for v4.17. So you
should prepare for some merge conflicts. Nevertheless three weak statements
still remain (arch_kexec_walk_mem & arch_kexec_apply_relocations*) so your
patch still makes totally sense.

Thanks
Philipp

[1] https://lkml.org/lkml/2018/3/6/201
[2] https://lkml.org/lkml/2018/3/21/278

On Thu, 12 Apr 2018 13:23:29 -0500
Bjorn Helgaas  wrote:

> "Weak" annotations in header files are error-prone because they make
> every definition weak.  Remove them from include/linux/kexec.h.
> 
> These were introduced in two separate commits, so this is in two
> patches so they can be easily backported to stable kernels (some of
> them date back to v4.3 and one only goes back to v4.10).
> 
> ---
> 
> Bjorn Helgaas (2):
>   kexec: Remove "weak" from kexec_file function declarations
>   kexec: Remove "weak" from arch_kexec_walk_mem() declaration
> 
> 
>  include/linux/kexec.h |   24 
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> ___
> kexec mailing list
> ke...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
>