Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753069AbbFLVMe (ORCPT ); Fri, 12 Jun 2015 17:12:34 -0400 Received: from mail-qg0-f51.google.com ([209.85.192.51]:36666 "EHLO mail-qg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750931AbbFLVMa (ORCPT ); Fri, 12 Jun 2015 17:12:30 -0400 From: Vince Weaver X-Google-Original-From: Vince Weaver Date: Fri, 12 Jun 2015 17:18:22 -0400 (EDT) To: linux-kernel@vger.kernel.org cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Steven Rostedt Subject: perf,ftrace: fuzzer triggers warning in trace_events_filter code Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3033 Lines: 46 So I've modified my fuzzer to try to exercise the PERF_EVENT_IOC_SET_FILTER ioctl() and it is starting to turn up some warnings. For example, this one: [28509.873731] ------------[ cut here ]------------ [28509.879188] WARNING: CPU: 1 PID: 9572 at kernel/trace/trace_events_filter.c:1640 replace_preds+0x4f2/0x9b0() [28509.890174] Modules linked in: fuse x86_pkg_temp_thermal intel_powerclamp snd_hda_codec_realtek intel_rapl iosf_mbi snd_hda_codec_hdmi snd_hda_codec_generic snd_hda_intel coretemp snd_hda_controller kvm_intel kvm crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec snd_hda_core aesni_intel snd_hwdep tpm_tis ppdev i915 iTCO_wdt evdev iTCO_vendor_support snd_pcm aes_x86_64 snd_timer lrw snd tpm gf128mul soundcore glue_helper ablk_helper cryptd psmouse drm_kms_helper lpc_ich serio_raw pcspkr parport_pc mei_me mfd_core parport mei drm battery i2c_i801 video i2c_algo_bit wmi processor button sg sr_mod sd_mod cdrom ehci_pci ehci_hcd xhci_pci ahci xhci_hcd libahci libata e1000e crc32c_intel ptp fan scsi_mod usbcore pps_core usb_common thermal thermal_sys [28509.967457] CPU: 1 PID: 9572 Comm: perf_fuzzer Tainted: G W 4.1.0-rc7+ #155 [28509.976717] Hardware name: LENOVO 10AM000AUS/SHARKBAY, BIOS FBKT72AUS 01/26/2014 [28509.985188] ffffffff81a1abb0 ffff8800ce757cb8 ffffffff816d7229 0000000000000000 [28509.993795] 0000000000000000 ffff8800ce757cf8 ffffffff81072eba 0000000000000160 [28510.002406] ffff8800cda26208 ffff8800364e4a90 0000000000000000 ffff8800cda26200 [28510.010990] Call Trace: [28510.014189] [] dump_stack+0x45/0x57 [28510.020242] [] warn_slowpath_common+0x8a/0xc0 [28510.027171] [] warn_slowpath_null+0x1a/0x20 [28510.033947] [] replace_preds+0x4f2/0x9b0 [28510.040401] [] ? ftrace_profile_set_filter+0x23/0x100 [28510.048083] [] create_filter+0x82/0xb0 [28510.054381] [] ftrace_profile_set_filter+0x54/0x100 [28510.061831] [] ? strndup_user+0x4b/0xc0 [28510.068170] [] perf_ioctl+0x170/0x4d0 [28510.074356] [] do_vfs_ioctl+0x2e0/0x4e0 [28510.080681] [] ? __perf_sw_event+0x65/0xa0 [28510.087299] [] ? __do_page_fault+0x2ad/0x460 [28510.094105] [] SyS_ioctl+0x81/0xa0 [28510.099983] [] system_call_fastpath+0x16/0x7a [28510.106857] ---[ end trace 2ea55cf8a8b076c3 ]--- This corresponds to /* Make sure the stack is empty */ pred = __pop_pred_stack(&stack); if (WARN_ON(pred)) { err = -EINVAL; filter->root = NULL; goto fail; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/