Merge 4.9.210 into android-4.9-q
Linux 4.9.210
drm/i915/gen9: Clear residual context state on context switch
netfilter: ipset: avoid null deref when IPSET_ATTR_LINENO is present
* netfilter: arp_tables: init netns pointer in xt_tgchk_param struct
net/ipv4/netfilter/arp_tables.c
* USB: Fix: Don't skip endpoint descriptors with maxpacket=0
drivers/usb/core/config.c
rtl8xxxu: prevent leaking urb
scsi: bfa: release allocated memory in case of error
mwifiex: pcie: Fix memory leak in mwifiex_pcie_alloc_cmdrsp_buf
mwifiex: fix possible heap overflow in mwifiex_process_country_ie()
* tty: always relink the port
drivers/tty/tty_port.c
* tty: link tty and port before configuring it as console
drivers/tty/serial/serial_core.c
drivers/tty/tty_port.c
staging: rtl8188eu: Add device code for TP-Link TL-WN727N v5.21
staging: comedi: adv_pci1710: fix AI channels 16-31 for PCI-1713
usb: musb: dma: Correct parameter passed to IRQ handler
usb: musb: Disable pullup at init
usb: musb: fix idling for suspend after disconnect interrupt
USB: serial: option: add ZLP support for 0x1bc7/0x9010
staging: vt6656: set usb_set_intfdata on driver fail.
can: can_dropped_invalid_skb(): ensure an initialized headroom in outgoing CAN sk_buffs
can: mscan: mscan_rx_poll(): fix rx path lockup when returning from polling to irq mode
can: gs_usb: gs_usb_probe(): use descriptors of current altsetting
* drm/dp_mst: correct the shifting in DP_REMOTE_I2C_READ
drivers/gpu/drm/drm_dp_mst_topology.c
* Input: add safety guards to input_set_keycode()
drivers/input/input.c
* HID: hid-input: clear unmapped usages
drivers/hid/hid-input.c
* HID: uhid: Fix returning EPOLLOUT from uhid_char_poll
drivers/hid/uhid.c
* HID: Fix slab-out-of-bounds read in hid_field_extract
drivers/hid/hid-core.c
tracing: Have stack tracer compile when MCOUNT_INSN_SIZE is not defined
kernel/trace: Fix do not unregister tracepoints when register sched_migrate_task fail
* tcp: minimize false-positives on TCP/GRO check
net/ipv4/tcp_input.c
* ALSA: usb-audio: Apply the sample rate quirk for Bose Companion 5
sound/usb/quirks.c
usb: chipidea: host: Disable port power only if previously enabled
* chardev: Avoid potential use-after-free in 'chrdev_open()'
fs/char_dev.c
* kobject: Export kobject_get_unless_zero()
include/linux/kobject.h
lib/kobject.c
Merge 4.9.209 into android-4.9-q
Linux 4.9.209
USB: serial: option: add Telit ME910G1 0x110a composition
* USB: core: fix check for duplicate endpoints
drivers/usb/core/config.c
vlan: fix memory leak in vlan_dev_set_egress_priority
* net: sch_prio: When ungrafting, replace with FIFO
net/sched/sch_prio.c
vlan: vlan_changelink() should propagate errors
vxlan: fix tos value before xmit
* tcp: fix "old stuff" D-SACK causing SACK to be treated as D-SACK
net/ipv4/tcp_input.c
sctp: free cmd->obj.chunk for the unprocessed SCTP_CMD_REPLY
pkt_sched: fq: do not accept silly TCA_FQ_QUANTUM
net: usb: lan78xx: fix possible skb leak
net: stmmac: dwmac-sunxi: Allow all RGMII modes
* macvlan: do not assume mac_header is set in macvlan_broadcast()
include/linux/if_ether.h
llc2: Fix return statement of llc_stat_ev_rx_null_dsap_xid_c (and _test_c)
parisc: Fix compiler warnings in debug_core.c
* block: fix memleak when __blk_rq_map_user_iov() is failed
block/blk-map.c
net: stmmac: RX buffer size must be 16 byte aligned
perf/x86/intel: Fix PT PMI handling
* kconfig: don't crash on NULL expressions in expr_eq()
scripts/kconfig/expr.c
regulator: rn5t618: fix module aliases
ASoC: wm8962: fix lambda value
* rfkill: Fix incorrect check to avoid NULL pointer dereference
net/rfkill/core.c
net: usb: lan78xx: Fix error message format specifier
bnx2x: Fix logic to get total no. of PFs per engine
bnx2x: Do not handle requests from VFs after parity
powerpc: Ensure that swiotlb buffer is allocated from low memory
samples: bpf: Replace symbol compare of trace_event
ARM: dts: am437x-gp/epos-evm: fix panel compatible
spi: spi-cavium-thunderx: Add missing pci_release_regions()
netfilter: uapi: Avoid undefined left-shift in xt_sctp.h
ARM: vexpress: Set-up shared OPP table instead of individual for each CPU
efi/gop: Fix memory leak in __gop_query32/64()
efi/gop: Return EFI_SUCCESS if a usable GOP was found
efi/gop: Return EFI_NOT_FOUND if there are no usable GOPs
* netfilter: ctnetlink: netns exit must wait for callbacks
net/netfilter/nf_conntrack_netlink.c
locking/spinlock/debug: Fix various data races
* pstore/ram: Write new dumps to start of recycled zones
fs/pstore/ram.c
locking/x86: Remove the unused atomic_inc_short() methd
xen/blkback: Avoid unmapping unmapped grant pages
s390/smp: fix physical to logical CPU map for SMT
* net: add annotations on hh->hh_len lockless accesses
include/net/neighbour.h
net/core/neighbour.c
net/ethernet/eth.c
ath9k_htc: Discard undersized packets
ath9k_htc: Modify byte order for an error message
rxrpc: Fix possible NULL pointer access in ICMP handling
powerpc/pseries/hvconsole: Fix stack overread via udbg
* drm/mst: Fix MST sideband up-reply failure handling
drivers/gpu/drm/drm_dp_mst_topology.c
* fix compat handling of FICLONERANGE, FIDEDUPERANGE and FS_IOC_FIEMAP
fs/compat_ioctl.c
tty: serial: msm_serial: Fix lockup for sysrq and oops
media: usb: fix memory leak in af9005_identify_state
regulator: ab8500: Remove AB8505 USB regulator
media: flexcop-usb: ensure -EIO is returned on error condition
* Bluetooth: Fix memory leak in hci_connect_le_scan
net/bluetooth/hci_conn.c
* Bluetooth: delete a stray unlock
net/bluetooth/l2cap_core.c
Bluetooth: btusb: fix PM leak in error case of setup
xfs: don't check for AG deadlock for realtime files in bunmapi
nfsd4: fix up replay_matches_cache()
* PM / devfreq: Check NULL governor in available_governors_show
drivers/devfreq/devfreq.c
* arm64: Revert support for execute-only user mappings
arch/arm64/include/asm/pgtable-prot.h
arch/arm64/include/asm/pgtable.h
arch/arm64/mm/fault.c
mm/mmap.c
ftrace: Avoid potential division by zero in function profiler
ALSA: cs4236: fix error return comparison of an unsigned integer
tracing: Have the histogram compare functions convert to u64 first
* gpiolib: fix up emulated open drain outputs
drivers/gpio/gpiolib.c
ata: ahci_brcm: Fix AHCI resources management
ata: ahci_brcm: Allow optional reset controller to be used
ata: libahci_platform: Export again ahci_platform_<en/dis>able_phys()
* compat_ioctl: block: handle Persistent Reservations
block/compat_ioctl.c
* dmaengine: Fix access to uninitialized dma_slave_caps
include/linux/dmaengine.h
* locks: print unsigned ino in /proc/locks
fs/locks.c
* memcg: account security cred as well to kmemcg
kernel/cred.c
* mm/zsmalloc.c: fix the migrated zspage statistics.
mm/zsmalloc.c
MIPS: Avoid VDSO ABI breakage due to global register variable
ALSA: ice1724: Fix sleep-in-atomic in Infrasonic Quartet support code
Revert "perf report: Add warning when libunwind not compiled in"
* drm: limit to INT_MAX in create_blob ioctl
drivers/gpu/drm/drm_property.c
* taskstats: fix data-race
kernel/taskstats.c
xfs: fix mount failure crash on invalid iclog memory access
PM / hibernate: memory_bm_find_bit(): Tighten node optimisation
xen/balloon: fix ballooned page accounting without hotplug enabled
xen-blkback: prevent premature module unload
IB/mlx4: Follow mirror sequence of device add during device removal
s390/cpum_sf: Avoid SBD overflow condition in irq handler
s390/cpum_sf: Adjust sampling interval to avoid hitting sample limits
md: raid1: check rdev before reference in raid1_sync_request func
usb: gadget: fix wrong endpoint desc
scsi: libsas: stop discovering if oob mode is disconnected
scsi: iscsi: qla4xxx: fix double free in probe
scsi: qla2xxx: Don't call qlt_async_event twice
scsi: lpfc: Fix memory leak on lpfc_bsg_write_ebuf_set func
RDMA/cma: add missed unregister_pernet_subsys in init failure
* PM / devfreq: Don't fail devfreq_dev_release if not in list
drivers/devfreq/devfreq.c
* arm64: alternatives: use tpidr_el2 on VHE hosts
arch/arm64/mm/proc.S
Merge 4.9.208 into android-4.9-q
Linux 4.9.208
gtp: avoid zero size hashtable
gtp: fix wrong condition in gtp_genl_dump_pdp()
* tcp: do not send empty skb from tcp_write_xmit()
net/ipv4/tcp_output.c
* tcp/dccp: fix possible race __inet_lookup_established()
include/linux/rculist_nulls.h
include/net/inet_hashtables.h
include/net/sock.h
net/ipv4/inet_diag.c
net/ipv4/inet_hashtables.c
net/ipv4/tcp_ipv4.c
net/ipv6/inet6_hashtables.c
vhost/vsock: accept only packets with the right dst_cid
net: ena: fix napi handler misbehavior when the napi budget is zero
* mmc: sdhci: Update the tuning failed messages to pr_debug level
drivers/mmc/host/sdhci.c
pinctrl: baytrail: Really serialize all register accesses
tty/serial: atmel: fix out of range clock divider handling
* hrtimer: Annotate lockless access to timer->state
include/linux/hrtimer.h
kernel/time/hrtimer.c
* net: icmp: fix data-race in cmp_global_allow()
net/ipv4/icmp.c
netfilter: bridge: make sure to pull arp header in br_nf_forward_arp()
6pack,mkiss: fix possible deadlock
* netfilter: ebtables: compat: reject all padding in matches/watchers
net/bridge/netfilter/ebtables.c
* filldir[64]: remove WARN_ON_ONCE() for bad directory entries
fs/readdir.c
* Make filldir[64]() verify the directory entry filename is valid
fs/readdir.c
perf strbuf: Remove redundant va_end() in strbuf_addv()
ALSA: hda - Downgrade error message for single-cmd fallback
* net, sysctl: Fix compiler warning when only cBPF is present
net/core/sysctl_net_core.c
x86/mce: Fix possibly incorrect severity calculation on AMD
* kernel: sysctl: make drop_caches write-only
kernel/sysctl.c
ocfs2: fix passing zero to 'PTR_ERR' warning
s390/cpum_sf: Check for SDBT and SDB consistency
* libfdt: define INT32_MAX and UINT32_MAX in libfdt_env.h
include/linux/libfdt_env.h
perf regs: Make perf_reg_name() return "unknown" instead of NULL
cdrom: respect device capabilities during opening action
* scripts/kallsyms: fix definitely-lost memory leak
scripts/kallsyms.c
gpio: mpc8xxx: Don't overwrite default irq_set_type callback
scsi: target: iscsi: Wait for all commands to finish before freeing a session
scsi: scsi_debug: num_tgts must be >= 0
scsi: pm80xx: Fix for SATA device discovery
* ext4: work around deleting a file with i_nlink == 0 safely
fs/ext4/namei.c
* HID: Improve Windows Precision Touchpad detection.
drivers/hid/hid-core.c
bcache: at least try to shrink 1 node in bch_mca_scan()
clk: pxa: fix one of the pxa RTC clocks
scsi: atari_scsi: sun3_scsi: Set sg_tablesize to 1 instead of SG_NONE
powerpc/security: Fix wrong message when RFI Flush is disable
powerpc/pseries/cmm: Implement release() function for sysfs device
* scsi: ufs: fix potential bug which ends in system hang
drivers/scsi/ufs/ufshcd.c
scsi: lpfc: fix: Coverity: lpfc_cmpl_els_rsp(): Null pointer dereferences
* fs/quota: handle overflows of sysctl fs.quota.* and report as unsigned long
fs/quota/dquot.c
include/linux/quota.h
irqchip: ingenic: Error out if IRQ domain creation failed
irqchip/irq-bcm7038-l1: Enable parent IRQ if necessary
* clk: qcom: Allow constant ratio freq tables for rcg
drivers/clk/qcom/clk-rcg2.c
drivers/clk/qcom/common.c
scsi: lpfc: Fix duplicate unreg_rpi error in port offline flow
* scsi: tracing: Fix handling of TRANSFER LENGTH == 0 for READ(6) and WRITE(6)
drivers/scsi/scsi_trace.c
* jbd2: Fix statistics for the number of logged blocks
fs/jbd2/commit.c
powerpc/book3s64/hash: Add cond_resched to avoid soft lockup warning
powerpc/security/book3s64: Report L1TF status in sysfs
clocksource/drivers/asm9260: Add a check for of_clk_get
dma-debug: add a schedule point in debug_dma_dump_mappings()
powerpc/pseries: Don't fail hash page table insert for bolted mapping
powerpc/pseries: Mark accumulate_stolen_time() as notrace
scsi: csiostor: Don't enable IRQs too early
scsi: lpfc: Fix SLI3 hba in loop mode not discovering devices
scsi: target: compare full CHAP_A Algorithm strings
iommu/tegra-smmu: Fix page tables in > 4 GiB memory
Input: atmel_mxt_ts - disable IRQ across suspend
scsi: lpfc: Fix locking on mailbox command completion
scsi: mpt3sas: Fix clear pending bit in ioctl status
perf probe: Fix to show function entry line as probe-able
mmc: sdhci-of-esdhc: fix P2020 errata handling
powerpc/irq: fix stack overflow verification
* ext4: check for directory entries too close to block end
fs/ext4/dir.c
* ext4: fix ext4_empty_dir() for directories with holes
fs/ext4/namei.c
staging: comedi: gsc_hpdi: check dma_alloc_coherent() return value
platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY 128 bytes
USB: EHCI: Do not return -EPIPE when hub is disconnected
usbip: Fix error path of vhci_recv_ret_submit()
* net: dst: Force 4-byte alignment of dst_metrics
include/net/dst.h
sctp: fully initialize v4 addr in some functions
net: usb: lan78xx: Fix suspend/resume PHY register access error
net: qlogic: Fix error paths in ql_alloc_large_buffers()
net: nfc: nci: fix a possible sleep-in-atomic-context bug in nci_uart_tty_receive()
net: hisilicon: Fix a BUG trigered by wrong bytes_compl
* mod_devicetable: fix PHY module format
include/linux/mod_devicetable.h
fjes: fix missed check in fjes_acpi_add
* af_packet: set defaule value for tmo
net/packet/af_packet.c
Btrfs: fix removal logic of the tree mod log that leads to use-after-free issues
btrfs: abort transaction after failed inode updates in create_subvol
btrfs: return error pointer from alloc_test_extent_buffer
btrfs: do not call synchronize_srcu() in inode_tree_del
btrfs: don't double lock the subvol_sem for rename exchange
* usb: xhci: Fix build warning seen with CONFIG_PM=n
drivers/usb/host/xhci-pci.c
* Revert "mmc: sdhci: Fix incorrect switch to HS mode"
drivers/mmc/host/sdhci.c
btrfs: don't prematurely free work in reada_start_machine_worker()
* net: phy: initialise phydev speed and duplex sanely
drivers/net/phy/phy_device.c
libtraceevent: Fix memory leakage in copy_filter_type
* crypto: vmx - Avoid weird build failures
drivers/crypto/vmx/Makefile
crypto: sun4i-ss - Fix 64-bit size_t warnings on sun4i-ss-hash.c
fbtft: Make sure string is NULL terminated
iwlwifi: check kasprintf() return value
x86/insn: Add some Intel instructions to the opcode map
spi: st-ssc4: add missed pm_runtime_disable
btrfs: don't prematurely free work in run_ordered_work()
btrfs: don't prematurely free work in end_workqueue_fn()
mmc: tmio: Add MMC_CAP_ERASE to allow erase/discard/trim requests
spi: tegra20-slink: add missed clk_unprepare
iwlwifi: mvm: fix unaligned read of rx_pkt_status
x86/crash: Add a forward declaration of struct kimage
* cpufreq: Register drivers only after CPU devices have been registered
drivers/cpufreq/cpufreq.c
parport: load lowlevel driver if ports not found
s390/disassembler: don't hide instruction addresses
ASoC: rt5677: Mark reg RT5677_PWR_ANLG2 as volatile
spi: pxa2xx: Add missed security checks
EDAC/ghes: Fix grain calculation
media: si470x-i2c: add missed operations in remove
media: pvrusb2: Fix oops on tear-down when radio support is not present
ath10k: fix get invalid tx rate for Mesh metric
perf probe: Filter out instances except for inlined subroutine and subprogram
perf probe: Skip end-of-sequence and non statement lines
perf probe: Fix to show calling lines of inlined functions
perf probe: Return a better scope DIE if there is no best scope
perf probe: Skip overlapped location on searching variables
perf probe: Fix to probe a function which has no entry pc
perf probe: Fix to show inlined function callsite without entry_pc
perf probe: Fix to show ranges of variables in functions without entry_pc
perf probe: Fix to probe an inline function which has no entry pc
perf probe: Walk function lines in lexical blocks
perf probe: Fix to list probe event with correct line number
perf probe: Fix to find range-only function instance
rtlwifi: fix memory leak in rtl92c_set_fw_rsvdpagepkt()
* ALSA: timer: Limit max amount of slave instances
sound/core/timer.c
spi: img-spfi: fix potential double release
bnx2x: Fix PF-VF communication over multi-cos queues.
* Bluetooth: Fix advertising duplicated flags
net/bluetooth/hci_request.c
pinctrl: sh-pfc: sh7734: Fix duplicate TCLK1_B
libata: Ensure ata_port probe has completed before detach
* arm64: psci: Reduce the waiting time for cpu_psci_cpu_kill()
arch/arm64/kernel/psci.c
x86/ioapic: Prevent inconsistent state when moving an interrupt
rtl8xxxu: fix RTL8723BU connection failure issue after warm reboot
drm/gma500: fix memory disclosures due to uninitialized bytes
x86/mce: Lower throttling MCE messages' priority to warning
* Bluetooth: hci_core: fix init for HCI_USER_CHANNEL
net/bluetooth/hci_core.c
iio: adc: max1027: Reset the device at probe time
* usb: usbfs: Suppress problematic bind and unbind uevents.
drivers/usb/core/devio.c
perf report: Add warning when libunwind not compiled in
perf test: Report failure for mmap events
x86/mm: Use the correct function type for native_set_fixmap()
extcon: sm5502: Reset registers during initialization
media: ti-vpe: vpe: Make sure YUYV is set as default format
media: ti-vpe: vpe: fix a v4l2-compliance failure about frame sequence number
media: ti-vpe: vpe: fix a v4l2-compliance warning about invalid pixel format
mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring
samples: pktgen: fix proc_cmd command result check logic
media: cec-funcs.h: add status_req checks
media: flexcop-usb: fix NULL-ptr deref in flexcop_usb_transfer_init()
regulator: max8907: Fix the usage of uninitialized variable in max8907_regulator_probe()
hwrng: omap3-rom - Call clk_disable_unprepare() on exit only if not idled
usb: renesas_usbhs: add suspend event support in gadget mode
tools/power/cpupower: Fix initializer override in hsw_ext_cstates
media: ov6650: Fix stored frame format not in sync with hardware
media: i2c: ov2659: Fix missing 720p register config
media: i2c: ov2659: fix s_stream return value
media: am437x-vpfe: Setting STD to current value is not an error
IB/iser: bound protection_sg size by data_sg size
libertas: fix a potential NULL pointer dereference
rtlwifi: prevent memory leak in rtl_usb_probe
staging: rtl8188eu: fix possible null dereference
staging: rtl8192u: fix multiple memory leaks on error path
* spi: Add call to spi_slave_abort() function when spidev driver is released
drivers/spi/spidev.c
iio: light: bh1750: Resolve compiler warning and make code more readable
drm/bridge: analogix-anx78xx: silence -EPROBE_DEFER warnings
* drm: mst: Fix query_payload ack reply struct
include/drm/drm_dp_mst_helper.h
ALSA: hda/ca0132 - Avoid endless loop
ALSA: hda/ca0132 - Keep power on during processing DSP response
* ALSA: pcm: Avoid possible info leaks from PCM stream buffers
sound/core/pcm_native.c
btrfs: handle ENOENT in btrfs_uuid_tree_iterate
btrfs: do not leak reloc root if we fail to read the fs root
btrfs: skip log replay on orphaned roots
* UPSTREAM: HID: input: map digitizer battery usage
drivers/hid/hid-input.c
include/linux/hid.h
ANDROID: cuttlefish_defconfig: Disable TRANSPARENT_HUGEPAGE
Merge 4.9.207 into android-4.9-q
Linux 4.9.207
net: stmmac: don't stop NAPI processing when dropping a packet
net: stmmac: use correct DMA buffer size in the RX descriptor
* xhci: fix USB3 device initiated resume race with roothub autosuspend
drivers/usb/host/xhci-hub.c
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.h
drm/radeon: fix r1xx/r2xx register checker for POT textures
scsi: iscsi: Fix a potential deadlock in the timeout handler
dm btree: increase rebalance threshold in __rebalance2()
* dma-buf: Fix memory leak in sync_file_merge()
drivers/dma-buf/sync_file.c
vfio/pci: call irq_bypass_unregister_producer() before freeing irq
ARM: tegra: Fix FLOW_CTLR_HALT register clobbering by tegra_resume()
ARM: dts: s3c64xx: Fix init order of clock providers
CIFS: Respect O_SYNC and O_DIRECT flags during reconnect
xtensa: fix TLB sanity checker
* PCI/MSI: Fix incorrect MSI-X masking on resume
drivers/pci/msi.c
* PCI: Fix Intel ACS quirk UPDCR register address
drivers/pci/quirks.c
* Revert "regulator: Defer init completion for a while after late_initcall"
drivers/regulator/core.c
* tcp: Protect accesses to .ts_recent_stamp with {READ,WRITE}_ONCE()
include/net/tcp.h
* tcp: tighten acceptance of ACKs not matching a child socket
include/net/tcp.h
* tcp: fix rejected syncookies due to stale timestamps
include/linux/time.h
include/net/tcp.h
* inet: protect against too small mtu values.
include/linux/netdevice.h
include/net/ip.h
net/core/dev.c
net/ipv4/devinet.c
net/ipv4/ip_output.c
tipc: fix ordering of tipc module init and exit routine
* tcp: md5: fix potential overestimation of TCP option space
net/ipv4/tcp_output.c
openvswitch: support asymmetric conntrack
net: ethernet: ti: cpsw: fix extra rx interrupt
* net: bridge: deny dev_set_mac_address() when unregistering
net/bridge/br_device.c
nvme: host: core: fix precedence of ternary operator
* kernel/module.c: wakeup processes in module_wq on module unload
kernel/module.c
net/mlx5e: Fix SFF 8472 eeprom length
sunrpc: fix crash when cache_head become valid before update
* workqueue: Fix missing kfree(rescuer) in destroy_workqueue()
kernel/workqueue.c
* blk-mq: make sure that line break can be printed
block/blk-mq-sysfs.c
* ext4: fix a bug in ext4_wait_for_tail_page_commit
fs/ext4/inode.c
* mm/shmem.c: cast the type of unmap_start to u64
mm/shmem.c
* firmware: qcom: scm: Ensure 'a0' status code is treated as signed
drivers/firmware/qcom_scm-64.c
reiserfs: fix extended attributes on the root directory
powerpc: Fix vDSO clock_getres()
scsi: qla2xxx: Always check the qla2x00_wait_for_hba_online() return value
scsi: qla2xxx: Fix qla24xx_process_bidir_cmd()
scsi: qla2xxx: Fix session lookup in qlt_abort_work()
scsi: qla2xxx: Fix DMA unmap leak
pinctrl: samsung: Fix device node refcount leaks in S3C64xx wakeup controller init
ARM: dts: omap3-tao3530: Fix incorrect MMC card detection GPIO polarity
ath10k: fix fw crash by moving chip reset after napi disabled
x86/MCE/AMD: Carve out the MC4_MISC thresholding quirk
x86/MCE/AMD: Turn off MC4_MISC thresholding on all family 0x15 models
e100: Fix passing zero to 'PTR_ERR' warning in e100_load_ucode_wait
scsi: lpfc: Cap NPIV vports to 256
omap: pdata-quirks: remove openpandora quirks for mmc3 and wl1251
Btrfs: fix negative subv_writers counter and data space leak after buffered write
iio: adis16480: Add debugfs_reg_access entry
* xhci: make sure interrupts are restored to correct state
drivers/usb/host/xhci-hub.c
* xhci: Fix memory leak in xhci_add_in_port()
drivers/usb/host/xhci-mem.c
* usb: xhci: only set D3hot for pci device
drivers/usb/host/xhci-pci.c
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h
scsi: zfcp: trace channel log even for FCP command responses
* quota: fix livelock in dquot_writeback_dquots
fs/quota/dquot.c
ext2: check err when partial != NULL
* quota: Check that quota is not dirty before release
fs/quota/dquot.c
include/linux/quotaops.h
* video/hdmi: Fix AVI bar unpack
drivers/video/hdmi.c
powerpc: Allow 64bit VDSO __kernel_sync_dicache to work across ranges >4GB
ppdev: fix PPGETTIME/PPSETTIME ioctls
mmc: host: omap_hsmmc: add code for special init of wl1251 to get rid of pandora_wl1251_init_card
pinctrl: samsung: Fix device node refcount leaks in init code
pinctrl: samsung: Fix device node refcount leaks in S3C24xx wakeup controller init
ACPI: PM: Avoid attaching ACPI PM domain to certain devices
ACPI: bus: Fix NULL pointer check in acpi_bus_get_private_data()
ACPI: OSL: only free map once in osl.c
* PM / devfreq: Lock devfreq in trans_stat_show
drivers/devfreq/devfreq.c
* cpuidle: Do not unset the driver if it is there already
drivers/cpuidle/driver.c
media: radio: wl1273: fix interrupt masking on release
media: bdisp: fix memleak on release
ar5523: check NULL before memcpy() in ar5523_cmd()
cgroup: pids: use atomic64_t for pids->limit
* blk-mq: avoid sysfs buffer overflow with too many CPU cores
block/blk-mq-sysfs.c
* ASoC: Jack: Fix NULL pointer dereference in snd_soc_jack_report
sound/soc/soc-jack.c
* workqueue: Fix pwq ref leak in rescuer_thread()
kernel/workqueue.c
* workqueue: Fix spurious sanity check failures in destroy_workqueue()
kernel/workqueue.c
ALSA: hda - Fix pending unsol events at shutdown
lib: raid6: fix awk build warnings
rtlwifi: rtl8192de: Fix missing enable interrupt flag
rtlwifi: rtl8192de: Fix missing callback that tests for hw release of buffer
rtlwifi: rtl8192de: Fix missing code to retrieve RX buffer address
btrfs: record all roots for rename exchange on a subvol
Btrfs: send, skip backreference walking for extents with many references
btrfs: Remove btrfs_bio::flags member
btrfs: check page->mapping when loading free space cache
virtio-balloon: fix managed page counts when migrating pages between zones
mtd: spear_smi: Fix Write Burst mode
usb: mon: Fix a deadlock in usbmon between mmap and read
* usb: core: urb: fix URB structure initialization function
drivers/usb/core/urb.c
USB: adutux: fix interface sanity check
USB: serial: io_edgeport: fix epic endpoint lookup
USB: idmouse: fix interface sanity checks
USB: atm: ueagle-atm: add missing endpoint check
iio: humidity: hdc100x: fix IIO_HUMIDITYRELATIVE channel reporting
ARM: dts: pandora-common: define wl1251 as child node of mmc3
* xhci: Increase STS_HALT timeout in xhci_suspend()
drivers/usb/host/xhci.c
staging: gigaset: add endpoint-type sanity check
staging: gigaset: fix illegal free on probe errors
staging: gigaset: fix general protection fault on probe
staging: rtl8712: fix interface sanity check
staging: rtl8188eu: fix interface sanity check
* usb: Allow USB device to be warm reset in suspended state
drivers/usb/core/hub.c
USB: uas: heed CAPACITY_HEURISTICS
USB: uas: honor flag to avoid CAPACITY16
* usb: gadget: configfs: Fix missing spin_lock_init()
drivers/usb/gadget/configfs.c
appletalk: Set error code if register_snap_client failed
* appletalk: Fix potential NULL pointer dereference in unregister_snap_client
include/linux/atalk.h
KVM: x86: fix out-of-bounds write in KVM_GET_EMULATED_CPUID (CVE-2019-19332)
* thermal: Fix deadlock in thermal thermal_zone_device_check
drivers/thermal/thermal_core.c
RDMA/qib: Validate ->show()/store() callbacks before calling them
spi: atmel: Fix CS high support
crypto: user - fix memory leak in crypto_report
crypto: ecdh - fix big endian bug in ECC library
crypto: ccp - fix uninitialized list head
crypto: crypto4xx - fix double-free in crypto4xx_destroy_sdr
KVM: x86: fix presentation of TSX feature in ARCH_CAPABILITIES
KVM: x86: do not modify masked bits of shared MSRs
drm/i810: Prevent underflow in ioctl
* jbd2: Fix possible overflow in jbd2_log_space_left()
include/linux/jbd2.h
can: slcan: Fix use-after-free Read in slcan_open
* tty: vt: keyboard: reject invalid keycodes
drivers/tty/vt/keyboard.c
CIFS: Fix SMB2 oplock break processing
CIFS: Fix NULL-pointer dereference in smb2_push_mandatory_locks
x86/PCI: Avoid AMD FCH XHCI USB PME# from D0 defect
coresight: etm4x: Fix input validation for sysfs.
Input: goodix - add upside-down quirk for Teclast X89 tablet
ALSA: pcm: oss: Avoid potential buffer overflows
* fuse: verify attributes
fs/fuse/dir.c
fs/fuse/fuse_i.h
* fuse: verify nlink
fs/fuse/dir.c
* sched/fair: Scale bandwidth quota and period without losing quota/period ratio precision
kernel/sched/fair.c
ARM: dts: sunxi: Fix PMU compatible strings
mlx4: Use snprintf instead of complicated strcpy
media: stkwebcam: Bugfix for wrong return values
* tty: Don't block on IO when ldisc change is pending
drivers/tty/n_tty.c
drivers/tty/tty_ldisc.c
include/linux/tty.h
nfsd: Return EPERM, not EACCES, in some SETATTR cases
MIPS: OCTEON: cvmx_pko_mem_debug8: use oldest forward compatible definition
powerpc/math-emu: Update macros from GCC
net/mlx4_core: Fix return codes of unsupported operations
dlm: fix invalid cluster name warning
ARM: dts: realview: Fix some more duplicate regulator nodes
clk: sunxi-ng: h3/h5: Fix CSI_MCLK parent
ARM: dts: pxa: clean up USB controller nodes
mtd: fix mtd_oobavail() incoherent returned value
* kbuild: fix single target build for external module
Makefile
* modpost: skip ELF local symbols during section mismatch check
scripts/mod/modpost.c
* tcp: fix SNMP TCP timeout under-estimation
net/ipv4/tcp_timer.c
* tcp: fix off-by-one bug on aborting window-probing socket
net/ipv4/tcp_timer.c
ARM: dts: realview-pbx: Fix duplicate regulator nodes
ARM: dts: mmp2: fix the gpio interrupt cell number
net/x25: fix null_x25_address handling
net/x25: fix called/calling length calculation in x25_parse_address_block
ARM: OMAP1/2: fix SoC name printing
nfsd: fix a warning in __cld_pipe_upcall()
ARM: debug: enable UART1 for socfpga Cyclone5
dlm: NULL check before kmem_cache_destroy is not needed
i2c: imx: don't print error message on probe defer
serial: imx: fix error handling in console_setup
altera-stapl: check for a null key before strcasecmp'ing it
* dma-mapping: fix return type of dma_set_max_seg_size()
include/linux/dma-mapping.h
* ACPI: fix acpi_find_child_device() invocation in acpi_preset_companion()
include/linux/acpi.h
* usb: dwc3: don't log probe deferrals; but do log other error codes
drivers/usb/dwc3/core.c
dmaengine: coh901318: Remove unused variable
dmaengine: coh901318: Fix a double-lock bug
media: pulse8-cec: return 0 when invalidating the logical address
ARM: dts: exynos: Use Samsung SoC specific compatible for DWC2 module
rtc: dt-binding: abx80x: fix resistance scale
rtc: max8997: Fix the returned value in case of error in 'max8997_rtc_read_alarm()'
math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning
MIPS: OCTEON: octeon-platform: fix typing
* regulator: Fix return value of _set_load() stub
include/linux/regulator/consumer.h
Staging: iio: adt7316: Fix i2c data reading, set the data field
pinctrl: qcom: ssbi-gpio: fix gpio-hog related boot issues
scsi: zfcp: drop default switch case which might paper over missing case
MIPS: SiByte: Enable ZONE_DMA32 for LittleSur
dlm: fix missing idr_destroy for recover_idr
ARM: dts: rockchip: Fix rk3288-rock2 vcc_flash name
clk: rockchip: fix rk3188 sclk_mac_lbtest parameter ordering
clk: rockchip: fix rk3188 sclk_smc gate data
extcon: max8997: Fix lack of path setting in USB device mode
net/mlx5: Release resource on error flow
ARM: 8813/1: Make aligned 2-byte getuser()/putuser() atomic on ARMv6+
iwlwifi: mvm: Send non offchannel traffic via AP sta
cxgb4vf: fix memleak in mac_hlist initialization
* serial: core: Allow processing sysrq at port unlock time
include/linux/serial_core.h
net: ep93xx_eth: fix mismatch of request_mem_region in remove
rsxx: add missed destroy_workqueue calls in remove
* ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed()
sound/core/pcm_lib.c
Input: cyttsp4_core - fix use after free bug
NFC: nxp-nci: Fix NULL pointer dereference after I2C communication error
audit_get_nd(): don't unlock parent too early
exportfs_decode_fh(): negative pinned may become positive without the parent locked
RDMA/hns: Correct the value of HNS_ROCE_HEM_CHUNK_LEN
autofs: fix a leak in autofs_expire_indirect()
serial: ifx6x60: add missed pm_runtime_disable
* serial: serial_core: Perform NULL checks for break_ctl ops
drivers/tty/serial/serial_core.c
serial: pl011: Fix DMA ->flush_buffer()
tty: serial: msm_serial: Fix flow control
tty: serial: fsl_lpuart: use the sg count from dma_map_sg
usb: gadget: u_serial: add missing port entry locking
arm64: tegra: Fix 'active-low' warning for Jetson TX1 regulator
* UPSTREAM: binder: fix incorrect calculation for num_valid
drivers/android/binder.c
* ANDROID: sched/core: Fix arm32 allmodconfig build-break
include/trace/events/sched.h
* BACKPORT: bpf: permit multiple bpf attachments for a single perf event
include/linux/bpf.h
include/linux/trace_events.h
include/trace/perf.h
kernel/bpf/core.c
kernel/events/core.c
kernel/trace/bpf_trace.c
kernel/trace/trace_kprobe.c
* UPSTREAM: bpf: use the same condition in perf event set/free bpf handler
kernel/events/core.c
* BACKPORT: bpf: multi program support for cgroup+bpf
include/linux/bpf-cgroup.h
include/linux/bpf.h
include/linux/filter.h
include/uapi/linux/bpf.h
kernel/bpf/cgroup.c
kernel/bpf/core.c
kernel/bpf/syscall.c
kernel/cgroup.c
Merge 4.9.206 into android-4.9-q
Linux 4.9.206
net: fec: fix clock count mis-match
platform/x86: hp-wmi: Fix ACPI errors caused by too small buffer
hwrng: stm32 - fix unbalanced pm_runtime_enable
* HID: core: check whether Usage Page item is after Usage ID items
drivers/hid/hid-core.c
* net: sched: fix `tc -s class show` no bstats on class with nolock subqueues
net/sched/sch_mq.c
net/sched/sch_multiq.c
net/sched/sch_prio.c
* sctp: cache netns in sctp_ep_common
include/net/sctp/structs.h
tipc: fix link name length check
openvswitch: remove another BUG_ON()
openvswitch: drop unneeded BUG_ON() in ovs_flow_cmd_build_info()
slip: Fix use-after-free Read in slip_open
openvswitch: fix flow command message size
macvlan: schedule bc_work even if error
media: atmel: atmel-isc: fix asd memory allocation
* pwm: Clear chip_data in pwm_put()
drivers/pwm/core.c
net: macb: fix error format in dev_err()
* media: v4l2-ctrl: fix flags for DO_WHITE_BALANCE
drivers/media/v4l2-core/v4l2-ctrls.c
mei: bus: prefix device names on bus with the bus name
USB: serial: ftdi_sio: add device IDs for U-Blox C099-F9P
staging: rtl8192e: fix potential use after free
clk: at91: fix update bit maps on CFG_MOR write
mm, gup: add missing refcount overflow checks on x86 and s390
mtd: Remove a debug trace in mtdpart.c
powerpc/pseries/dlpar: Fix a missing check in dlpar_parse_cc_property()
scsi: libsas: Check SMP PHY control function result
ACPI / APEI: Switch estatus pool to use vmalloc memory
scsi: libsas: Support SATA PHY connection rate unmatch fixing during discovery
iommu/amd: Fix NULL dereference bug in match_hid_uid
* net: dev: Use unsigned integer as an argument to left-shift
include/linux/netdevice.h
sctp: don't compare hb_timer expire date before starting it
* net: fix possible overflow in __sk_mem_raise_allocated()
include/net/sock.h
net/core/sock.c
sfc: initialise found bitmap in efx_ef10_mtd_probe
tipc: fix skb may be leaky in tipc_link_input
decnet: fix DN_IFREQ_SIZE
* ip_tunnel: Make none-tunnel-dst tunnel port work with lwtunnel
net/ipv4/ip_tunnel.c
sfc: suppress duplicate nvmem partition types in efx_ef10_mtd_probe
* net/core/neighbour: fix kmemleak minimal reference count for hash tables
net/core/neighbour.c
* net/core/neighbour: tell kmemleak about hash tables
net/core/neighbour.c
tipc: fix memory leak in tipc_nl_compat_publ_dump
mtd: Check add_mtd_device() ret code
* lib/genalloc.c: include vmalloc.h
lib/genalloc.c
* drivers/base/platform.c: kmemleak ignore a known leak
drivers/base/platform.c
* lib/genalloc.c: use vzalloc_node() to allocate the bitmap
lib/genalloc.c
* lib/genalloc.c: fix allocation of aligned buffer from non-aligned chunk
include/linux/genalloc.h
lib/genalloc.c
* vmscan: return NODE_RECLAIM_NOSCAN in node_reclaim() when CONFIG_NUMA is n
include/linux/swap.h
mm/internal.h
ocfs2: clear journal dirty flag after shutdown journal
net/wan/fsl_ucc_hdlc: Avoid double free in ucc_hdlc_probe()
tipc: fix a missing check of genlmsg_put
atl1e: checking the status of atl1e_write_phy_reg
net: dsa: bcm_sf2: Propagate error value from mdio_write
net: stmicro: fix a missing check of clk_prepare
um: Make GCOV depend on !KCOV
* net/net_namespace: Check the return value of register_pernet_subsys()
net/core/net_namespace.c
pwm: clps711x: Fix period calculation
crypto: mxc-scc - fix build warnings on ARM64
powerpc/pseries: Fix node leak in update_lmb_associativity_index()
powerpc/83xx: handle machine check caused by watchdog timer
regulator: tps65910: fix a missing check of return value
drbd: fix print_st_err()'s prototype to match the definition
drbd: do not block when adjusting "disk-options" while IO is frozen
drbd: reject attach of unsuitable uuids even if connected
drbd: ignore "all zero" peer volume sizes in handshake
powerpc/powernv/eeh/npu: Fix uninitialized variables in opal_pci_eeh_freeze_status
vfio/spapr_tce: Get rid of possible infinite loop
powerpc/44x/bamboo: Fix PCI range
powerpc/mm: Make NULL pointer deferences explicit on bad page faults.
powerpc/prom: fix early DEBUG messages
ath6kl: Fix off by one error in scan completion
ath6kl: Only use match sets when firmware supports it
scsi: csiostor: fix incorrect dma device in case of vport
scsi: qla2xxx: deadlock by configfs_depend_item
RDMA/srp: Propagate ib_post_send() failures to the SCSI mid-layer
openrisc: Fix broken paths to arch/or32
serial: max310x: Fix tx_empty() callback
drivers/regulator: fix a missing check of return value
powerpc/xmon: fix dump_segments()
powerpc/book3s/32: fix number of bats in p/v_block_mapped()
IB/qib: Fix an error code in qib_sdma_verbs_send()
xfs: Fix bulkstat compat ioctls on x32 userspace.
xfs: Align compat attrlist_by_handle with native implementation.
gfs2: take jdata unstuff into account in do_grow
dm flakey: Properly corrupt multi-page bios.
HID: doc: fix wrong data structure reference for UHID_OUTPUT
pinctrl: sh-pfc: sh7734: Fix shifted values in IPSR10
pinctrl: sh-pfc: sh7264: Fix PFCR3 and PFCR0 register configuration
KVM: s390: unregister debug feature on failing arch init
net/mlx5: Continue driver initialization despite debugfs failure
pinctrl: xway: fix gpio-hog related boot issues
xen/pciback: Check dev_data before using it
HID: intel-ish-hid: fixes incorrect error handling
btrfs: only track ref_heads in delayed_ref_updates
mtd: rawnand: sunxi: Write pageprog related opcodes to WCMD_SET
VSOCK: bind to random port for VMADDR_PORT_ANY
* gpiolib: Fix return value of gpio_to_desc() stub if !GPIOLIB
include/linux/gpio/consumer.h
microblaze: move "... is ready" messages to arch/microblaze/Makefile
microblaze: adjust the help to the real behavior
ubi: Do not drop UBI device reference before using
ubi: Put MTD device after it is not used
xfs: require both realtime inodes to mount
rtl818x: fix potential use after free
mwifiex: debugfs: correct histogram spacing, formatting
mwifiex: fix potential NULL dereference and use after free
crypto: user - support incremental algorithm dumps
ACPI / LPSS: Ignore acpi_device_fix_up_power() return value
ARM: ks8695: fix section mismatch warning
PM / AVS: SmartReflex: NULL check before some freeing functions is not needed
* arm64: smp: Handle errors reported by the firmware
arch/arm64/kernel/smp.c
* arm64: mm: Prevent mismatched 52-bit VA support
arch/arm64/kernel/head.S
arch/arm64/kernel/smp.c
parisc: Fix HP SDC hpa address output
parisc: Fix serio address output
ARM: dts: imx53-voipac-dmm-668: Fix memory node duplication
ARM: debug-imx: only define DEBUG_IMX_UART_PORT if needed
scsi: lpfc: Fix dif and first burst use in write commands
pwm: bcm-iproc: Prevent unloading the driver module while in use
block: drbd: remove a stray unlock in __drbd_send_protocol()
mac80211: fix station inactive_time shortly after boot
scripts/gdb: fix debugging modules compiled with hot/cold partitioning
watchdog: meson: Fix the wrong value of left time
can: c_can: D_CAN: c_can_chip_config(): perform a sofware reset on open
can: peak_usb: report bus recovery as well
net: fec: add missed clk_disable_unprepare in remove
clk: at91: avoid sleeping early
* reset: fix reset_control_ops kerneldoc comment
include/linux/reset-controller.h
clk: samsung: exynos5420: Preserve PLL configuration during suspend/resume
ASoC: kirkwood: fix external clock probe defer
* ASoC: compress: fix unsigned integer overflow check
sound/core/compress_offload.c
Change-Id: Ida917e8b91aa0dd373b92c6bdc283734141543d4
Signed-off-by: lucaswei <lucaswei@google.com>
768 lines
19 KiB
C
768 lines
19 KiB
C
#include <trace/syscall.h>
|
|
#include <trace/events/syscalls.h>
|
|
#include <linux/syscalls.h>
|
|
#include <linux/slab.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/module.h> /* for MODULE_NAME_LEN via KSYM_SYMBOL_LEN */
|
|
#include <linux/ftrace.h>
|
|
#include <linux/perf_event.h>
|
|
#include <asm/syscall.h>
|
|
|
|
#include "trace_output.h"
|
|
#include "trace.h"
|
|
|
|
static DEFINE_MUTEX(syscall_trace_lock);
|
|
|
|
static int syscall_enter_register(struct trace_event_call *event,
|
|
enum trace_reg type, void *data);
|
|
static int syscall_exit_register(struct trace_event_call *event,
|
|
enum trace_reg type, void *data);
|
|
|
|
static struct list_head *
|
|
syscall_get_enter_fields(struct trace_event_call *call)
|
|
{
|
|
struct syscall_metadata *entry = call->data;
|
|
|
|
return &entry->enter_fields;
|
|
}
|
|
|
|
extern struct syscall_metadata *__start_syscalls_metadata[];
|
|
extern struct syscall_metadata *__stop_syscalls_metadata[];
|
|
|
|
static struct syscall_metadata **syscalls_metadata;
|
|
|
|
#ifndef ARCH_HAS_SYSCALL_MATCH_SYM_NAME
|
|
static inline bool arch_syscall_match_sym_name(const char *sym, const char *name)
|
|
{
|
|
/*
|
|
* Only compare after the "sys" prefix. Archs that use
|
|
* syscall wrappers may have syscalls symbols aliases prefixed
|
|
* with ".SyS" or ".sys" instead of "sys", leading to an unwanted
|
|
* mismatch.
|
|
*/
|
|
return !strcmp(sym + 3, name + 3);
|
|
}
|
|
#endif
|
|
|
|
#ifdef ARCH_TRACE_IGNORE_COMPAT_SYSCALLS
|
|
/*
|
|
* Some architectures that allow for 32bit applications
|
|
* to run on a 64bit kernel, do not map the syscalls for
|
|
* the 32bit tasks the same as they do for 64bit tasks.
|
|
*
|
|
* *cough*x86*cough*
|
|
*
|
|
* In such a case, instead of reporting the wrong syscalls,
|
|
* simply ignore them.
|
|
*
|
|
* For an arch to ignore the compat syscalls it needs to
|
|
* define ARCH_TRACE_IGNORE_COMPAT_SYSCALLS as well as
|
|
* define the function arch_trace_is_compat_syscall() to let
|
|
* the tracing system know that it should ignore it.
|
|
*/
|
|
static int
|
|
trace_get_syscall_nr(struct task_struct *task, struct pt_regs *regs)
|
|
{
|
|
if (unlikely(arch_trace_is_compat_syscall(regs)))
|
|
return -1;
|
|
|
|
return syscall_get_nr(task, regs);
|
|
}
|
|
#else
|
|
static inline int
|
|
trace_get_syscall_nr(struct task_struct *task, struct pt_regs *regs)
|
|
{
|
|
return syscall_get_nr(task, regs);
|
|
}
|
|
#endif /* ARCH_TRACE_IGNORE_COMPAT_SYSCALLS */
|
|
|
|
static __init struct syscall_metadata *
|
|
find_syscall_meta(unsigned long syscall)
|
|
{
|
|
struct syscall_metadata **start;
|
|
struct syscall_metadata **stop;
|
|
char str[KSYM_SYMBOL_LEN];
|
|
|
|
|
|
start = __start_syscalls_metadata;
|
|
stop = __stop_syscalls_metadata;
|
|
kallsyms_lookup(syscall, NULL, NULL, NULL, str);
|
|
|
|
if (arch_syscall_match_sym_name(str, "sys_ni_syscall"))
|
|
return NULL;
|
|
|
|
for ( ; start < stop; start++) {
|
|
if ((*start)->name && arch_syscall_match_sym_name(str, (*start)->name))
|
|
return *start;
|
|
}
|
|
return NULL;
|
|
}
|
|
|
|
static struct syscall_metadata *syscall_nr_to_meta(int nr)
|
|
{
|
|
if (!syscalls_metadata || nr >= NR_syscalls || nr < 0)
|
|
return NULL;
|
|
|
|
return syscalls_metadata[nr];
|
|
}
|
|
|
|
const char *get_syscall_name(int syscall)
|
|
{
|
|
struct syscall_metadata *entry;
|
|
|
|
entry = syscall_nr_to_meta(syscall);
|
|
if (!entry)
|
|
return NULL;
|
|
|
|
return entry->name;
|
|
}
|
|
|
|
static enum print_line_t
|
|
print_syscall_enter(struct trace_iterator *iter, int flags,
|
|
struct trace_event *event)
|
|
{
|
|
struct trace_array *tr = iter->tr;
|
|
struct trace_seq *s = &iter->seq;
|
|
struct trace_entry *ent = iter->ent;
|
|
struct syscall_trace_enter *trace;
|
|
struct syscall_metadata *entry;
|
|
int i, syscall;
|
|
|
|
trace = (typeof(trace))ent;
|
|
syscall = trace->nr;
|
|
entry = syscall_nr_to_meta(syscall);
|
|
|
|
if (!entry)
|
|
goto end;
|
|
|
|
if (entry->enter_event->event.type != ent->type) {
|
|
WARN_ON_ONCE(1);
|
|
goto end;
|
|
}
|
|
|
|
trace_seq_printf(s, "%s(", entry->name);
|
|
|
|
for (i = 0; i < entry->nb_args; i++) {
|
|
|
|
if (trace_seq_has_overflowed(s))
|
|
goto end;
|
|
|
|
/* parameter types */
|
|
if (tr->trace_flags & TRACE_ITER_VERBOSE)
|
|
trace_seq_printf(s, "%s ", entry->types[i]);
|
|
|
|
/* parameter values */
|
|
trace_seq_printf(s, "%s: %lx%s", entry->args[i],
|
|
trace->args[i],
|
|
i == entry->nb_args - 1 ? "" : ", ");
|
|
}
|
|
|
|
trace_seq_putc(s, ')');
|
|
end:
|
|
trace_seq_putc(s, '\n');
|
|
|
|
return trace_handle_return(s);
|
|
}
|
|
|
|
static enum print_line_t
|
|
print_syscall_exit(struct trace_iterator *iter, int flags,
|
|
struct trace_event *event)
|
|
{
|
|
struct trace_seq *s = &iter->seq;
|
|
struct trace_entry *ent = iter->ent;
|
|
struct syscall_trace_exit *trace;
|
|
int syscall;
|
|
struct syscall_metadata *entry;
|
|
|
|
trace = (typeof(trace))ent;
|
|
syscall = trace->nr;
|
|
entry = syscall_nr_to_meta(syscall);
|
|
|
|
if (!entry) {
|
|
trace_seq_putc(s, '\n');
|
|
goto out;
|
|
}
|
|
|
|
if (entry->exit_event->event.type != ent->type) {
|
|
WARN_ON_ONCE(1);
|
|
return TRACE_TYPE_UNHANDLED;
|
|
}
|
|
|
|
trace_seq_printf(s, "%s -> 0x%lx\n", entry->name,
|
|
trace->ret);
|
|
|
|
out:
|
|
return trace_handle_return(s);
|
|
}
|
|
|
|
extern char *__bad_type_size(void);
|
|
|
|
#define SYSCALL_FIELD(type, field, name) \
|
|
sizeof(type) != sizeof(trace.field) ? \
|
|
__bad_type_size() : \
|
|
#type, #name, offsetof(typeof(trace), field), \
|
|
sizeof(trace.field), is_signed_type(type)
|
|
|
|
static int __init
|
|
__set_enter_print_fmt(struct syscall_metadata *entry, char *buf, int len)
|
|
{
|
|
int i;
|
|
int pos = 0;
|
|
|
|
/* When len=0, we just calculate the needed length */
|
|
#define LEN_OR_ZERO (len ? len - pos : 0)
|
|
|
|
pos += snprintf(buf + pos, LEN_OR_ZERO, "\"");
|
|
for (i = 0; i < entry->nb_args; i++) {
|
|
pos += snprintf(buf + pos, LEN_OR_ZERO, "%s: 0x%%0%zulx%s",
|
|
entry->args[i], sizeof(unsigned long),
|
|
i == entry->nb_args - 1 ? "" : ", ");
|
|
}
|
|
pos += snprintf(buf + pos, LEN_OR_ZERO, "\"");
|
|
|
|
for (i = 0; i < entry->nb_args; i++) {
|
|
pos += snprintf(buf + pos, LEN_OR_ZERO,
|
|
", ((unsigned long)(REC->%s))", entry->args[i]);
|
|
}
|
|
|
|
#undef LEN_OR_ZERO
|
|
|
|
/* return the length of print_fmt */
|
|
return pos;
|
|
}
|
|
|
|
static int __init set_syscall_print_fmt(struct trace_event_call *call)
|
|
{
|
|
char *print_fmt;
|
|
int len;
|
|
struct syscall_metadata *entry = call->data;
|
|
|
|
if (entry->enter_event != call) {
|
|
call->print_fmt = "\"0x%lx\", REC->ret";
|
|
return 0;
|
|
}
|
|
|
|
/* First: called with 0 length to calculate the needed length */
|
|
len = __set_enter_print_fmt(entry, NULL, 0);
|
|
|
|
print_fmt = kmalloc(len + 1, GFP_KERNEL);
|
|
if (!print_fmt)
|
|
return -ENOMEM;
|
|
|
|
/* Second: actually write the @print_fmt */
|
|
__set_enter_print_fmt(entry, print_fmt, len + 1);
|
|
call->print_fmt = print_fmt;
|
|
|
|
return 0;
|
|
}
|
|
|
|
static void __init free_syscall_print_fmt(struct trace_event_call *call)
|
|
{
|
|
struct syscall_metadata *entry = call->data;
|
|
|
|
if (entry->enter_event == call)
|
|
kfree(call->print_fmt);
|
|
}
|
|
|
|
static int __init syscall_enter_define_fields(struct trace_event_call *call)
|
|
{
|
|
struct syscall_trace_enter trace;
|
|
struct syscall_metadata *meta = call->data;
|
|
int ret;
|
|
int i;
|
|
int offset = offsetof(typeof(trace), args);
|
|
|
|
ret = trace_define_field(call, SYSCALL_FIELD(int, nr, __syscall_nr),
|
|
FILTER_OTHER);
|
|
if (ret)
|
|
return ret;
|
|
|
|
for (i = 0; i < meta->nb_args; i++) {
|
|
ret = trace_define_field(call, meta->types[i],
|
|
meta->args[i], offset,
|
|
sizeof(unsigned long), 0,
|
|
FILTER_OTHER);
|
|
offset += sizeof(unsigned long);
|
|
}
|
|
|
|
return ret;
|
|
}
|
|
|
|
static int __init syscall_exit_define_fields(struct trace_event_call *call)
|
|
{
|
|
struct syscall_trace_exit trace;
|
|
int ret;
|
|
|
|
ret = trace_define_field(call, SYSCALL_FIELD(int, nr, __syscall_nr),
|
|
FILTER_OTHER);
|
|
if (ret)
|
|
return ret;
|
|
|
|
ret = trace_define_field(call, SYSCALL_FIELD(long, ret, ret),
|
|
FILTER_OTHER);
|
|
|
|
return ret;
|
|
}
|
|
|
|
static void ftrace_syscall_enter(void *data, struct pt_regs *regs, long id)
|
|
{
|
|
struct trace_array *tr = data;
|
|
struct trace_event_file *trace_file;
|
|
struct syscall_trace_enter *entry;
|
|
struct syscall_metadata *sys_data;
|
|
struct ring_buffer_event *event;
|
|
struct ring_buffer *buffer;
|
|
unsigned long irq_flags;
|
|
int pc;
|
|
int syscall_nr;
|
|
int size;
|
|
|
|
syscall_nr = trace_get_syscall_nr(current, regs);
|
|
if (syscall_nr < 0 || syscall_nr >= NR_syscalls)
|
|
return;
|
|
|
|
/* Here we're inside tp handler's rcu_read_lock_sched (__DO_TRACE) */
|
|
trace_file = rcu_dereference_sched(tr->enter_syscall_files[syscall_nr]);
|
|
if (!trace_file)
|
|
return;
|
|
|
|
if (trace_trigger_soft_disabled(trace_file))
|
|
return;
|
|
|
|
sys_data = syscall_nr_to_meta(syscall_nr);
|
|
if (!sys_data)
|
|
return;
|
|
|
|
size = sizeof(*entry) + sizeof(unsigned long) * sys_data->nb_args;
|
|
|
|
local_save_flags(irq_flags);
|
|
pc = preempt_count();
|
|
|
|
buffer = tr->trace_buffer.buffer;
|
|
event = trace_buffer_lock_reserve(buffer,
|
|
sys_data->enter_event->event.type, size, irq_flags, pc);
|
|
if (!event)
|
|
return;
|
|
|
|
entry = ring_buffer_event_data(event);
|
|
entry->nr = syscall_nr;
|
|
syscall_get_arguments(current, regs, 0, sys_data->nb_args, entry->args);
|
|
|
|
event_trigger_unlock_commit(trace_file, buffer, event, entry,
|
|
irq_flags, pc, 0);
|
|
}
|
|
|
|
static void ftrace_syscall_exit(void *data, struct pt_regs *regs, long ret)
|
|
{
|
|
struct trace_array *tr = data;
|
|
struct trace_event_file *trace_file;
|
|
struct syscall_trace_exit *entry;
|
|
struct syscall_metadata *sys_data;
|
|
struct ring_buffer_event *event;
|
|
struct ring_buffer *buffer;
|
|
unsigned long irq_flags;
|
|
int pc;
|
|
int syscall_nr;
|
|
|
|
syscall_nr = trace_get_syscall_nr(current, regs);
|
|
if (syscall_nr < 0 || syscall_nr >= NR_syscalls)
|
|
return;
|
|
|
|
/* Here we're inside tp handler's rcu_read_lock_sched (__DO_TRACE()) */
|
|
trace_file = rcu_dereference_sched(tr->exit_syscall_files[syscall_nr]);
|
|
if (!trace_file)
|
|
return;
|
|
|
|
if (trace_trigger_soft_disabled(trace_file))
|
|
return;
|
|
|
|
sys_data = syscall_nr_to_meta(syscall_nr);
|
|
if (!sys_data)
|
|
return;
|
|
|
|
local_save_flags(irq_flags);
|
|
pc = preempt_count();
|
|
|
|
buffer = tr->trace_buffer.buffer;
|
|
event = trace_buffer_lock_reserve(buffer,
|
|
sys_data->exit_event->event.type, sizeof(*entry),
|
|
irq_flags, pc);
|
|
if (!event)
|
|
return;
|
|
|
|
entry = ring_buffer_event_data(event);
|
|
entry->nr = syscall_nr;
|
|
entry->ret = syscall_get_return_value(current, regs);
|
|
|
|
event_trigger_unlock_commit(trace_file, buffer, event, entry,
|
|
irq_flags, pc, 0);
|
|
}
|
|
|
|
static int reg_event_syscall_enter(struct trace_event_file *file,
|
|
struct trace_event_call *call)
|
|
{
|
|
struct trace_array *tr = file->tr;
|
|
int ret = 0;
|
|
int num;
|
|
|
|
num = ((struct syscall_metadata *)call->data)->syscall_nr;
|
|
if (WARN_ON_ONCE(num < 0 || num >= NR_syscalls))
|
|
return -ENOSYS;
|
|
mutex_lock(&syscall_trace_lock);
|
|
if (!tr->sys_refcount_enter)
|
|
ret = register_trace_sys_enter(ftrace_syscall_enter, tr);
|
|
if (!ret) {
|
|
rcu_assign_pointer(tr->enter_syscall_files[num], file);
|
|
tr->sys_refcount_enter++;
|
|
}
|
|
mutex_unlock(&syscall_trace_lock);
|
|
return ret;
|
|
}
|
|
|
|
static void unreg_event_syscall_enter(struct trace_event_file *file,
|
|
struct trace_event_call *call)
|
|
{
|
|
struct trace_array *tr = file->tr;
|
|
int num;
|
|
|
|
num = ((struct syscall_metadata *)call->data)->syscall_nr;
|
|
if (WARN_ON_ONCE(num < 0 || num >= NR_syscalls))
|
|
return;
|
|
mutex_lock(&syscall_trace_lock);
|
|
tr->sys_refcount_enter--;
|
|
RCU_INIT_POINTER(tr->enter_syscall_files[num], NULL);
|
|
if (!tr->sys_refcount_enter)
|
|
unregister_trace_sys_enter(ftrace_syscall_enter, tr);
|
|
mutex_unlock(&syscall_trace_lock);
|
|
}
|
|
|
|
static int reg_event_syscall_exit(struct trace_event_file *file,
|
|
struct trace_event_call *call)
|
|
{
|
|
struct trace_array *tr = file->tr;
|
|
int ret = 0;
|
|
int num;
|
|
|
|
num = ((struct syscall_metadata *)call->data)->syscall_nr;
|
|
if (WARN_ON_ONCE(num < 0 || num >= NR_syscalls))
|
|
return -ENOSYS;
|
|
mutex_lock(&syscall_trace_lock);
|
|
if (!tr->sys_refcount_exit)
|
|
ret = register_trace_sys_exit(ftrace_syscall_exit, tr);
|
|
if (!ret) {
|
|
rcu_assign_pointer(tr->exit_syscall_files[num], file);
|
|
tr->sys_refcount_exit++;
|
|
}
|
|
mutex_unlock(&syscall_trace_lock);
|
|
return ret;
|
|
}
|
|
|
|
static void unreg_event_syscall_exit(struct trace_event_file *file,
|
|
struct trace_event_call *call)
|
|
{
|
|
struct trace_array *tr = file->tr;
|
|
int num;
|
|
|
|
num = ((struct syscall_metadata *)call->data)->syscall_nr;
|
|
if (WARN_ON_ONCE(num < 0 || num >= NR_syscalls))
|
|
return;
|
|
mutex_lock(&syscall_trace_lock);
|
|
tr->sys_refcount_exit--;
|
|
RCU_INIT_POINTER(tr->exit_syscall_files[num], NULL);
|
|
if (!tr->sys_refcount_exit)
|
|
unregister_trace_sys_exit(ftrace_syscall_exit, tr);
|
|
mutex_unlock(&syscall_trace_lock);
|
|
}
|
|
|
|
static int __init init_syscall_trace(struct trace_event_call *call)
|
|
{
|
|
int id;
|
|
int num;
|
|
|
|
num = ((struct syscall_metadata *)call->data)->syscall_nr;
|
|
if (num < 0 || num >= NR_syscalls) {
|
|
pr_debug("syscall %s metadata not mapped, disabling ftrace event\n",
|
|
((struct syscall_metadata *)call->data)->name);
|
|
return -ENOSYS;
|
|
}
|
|
|
|
if (set_syscall_print_fmt(call) < 0)
|
|
return -ENOMEM;
|
|
|
|
id = trace_event_raw_init(call);
|
|
|
|
if (id < 0) {
|
|
free_syscall_print_fmt(call);
|
|
return id;
|
|
}
|
|
|
|
return id;
|
|
}
|
|
|
|
struct trace_event_functions enter_syscall_print_funcs = {
|
|
.trace = print_syscall_enter,
|
|
};
|
|
|
|
struct trace_event_functions exit_syscall_print_funcs = {
|
|
.trace = print_syscall_exit,
|
|
};
|
|
|
|
struct trace_event_class __refdata event_class_syscall_enter = {
|
|
.system = "syscalls",
|
|
.reg = syscall_enter_register,
|
|
.define_fields = syscall_enter_define_fields,
|
|
.get_fields = syscall_get_enter_fields,
|
|
.raw_init = init_syscall_trace,
|
|
};
|
|
|
|
struct trace_event_class __refdata event_class_syscall_exit = {
|
|
.system = "syscalls",
|
|
.reg = syscall_exit_register,
|
|
.define_fields = syscall_exit_define_fields,
|
|
.fields = LIST_HEAD_INIT(event_class_syscall_exit.fields),
|
|
.raw_init = init_syscall_trace,
|
|
};
|
|
|
|
unsigned long __init __weak arch_syscall_addr(int nr)
|
|
{
|
|
return (unsigned long)sys_call_table[nr];
|
|
}
|
|
|
|
void __init init_ftrace_syscalls(void)
|
|
{
|
|
struct syscall_metadata *meta;
|
|
unsigned long addr;
|
|
int i;
|
|
|
|
syscalls_metadata = kcalloc(NR_syscalls, sizeof(*syscalls_metadata),
|
|
GFP_KERNEL);
|
|
if (!syscalls_metadata) {
|
|
WARN_ON(1);
|
|
return;
|
|
}
|
|
|
|
for (i = 0; i < NR_syscalls; i++) {
|
|
addr = arch_syscall_addr(i);
|
|
meta = find_syscall_meta(addr);
|
|
if (!meta)
|
|
continue;
|
|
|
|
meta->syscall_nr = i;
|
|
syscalls_metadata[i] = meta;
|
|
}
|
|
}
|
|
|
|
#ifdef CONFIG_PERF_EVENTS
|
|
|
|
static DECLARE_BITMAP(enabled_perf_enter_syscalls, NR_syscalls);
|
|
static DECLARE_BITMAP(enabled_perf_exit_syscalls, NR_syscalls);
|
|
static int sys_perf_refcount_enter;
|
|
static int sys_perf_refcount_exit;
|
|
|
|
static void perf_syscall_enter(void *ignore, struct pt_regs *regs, long id)
|
|
{
|
|
struct syscall_metadata *sys_data;
|
|
struct syscall_trace_enter *rec;
|
|
struct hlist_head *head;
|
|
bool valid_prog_array;
|
|
int syscall_nr;
|
|
int rctx;
|
|
int size;
|
|
|
|
syscall_nr = trace_get_syscall_nr(current, regs);
|
|
if (syscall_nr < 0 || syscall_nr >= NR_syscalls)
|
|
return;
|
|
if (!test_bit(syscall_nr, enabled_perf_enter_syscalls))
|
|
return;
|
|
|
|
sys_data = syscall_nr_to_meta(syscall_nr);
|
|
if (!sys_data)
|
|
return;
|
|
|
|
head = this_cpu_ptr(sys_data->enter_event->perf_events);
|
|
valid_prog_array = bpf_prog_array_valid(sys_data->enter_event);
|
|
if (!valid_prog_array && hlist_empty(head))
|
|
return;
|
|
|
|
/* get the size after alignment with the u32 buffer size field */
|
|
size = sizeof(unsigned long) * sys_data->nb_args + sizeof(*rec);
|
|
size = ALIGN(size + sizeof(u32), sizeof(u64));
|
|
size -= sizeof(u32);
|
|
|
|
rec = perf_trace_buf_alloc(size, NULL, &rctx);
|
|
if (!rec)
|
|
return;
|
|
|
|
rec->nr = syscall_nr;
|
|
syscall_get_arguments(current, regs, 0, sys_data->nb_args,
|
|
(unsigned long *)&rec->args);
|
|
perf_trace_buf_submit(rec, size, rctx,
|
|
sys_data->enter_event->event.type, 1, regs,
|
|
head, NULL);
|
|
}
|
|
|
|
static int perf_sysenter_enable(struct trace_event_call *call)
|
|
{
|
|
int ret = 0;
|
|
int num;
|
|
|
|
num = ((struct syscall_metadata *)call->data)->syscall_nr;
|
|
|
|
mutex_lock(&syscall_trace_lock);
|
|
if (!sys_perf_refcount_enter)
|
|
ret = register_trace_sys_enter(perf_syscall_enter, NULL);
|
|
if (ret) {
|
|
pr_info("event trace: Could not activate syscall entry trace point");
|
|
} else {
|
|
set_bit(num, enabled_perf_enter_syscalls);
|
|
sys_perf_refcount_enter++;
|
|
}
|
|
mutex_unlock(&syscall_trace_lock);
|
|
return ret;
|
|
}
|
|
|
|
static void perf_sysenter_disable(struct trace_event_call *call)
|
|
{
|
|
int num;
|
|
|
|
num = ((struct syscall_metadata *)call->data)->syscall_nr;
|
|
|
|
mutex_lock(&syscall_trace_lock);
|
|
sys_perf_refcount_enter--;
|
|
clear_bit(num, enabled_perf_enter_syscalls);
|
|
if (!sys_perf_refcount_enter)
|
|
unregister_trace_sys_enter(perf_syscall_enter, NULL);
|
|
mutex_unlock(&syscall_trace_lock);
|
|
}
|
|
|
|
static void perf_syscall_exit(void *ignore, struct pt_regs *regs, long ret)
|
|
{
|
|
struct syscall_metadata *sys_data;
|
|
struct syscall_trace_exit *rec;
|
|
struct hlist_head *head;
|
|
bool valid_prog_array;
|
|
int syscall_nr;
|
|
int rctx;
|
|
int size;
|
|
|
|
syscall_nr = trace_get_syscall_nr(current, regs);
|
|
if (syscall_nr < 0 || syscall_nr >= NR_syscalls)
|
|
return;
|
|
if (!test_bit(syscall_nr, enabled_perf_exit_syscalls))
|
|
return;
|
|
|
|
sys_data = syscall_nr_to_meta(syscall_nr);
|
|
if (!sys_data)
|
|
return;
|
|
|
|
head = this_cpu_ptr(sys_data->exit_event->perf_events);
|
|
valid_prog_array = bpf_prog_array_valid(sys_data->exit_event);
|
|
if (!valid_prog_array && hlist_empty(head))
|
|
return;
|
|
|
|
/* We can probably do that at build time */
|
|
size = ALIGN(sizeof(*rec) + sizeof(u32), sizeof(u64));
|
|
size -= sizeof(u32);
|
|
|
|
rec = perf_trace_buf_alloc(size, NULL, &rctx);
|
|
if (!rec)
|
|
return;
|
|
|
|
rec->nr = syscall_nr;
|
|
rec->ret = syscall_get_return_value(current, regs);
|
|
perf_trace_buf_submit(rec, size, rctx, sys_data->exit_event->event.type,
|
|
1, regs, head, NULL);
|
|
}
|
|
|
|
static int perf_sysexit_enable(struct trace_event_call *call)
|
|
{
|
|
int ret = 0;
|
|
int num;
|
|
|
|
num = ((struct syscall_metadata *)call->data)->syscall_nr;
|
|
|
|
mutex_lock(&syscall_trace_lock);
|
|
if (!sys_perf_refcount_exit)
|
|
ret = register_trace_sys_exit(perf_syscall_exit, NULL);
|
|
if (ret) {
|
|
pr_info("event trace: Could not activate syscall exit trace point");
|
|
} else {
|
|
set_bit(num, enabled_perf_exit_syscalls);
|
|
sys_perf_refcount_exit++;
|
|
}
|
|
mutex_unlock(&syscall_trace_lock);
|
|
return ret;
|
|
}
|
|
|
|
static void perf_sysexit_disable(struct trace_event_call *call)
|
|
{
|
|
int num;
|
|
|
|
num = ((struct syscall_metadata *)call->data)->syscall_nr;
|
|
|
|
mutex_lock(&syscall_trace_lock);
|
|
sys_perf_refcount_exit--;
|
|
clear_bit(num, enabled_perf_exit_syscalls);
|
|
if (!sys_perf_refcount_exit)
|
|
unregister_trace_sys_exit(perf_syscall_exit, NULL);
|
|
mutex_unlock(&syscall_trace_lock);
|
|
}
|
|
|
|
#endif /* CONFIG_PERF_EVENTS */
|
|
|
|
static int syscall_enter_register(struct trace_event_call *event,
|
|
enum trace_reg type, void *data)
|
|
{
|
|
struct trace_event_file *file = data;
|
|
|
|
switch (type) {
|
|
case TRACE_REG_REGISTER:
|
|
return reg_event_syscall_enter(file, event);
|
|
case TRACE_REG_UNREGISTER:
|
|
unreg_event_syscall_enter(file, event);
|
|
return 0;
|
|
|
|
#ifdef CONFIG_PERF_EVENTS
|
|
case TRACE_REG_PERF_REGISTER:
|
|
return perf_sysenter_enable(event);
|
|
case TRACE_REG_PERF_UNREGISTER:
|
|
perf_sysenter_disable(event);
|
|
return 0;
|
|
case TRACE_REG_PERF_OPEN:
|
|
case TRACE_REG_PERF_CLOSE:
|
|
case TRACE_REG_PERF_ADD:
|
|
case TRACE_REG_PERF_DEL:
|
|
return 0;
|
|
#endif
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static int syscall_exit_register(struct trace_event_call *event,
|
|
enum trace_reg type, void *data)
|
|
{
|
|
struct trace_event_file *file = data;
|
|
|
|
switch (type) {
|
|
case TRACE_REG_REGISTER:
|
|
return reg_event_syscall_exit(file, event);
|
|
case TRACE_REG_UNREGISTER:
|
|
unreg_event_syscall_exit(file, event);
|
|
return 0;
|
|
|
|
#ifdef CONFIG_PERF_EVENTS
|
|
case TRACE_REG_PERF_REGISTER:
|
|
return perf_sysexit_enable(event);
|
|
case TRACE_REG_PERF_UNREGISTER:
|
|
perf_sysexit_disable(event);
|
|
return 0;
|
|
case TRACE_REG_PERF_OPEN:
|
|
case TRACE_REG_PERF_CLOSE:
|
|
case TRACE_REG_PERF_ADD:
|
|
case TRACE_REG_PERF_DEL:
|
|
return 0;
|
|
#endif
|
|
}
|
|
return 0;
|
|
}
|