* Re: [PATCH] x86/kexec: prefer _THIS_IP_ to current_text_addr [not found] <20180801210804.175176-1-ndesaulniers@google.com> @ 2018-08-08 23:06 ` Nick Desaulniers 2018-08-13 21:32 ` Nick Desaulniers 0 siblings, 1 reply; 6+ messages in thread From: Nick Desaulniers @ 2018-08-08 23:06 UTC (permalink / raw) To: Thomas Gleixner, mingo, hpa, Eric W . Biederman Cc: Kate Stewart, Greg KH, x86, kexec, LKML, Philippe Ombredanne, Nathan Chancellor bumping for review On Wed, Aug 1, 2018 at 2:08 PM Nick Desaulniers <ndesaulniers@google.com> wrote: > > As part of the effort to reduce the code duplication between _THIS_IP_ > and current_text_addr(), let's consolidate callers of > current_text_addr() to use _THIS_IP_. > > Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> > --- > arch/x86/include/asm/kexec.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h > index f327236f0fa7..86924d594ecd 100644 > --- a/arch/x86/include/asm/kexec.h > +++ b/arch/x86/include/asm/kexec.h > @@ -21,6 +21,7 @@ > #ifndef __ASSEMBLY__ > > #include <linux/string.h> > +#include <linux/kernel.h> > > #include <asm/page.h> > #include <asm/ptrace.h> > @@ -132,7 +133,7 @@ static inline void crash_setup_regs(struct pt_regs *newregs, > asm volatile("movl %%cs, %%eax;" :"=a"(newregs->cs)); > asm volatile("pushfq; popq %0" :"=m"(newregs->flags)); > #endif > - newregs->ip = (unsigned long)current_text_addr(); > + newregs->ip = _THIS_IP_; > } > } > > -- > 2.18.0.597.ga71716f1ad-goog > -- Thanks, ~Nick Desaulniers _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/kexec: prefer _THIS_IP_ to current_text_addr 2018-08-08 23:06 ` [PATCH] x86/kexec: prefer _THIS_IP_ to current_text_addr Nick Desaulniers @ 2018-08-13 21:32 ` Nick Desaulniers 2018-08-20 17:58 ` Nick Desaulniers 0 siblings, 1 reply; 6+ messages in thread From: Nick Desaulniers @ 2018-08-13 21:32 UTC (permalink / raw) To: Thomas Gleixner, mingo, hpa, Eric W . Biederman, horms Cc: Kate Stewart, Greg KH, x86, kexec, LKML, Philippe Ombredanne, Nathan Chancellor + Simon (kexec) bumping for review. On Wed, Aug 8, 2018 at 4:06 PM Nick Desaulniers <ndesaulniers@google.com> wrote: > > bumping for review > On Wed, Aug 1, 2018 at 2:08 PM Nick Desaulniers <ndesaulniers@google.com> wrote: > > > > As part of the effort to reduce the code duplication between _THIS_IP_ > > and current_text_addr(), let's consolidate callers of > > current_text_addr() to use _THIS_IP_. > > > > Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> > > --- > > arch/x86/include/asm/kexec.h | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h > > index f327236f0fa7..86924d594ecd 100644 > > --- a/arch/x86/include/asm/kexec.h > > +++ b/arch/x86/include/asm/kexec.h > > @@ -21,6 +21,7 @@ > > #ifndef __ASSEMBLY__ > > > > #include <linux/string.h> > > +#include <linux/kernel.h> > > > > #include <asm/page.h> > > #include <asm/ptrace.h> > > @@ -132,7 +133,7 @@ static inline void crash_setup_regs(struct pt_regs *newregs, > > asm volatile("movl %%cs, %%eax;" :"=a"(newregs->cs)); > > asm volatile("pushfq; popq %0" :"=m"(newregs->flags)); > > #endif > > - newregs->ip = (unsigned long)current_text_addr(); > > + newregs->ip = _THIS_IP_; > > } > > } > > > > -- > > 2.18.0.597.ga71716f1ad-goog > > > > > -- > Thanks, > ~Nick Desaulniers -- Thanks, ~Nick Desaulniers _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/kexec: prefer _THIS_IP_ to current_text_addr 2018-08-13 21:32 ` Nick Desaulniers @ 2018-08-20 17:58 ` Nick Desaulniers 2018-08-20 23:48 ` Linus Torvalds 0 siblings, 1 reply; 6+ messages in thread From: Nick Desaulniers @ 2018-08-20 17:58 UTC (permalink / raw) To: Thomas Gleixner, mingo, hpa, Eric W . Biederman, Simon Horman, Andrew Morton, Linus Torvalds Cc: Kate Stewart, Greg KH, x86, kexec, LKML, Philippe Ombredanne, Nathan Chancellor + akpm, Linus Bumping for review. On Mon, Aug 13, 2018 at 2:32 PM Nick Desaulniers <ndesaulniers@google.com> wrote: > > + Simon (kexec) > > bumping for review. > On Wed, Aug 8, 2018 at 4:06 PM Nick Desaulniers <ndesaulniers@google.com> wrote: > > > > bumping for review > > On Wed, Aug 1, 2018 at 2:08 PM Nick Desaulniers <ndesaulniers@google.com> wrote: > > > > > > As part of the effort to reduce the code duplication between _THIS_IP_ > > > and current_text_addr(), let's consolidate callers of > > > current_text_addr() to use _THIS_IP_. > > > > > > Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> > > > --- > > > arch/x86/include/asm/kexec.h | 3 ++- > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h > > > index f327236f0fa7..86924d594ecd 100644 > > > --- a/arch/x86/include/asm/kexec.h > > > +++ b/arch/x86/include/asm/kexec.h > > > @@ -21,6 +21,7 @@ > > > #ifndef __ASSEMBLY__ > > > > > > #include <linux/string.h> > > > +#include <linux/kernel.h> > > > > > > #include <asm/page.h> > > > #include <asm/ptrace.h> > > > @@ -132,7 +133,7 @@ static inline void crash_setup_regs(struct pt_regs *newregs, > > > asm volatile("movl %%cs, %%eax;" :"=a"(newregs->cs)); > > > asm volatile("pushfq; popq %0" :"=m"(newregs->flags)); > > > #endif > > > - newregs->ip = (unsigned long)current_text_addr(); > > > + newregs->ip = _THIS_IP_; > > > } > > > } > > > > > > -- > > > 2.18.0.597.ga71716f1ad-goog > > > -- Thanks, ~Nick Desaulniers _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/kexec: prefer _THIS_IP_ to current_text_addr 2018-08-20 17:58 ` Nick Desaulniers @ 2018-08-20 23:48 ` Linus Torvalds 2018-08-21 12:40 ` Eric W. Biederman 0 siblings, 1 reply; 6+ messages in thread From: Linus Torvalds @ 2018-08-20 23:48 UTC (permalink / raw) To: Nick Desaulniers Cc: Kate Stewart, Simon Horman, Philippe Ombredanne, Greg Kroah-Hartman, the arch/x86 maintainers, Kexec Mailing List, Linux Kernel Mailing List, natechancellor, Ingo Molnar, Eric W. Biederman, Peter Anvin, Andrew Morton, Thomas Gleixner On Mon, Aug 20, 2018 at 10:58 AM Nick Desaulniers <ndesaulniers@google.com> wrote: > > + akpm, Linus > > Bumping for review. Ugh. I am not personally a huge fan of this endless "fix up one at a time". Just do a patch that removes current_text_addr() entirely and be done with it, if that's what we want the end result to be. Don't bother with these small "let's remove the remaining ones one by one". Just get it over and done with. Linus _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/kexec: prefer _THIS_IP_ to current_text_addr 2018-08-20 23:48 ` Linus Torvalds @ 2018-08-21 12:40 ` Eric W. Biederman 2018-08-21 16:26 ` Nick Desaulniers 0 siblings, 1 reply; 6+ messages in thread From: Eric W. Biederman @ 2018-08-21 12:40 UTC (permalink / raw) To: Linus Torvalds Cc: Kate Stewart, Simon Horman, Philippe Ombredanne, Greg Kroah-Hartman, the arch/x86 maintainers, Nick Desaulniers, Linux Kernel Mailing List, Kexec Mailing List, natechancellor, Ingo Molnar, Peter Anvin, Thomas Gleixner, Andrew Morton Linus Torvalds <torvalds@linux-foundation.org> writes: > On Mon, Aug 20, 2018 at 10:58 AM Nick Desaulniers > <ndesaulniers@google.com> wrote: >> >> + akpm, Linus >> >> Bumping for review. > > Ugh. I am not personally a huge fan of this endless "fix up one at a time". > > Just do a patch that removes current_text_addr() entirely and be done > with it, if that's what we want the end result to be. > > Don't bother with these small "let's remove the remaining ones one by > one". Just get it over and done with. One is generic code the other is assembly but the both appear to do the same thing without unexpected complexity. That said the patch earlier in this thread has clearly never been compiled as it is using THIS_IP instead of _THIS_IP_ and there is not a define of THIS_IP in the kernel. Eric _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/kexec: prefer _THIS_IP_ to current_text_addr 2018-08-21 12:40 ` Eric W. Biederman @ 2018-08-21 16:26 ` Nick Desaulniers 0 siblings, 0 replies; 6+ messages in thread From: Nick Desaulniers @ 2018-08-21 16:26 UTC (permalink / raw) To: Eric W . Biederman, Linus Torvalds Cc: Kate Stewart, Andrew Morton, Simon Horman, Philippe Ombredanne, Greg KH, x86, kexec, LKML, mingo, hpa, Nathan Chancellor, Thomas Gleixner On Tue, Aug 21, 2018 at 5:40 AM Eric W. Biederman <ebiederm@xmission.com> wrote: > > Linus Torvalds <torvalds@linux-foundation.org> writes: > > > On Mon, Aug 20, 2018 at 10:58 AM Nick Desaulniers > > <ndesaulniers@google.com> wrote: > >> > >> + akpm, Linus > >> > >> Bumping for review. > > > > Ugh. I am not personally a huge fan of this endless "fix up one at a time". > > > > Just do a patch that removes current_text_addr() entirely and be done > > with it, if that's what we want the end result to be. > > > > Don't bother with these small "let's remove the remaining ones one by > > one". Just get it over and done with. Linus, No problem. Will send a V2 that rips off the band-aid. I explained my thoughts on the process more in https://lkml.org/lkml/2018/8/1/1689, which akpm agreed with. I was hoping that I wouldn't have to bother you with a tree-wide change, but if code review takes 3 weeks... Also, I was hoping to save the small but many clean ups as starter patches for some newbies that we're asking me how to get started contributing to the kernel, but I can find other good first bugs for them. > > One is generic code the other is assembly but the both appear to do the > same thing without unexpected complexity. > > That said the patch earlier in this thread has clearly never been > compiled as it is using THIS_IP instead of _THIS_IP_ and there is not > a define of THIS_IP in the kernel. Eric, Please triple check your email client or whatever you're using to download patches, as I suspect one of them may be stripping leading+trailing underscores. That would be quite problematic for code review or applying patch files. I've seen some text renderers treat the underscores as markdown and italicize the contained word. https://lkml.org/lkml/2018/8/1/1608 shows the underscores. -- Thanks, ~Nick Desaulniers _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-08-21 16:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180801210804.175176-1-ndesaulniers@google.com>
2018-08-08 23:06 ` [PATCH] x86/kexec: prefer _THIS_IP_ to current_text_addr Nick Desaulniers
2018-08-13 21:32 ` Nick Desaulniers
2018-08-20 17:58 ` Nick Desaulniers
2018-08-20 23:48 ` Linus Torvalds
2018-08-21 12:40 ` Eric W. Biederman
2018-08-21 16:26 ` Nick Desaulniers
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox