Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1324275
| From | Petr Mladek <pmladek@suse.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v6 8/9] Implement kernel live patching for ppc64le (ABIv2) |
| Date | 2016-02-02 17:50 +0100 |
| Message-ID | <qXMjo-5NR-29@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <qUSOq-7cE-83@gated-at.bofh.it> <qV9vP-2Vi-9@gated-at.bofh.it> <qVbei-4b6-27@gated-at.bofh.it> <qXI66-2I0-5@gated-at.bofh.it> <qXLnm-55B-37@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue 2016-02-02 16:45:23, Torsten Duwe wrote: > On Tue, Feb 02, 2016 at 01:12:24PM +0100, Petr Mladek wrote: > > > > Hmm, the size of the offset is not a constant. In particular, leaf > > functions do not set TOC before the mcount location. > > To be slightly more precise, a leaf function that additionally uses > no global data. No global function calls, no global data access => > no need to load the TOC. Thanks for explanation. > > The result is that kernel crashes when trying to trace leaf function > > The trampoline *requires* a proper TOC pointer to find the remote function > entry point. If you jump onto the trampoline with the TOC from the caller's > caller you'll grab some address from somewhere and jump into nirvana. The dmesg messages suggested someting like this. > > By other words, it seems that the code generated with -mprofile-kernel > > option has been buggy in all gcc versions. > > Either that or we need bigger trampolines for everybody. > > Michael, should we grow every module trampoline to always load R2, > or fix GCC to recognise the generated bl _mcount as a global function call? > Anton, what do you think? BTW: Is the trampoline used also for classic probes? If not, we might need a trampoline for them as well. Note that TOC is not set only when the problematic functions are compiled with --mprofile-kernel. I still see the TOC stuff when compiling only with -pg. Best Regards, Petr
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v6 8/9] Implement kernel live patching for ppc64le (ABIv2) Petr Mladek <pmladek@suse.com> - 2016-02-02 13:20 +0100
Re: [PATCH v6 8/9] Implement kernel live patching for ppc64le (ABIv2) Torsten Duwe <duwe@lst.de> - 2016-02-02 16:50 +0100
Re: [PATCH v6 8/9] Implement kernel live patching for ppc64le (ABIv2) Petr Mladek <pmladek@suse.com> - 2016-02-02 17:50 +0100
Re: [PATCH v6 8/9] Implement kernel live patching for ppc64le (ABIv2) Jiri Kosina <jikos@kernel.org> - 2016-02-02 21:40 +0100
csiph-web