linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Subject: Re: Re: [PATCH ftrace/core  0/2] ftrace, kprobes: Introduce IPMODIFY flag for ftrace_ops to detect conflicts
Date: Fri, 13 Jun 2014 19:09:44 +0900	[thread overview]
Message-ID: <539ACDE8.7010703@hitachi.com> (raw)
In-Reply-To: <20140612124332.GA3863@treble.redhat.com>

(2014/06/12 21:43), Josh Poimboeuf wrote:
>>>  I tried removing the FTRACE_OPS_FL_ENABLED clearing line in
>>> ftrace_startup, but I saw more warnings.  This one happened when
>>> attempting to kprobe a kpatched function:
>>
>> Oops! yes, this should happen...
> 
> Instead of a warning here I'd expect to see register_kprobe return an
> error and a staprun failure.

Actually, since kprobes has "disabled" state, not only register_kprobe
but also enable_kprobe also can be failed. :)


>>>   WARNING: CPU: 3 PID: 4444 at kernel/kprobes.c:953 arm_kprobe+0xa7/0xe0()
>>>   Failed to init kprobe-ftrace (-16)
>>>   Modules linked in: stap_b2ea0de23f179d8ded86fcc19fcc533_4444(OE) kpatch_meminfo_string(OE) kpatch(OE) rfcomm fuse ccm ipt_MASQUERADE xt_CHECKSUM tun ip6t_rpfilter ip6t_REJECT xt_conntrack bnep ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw arc4 iwldvm mac80211 iTCO_wdt iTCO_vendor_support x86_pkg_temp_thermal coretemp kvm_intel kvm snd_hda_codec_hdmi iwlwifi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_controller snd_hda_codec snd_hwdep snd_seq uvcvideo btusb cfg80211 bluetooth videobuf2_vmalloc videobuf2_memops
>>>    videobuf2_core v4l2_common videodev snd_seq_device snd_pcm sdhci_pci media sdhci joydev nfsd i2c_i801 serio_raw pcspkr mmc_core microcode snd_timer e1000e lpc_ich thinkpad_acpi mfd_core shpchp snd wmi tpm_tis soundcore tpm ptp rfkill mei_me auth_rpcgss mei pps_core nfs_acl lockd sunrpc dm_crypt i915 i2c_algo_bit drm_kms_helper drm crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel i2c_core video [last unloaded: kpatch_meminfo_string]
>>>   CPU: 3 PID: 4444 Comm: stapio Tainted: G     U  W  OE 3.15.0-IPMODIFY+ #1
>>>   Hardware name: LENOVO 2356BH8/2356BH8, BIOS G7ET63WW (2.05 ) 11/12/2012
>>>    0000000000000000 000000009cd22363 ffff880427bdfd80 ffffffff816f31ed
>>>    ffff880427bdfdc8 ffff880427bdfdb8 ffffffff8108914d ffffffffa08258e0
>>>    ffffffffa08258f0 0000000000000000 0000000000000000 0000000000000000
>>>   Call Trace:
>>>    [<ffffffff816f31ed>] dump_stack+0x45/0x56
>>>    [<ffffffff8108914d>] warn_slowpath_common+0x7d/0xa0
>>>    [<ffffffff810891cc>] warn_slowpath_fmt+0x5c/0x80
>>>    [<ffffffff816ff9d7>] arm_kprobe+0xa7/0xe0
>>>    [<ffffffff817007f7>] register_kprobe+0x557/0x5d0
>>>    [<ffffffff81254da0>] ? meminfo_proc_open+0x30/0x30
>>>    [<ffffffffa0820c95>] _stp_ctl_write_cmd+0x8d5/0x930 [stap_b2ea0de23f179d8ded86fcc19fcc533_4444]
>>>    [<ffffffff811e5daa>] vfs_write+0xba/0x1e0
>>>    [<ffffffff811e6965>] SyS_write+0x55/0xd0
>>>    [<ffffffff81703179>] system_call_fastpath+0x16/0x1b
>>>
>>>
>>> And this one happened after unregistering a probe and then attempting to
>>> register kpatch:
>>
>> Did you see this on unpatching? it seems to happen on disabling a hash...
> 
> No, I think it was in the patching path, after removing the kprobe.
> kpatch was calling ftrace_set_filter_ip(), and had not called
> register_ftrace_function() yet.

OK, anyway, I'll make a test case for checking it.
Thanks!


-- 
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com



      reply	other threads:[~2014-06-13 10:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-10 10:50 [PATCH ftrace/core 0/2] ftrace, kprobes: Introduce IPMODIFY flag for ftrace_ops to detect conflicts Masami Hiramatsu
2014-06-10 10:50 ` [PATCH ftrace/core 1/2] ftrace: Simplify ftrace_hash_disable/enable path in ftrace_hash_move Masami Hiramatsu
2014-06-10 10:50 ` [PATCH ftrace/core 2/2] ftrace, kprobes: Support IPMODIFY flag to find IP modify conflict Masami Hiramatsu
2014-06-10 13:53   ` Namhyung Kim
2014-06-11  1:28     ` Masami Hiramatsu
2014-06-11  7:41       ` Namhyung Kim
2014-06-12  3:29         ` Masami Hiramatsu
2014-06-12  5:38           ` Namhyung Kim
2014-06-12  6:06             ` Masami Hiramatsu
2014-06-12  5:54           ` Namhyung Kim
2014-06-12  6:57             ` Masami Hiramatsu
2014-06-11 16:58 ` [PATCH ftrace/core 0/2] ftrace, kprobes: Introduce IPMODIFY flag for ftrace_ops to detect conflicts Josh Poimboeuf
2014-06-12  3:28   ` Namhyung Kim
2014-06-12 12:50     ` Josh Poimboeuf
2014-06-12  5:44   ` Masami Hiramatsu
2014-06-12 12:43     ` Josh Poimboeuf
2014-06-13 10:09       ` Masami Hiramatsu [this message]

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=539ACDE8.7010703@hitachi.com \
    --to=masami.hiramatsu.pt@hitachi.com \
    --cc=ananth@in.ibm.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --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).