From: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
To: Torsten Duwe <duwe@lst.de>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
Petr Mladek <pmladek@suse.com>, Jessica Yu <jeyu@redhat.com>,
Jiri Kosina <jkosina@suse.cz>,
linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>,
live-patching@vger.kernel.org, Miroslav Benes <mbenes@suse.cz>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v8 8/8] livepatch: Detect offset for the ftrace location during build
Date: Wed, 24 Feb 2016 13:21:04 +0530 [thread overview]
Message-ID: <20160224075103.GA21618@linux.vnet.ibm.com> (raw)
In-Reply-To: <20160223170017.GB21932@lst.de>
* Torsten Duwe <duwe@lst.de> [2016-02-23 18:00:17]:
> On Wed, Feb 17, 2016 at 02:08:41PM +1100, Michael Ellerman wrote:
> >
> > That stub uses r2 to find the location of itself, but it only works if r2 holds
> > the TOC for scsi_mod.ko. In this case r2 still contains ibmvscsi.ko's TOC.
>
> Here's my solution, a bit rough still. This replaces the module_64.c change
> from patch 2/8:
>
> I shuffle the trampoline instructions so the R2-save-to-stack comes first.
> This allows me to construct a profiling trampoline code that
> looks very similar. The first instruction, harmful to -mprofile-kernel
> can now be replaced with a load of the *kernel* TOC value via paca.
> Arithmetic is done in r11, to keep it bitwise identical where possible.
> Likewise the result is "moved" to r12 via an addi.
>
> What do you think?
>
Hi Torsten,
I hit build failure, after replacing this patch with patch 2/8 module_64.c
hunk.
CC arch/powerpc/kernel/module.o
CC arch/powerpc/kernel/module_64.o
In file included from ./arch/powerpc/include/asm/asm-offsets.h:1:0,
from arch/powerpc/kernel/module_64.c:30:
include/generated/asm-offsets.h:14:0: error: "NMI_MASK" redefined [-Werror]
#define NMI_MASK 1048576 /* NMI_MASK # */
^
In file included from include/linux/spinlock.h:50:0,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from arch/powerpc/kernel/module_64.c:21:
include/linux/preempt.h:46:0: note: this is the location of the previous definition
#define NMI_MASK (__IRQ_MASK(NMI_BITS) << NMI_SHIFT)
^
In file included from ./arch/powerpc/include/asm/asm-offsets.h:1:0,
from arch/powerpc/kernel/module_64.c:30:
include/generated/asm-offsets.h:148:0: error: "CLONE_VM" redefined [-Werror]
#define CLONE_VM 256 /* CLONE_VM # */
^
In file included from include/linux/sched.h:4:0,
from ./arch/powerpc/include/asm/elf.h:12,
from include/linux/elf.h:4,
from include/linux/module.h:15,
from arch/powerpc/kernel/module_64.c:21:
include/uapi/linux/sched.h:8:0: note: this is the location of the previous definition
#define CLONE_VM 0x00000100 /* set if VM shared between processes */
^
In file included from ./arch/powerpc/include/asm/asm-offsets.h:1:0,
from arch/powerpc/kernel/module_64.c:30:
include/generated/asm-offsets.h:149:0: error: "CLONE_UNTRACED" redefined [-Werror]
#define CLONE_UNTRACED 8388608 /* CLONE_UNTRACED # */
^
In file included from include/linux/sched.h:4:0,
from ./arch/powerpc/include/asm/elf.h:12,
from include/linux/elf.h:4,
from include/linux/module.h:15,
from arch/powerpc/kernel/module_64.c:21:
include/uapi/linux/sched.h:22:0: note: this is the location of the previous definition
#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */
^
In file included from ./arch/powerpc/include/asm/asm-offsets.h:1:0,
from arch/powerpc/kernel/module_64.c:30:
include/generated/asm-offsets.h:185:0: error: "NSEC_PER_SEC" redefined [-Werror]
#define NSEC_PER_SEC 1000000000 /* NSEC_PER_SEC # */
^
In file included from include/linux/time.h:7:0,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from arch/powerpc/kernel/module_64.c:21:
include/linux/time64.h:35:0: note: this is the location of the previous definition
#define NSEC_PER_SEC 1000000000L
^
In file included from ./arch/powerpc/include/asm/asm-offsets.h:1:0,
from arch/powerpc/kernel/module_64.c:30:
include/generated/asm-offsets.h:188:0: error: "PGD_TABLE_SIZE" redefined [-Werror]
#define PGD_TABLE_SIZE 32768 /* PGD_TABLE_SIZE # */
^
In file included from ./arch/powerpc/include/asm/book3s/64/hash.h:58:0,
from ./arch/powerpc/include/asm/book3s/64/pgtable.h:8,
from ./arch/powerpc/include/asm/mmu-hash64.h:24,
from ./arch/powerpc/include/asm/mmu.h:185,
from ./arch/powerpc/include/asm/lppaca.h:36,
from ./arch/powerpc/include/asm/paca.h:21,
from ./arch/powerpc/include/asm/hw_irq.h:42,
from ./arch/powerpc/include/asm/irqflags.h:11,
from include/linux/irqflags.h:15,
from include/linux/spinlock.h:53,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from arch/powerpc/kernel/module_64.c:21:
./arch/powerpc/include/asm/book3s/64/hash-64k.h:133:0: note: this is the location of the previous definition
#define PGD_TABLE_SIZE (sizeof(pgd_t) << PGD_INDEX_SIZE)
^
cc1: all warnings being treated as errors
scripts/Makefile.build:258: recipe for target 'arch/powerpc/kernel/module_64.o' failed
make[1]: *** [arch/powerpc/kernel/module_64.o] Error 1
Makefile:950: recipe for target 'arch/powerpc/kernel' failed
make: *** [arch/powerpc/kernel] Error 2
Thanks,
Kamalesh.
next prev parent reply other threads:[~2016-02-24 7:51 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 17:29 [PATCH v8 0/8] ftrace with regs + live patching for ppc64 LE (ABI v2) Torsten Duwe
2016-01-28 15:32 ` [PATCH v8 8/8] livepatch: Detect offset for the ftrace location during build Torsten Duwe
2016-02-12 16:13 ` Balbir Singh
2016-02-12 16:45 ` Petr Mladek
2016-02-13 1:33 ` Balbir Singh
2016-02-16 5:47 ` Kamalesh Babulal
2016-02-16 8:23 ` Torsten Duwe
2016-02-16 10:30 ` Kamalesh Babulal
2016-02-16 10:39 ` Torsten Duwe
2016-02-16 13:57 ` Petr Mladek
2016-02-17 3:08 ` Michael Ellerman
2016-02-23 17:00 ` Torsten Duwe
2016-02-24 6:37 ` Balbir Singh
2016-02-24 6:55 ` Balbir Singh
2016-02-24 9:23 ` Torsten Duwe
2016-02-24 11:22 ` Balbir Singh
2016-02-24 7:51 ` Kamalesh Babulal [this message]
2016-02-10 16:21 ` [PATCH v8 1/8] ppc64 (le): prepare for -mprofile-kernel Torsten Duwe
2016-02-17 10:55 ` Michael Ellerman
2016-02-17 11:30 ` Torsten Duwe
2016-02-17 11:39 ` Michael Ellerman
2016-02-10 16:22 ` [PATCH v8 2/8] ppc64le FTRACE_WITH_REGS implementation Torsten Duwe
2016-02-10 16:22 ` [PATCH v8 3/8] ppc use ftrace_modify_all_code default Torsten Duwe
2016-02-10 16:25 ` [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables Torsten Duwe
2016-02-11 7:48 ` Balbir Singh
2016-02-11 8:39 ` Kamalesh Babulal
2016-02-11 9:35 ` Balbir Singh
2016-02-11 13:00 ` Murali Sampath
2016-02-11 13:00 ` Murali Sampath
2016-02-11 8:42 ` Torsten Duwe
2016-02-11 9:34 ` Balbir Singh
2016-02-15 10:27 ` Michael Ellerman
2016-02-15 12:56 ` Jiri Kosina
2016-02-15 14:04 ` Torsten Duwe
2016-02-15 22:21 ` Torsten Duwe
2016-02-16 4:53 ` Balbir Singh
2016-02-16 10:09 ` Michael Ellerman
2016-02-16 10:35 ` Torsten Duwe
2016-02-10 16:27 ` [PATCH v8 5/8] ppc64 ftrace_with_regs: disable profiling for some files Torsten Duwe
2016-02-10 16:34 ` [PATCH v8 6/8] Implement kernel live patching for ppc64le (ABIv2) Torsten Duwe
2016-02-11 9:01 ` Miroslav Benes
2016-02-10 16:36 ` [PATCH v8 7/8] Enable LIVEPATCH to be configured on ppc64le and add livepatch.o if it is selected Torsten Duwe
2016-02-11 6:18 ` [PATCH v8 0/8] ftrace with regs + live patching for ppc64 LE (ABI v2) Balbir Singh
2016-02-11 8:38 ` Torsten Duwe
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=20160224075103.GA21618@linux.vnet.ibm.com \
--to=kamalesh@linux.vnet.ibm.com \
--cc=duwe@lst.de \
--cc=jeyu@redhat.com \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=mpe@ellerman.id.au \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
/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;
as well as URLs for NNTP newsgroup(s).