linux/drivers/connector/cn_proc.c
<<
ue="3ue="3ue//spa.6.ue/spa. class="lxr_search">ue="ue="3ue="3ue="3typ Searchue="3ue//spa.6.="3< ue/input typ u="3< . /div id < <1//a>/spa. class="comment">/*//spa.6.< <2//a>/spa. class="comment"> * cn_proc.c - process events connector//spa.6.< <3//a>/spa. class="comment"> *//spa.6.< <4//a>/spa. class="comment"> * Copyright (C) Matt Helsley, IBM Corp. 2005//spa.6.< <5//a>/spa. class="comment"> * Based on cn_fork.c by Guillaume Thouvenin <guillaume.thouvenin@bull.net>//spa.6.< <6//a>/spa. class="comment"> * Original copyright notice follows://spa.6.< <7//a>/spa. class="comment"> * Copyright (C) 2005 BULL SA.//spa.6.< <8//a>/spa. class="comment"> *//spa.6.< <9//a>/spa. class="comment"> *//spa.6.< > a>/spa. class="comment"> * This program is free software; you ca. redistribute it and/or modify//spa.6.< 11//a>/spa. class="comment"> * it under the terms of the GNU General Public License as published by//spa.6.< 12//a>/spa. class="comment"> * the Free Software Founda v2.; either version>2 of the License, or//spa.6.< 13//a>/spa. class="comment"> * (at your v2.) any later version.//spa.6.< 14//a>/spa. class="comment"> *//spa.6.< 15//a>/spa. class="comment"> * This program is distributed in the hope that it will be useful,//spa.6.< 16//a>/spa. class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of//spa.6.< 17//a>/spa. class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the//spa.6.< 18//a>/spa. class="comment"> * GNU General Public License for more details.//spa.6.< 19//a>/spa. class="comment"> *//spa.6.< 2 a>/spa. class="comment"> * You should have received a copy of the GNU General Public License//spa.6.< 21//a>/spa. class="comment"> * along with this program; if not, write to the Free Software//spa.6.< 22//a>/spa. class="comment"> * Founda v2., Inc., 59 Temple Place, Suite 330, Bost2., MA 02111-1307 USA//spa.6.< 23//a>/spa. class="comment"> *///spa.6.< 24//a>.< 25//a>#include <linux/module.h//a>>.< 26//a>#include <linux/kernel.h//a>>.< 27//a>#include <linux/ktime.h//a>>.< 28//a>#include <linux/init.h//a>>.< 29//a>#include <linux/connector.h//a>>.< 30//a>#include <linux/gfp.h//a>>.< 31//a>#include <linux/ptrace.h//a>>.< 32//a>#include <linux/atomic.h//a>>.< 33//a>#include <linux/pid_nam space.h//a>>.< 34//a>.< 35//a>#include <asm/unaligned.h//a>>.< 36//a>.< 37//a>#include <linux/cn_proc.h//a>>.< 38//a>.< 39//a>#defineCN_PROC_MSG_SIZE//a> (sizeof(structcn_msg//a>) + sizeof(structproc_event//a>)).< 40//a>.< 41//a>staticatomic_t//a> /a href="+code=proc_event_num_listeners" class="sref">proc_event_num_listeners//a> = /a href="+code=ATOMIC_INIT" class="sref">ATOMIC_INIT//a>(0);.< 42//a>staticcb_id//a> /a href="+code=cn_proc_event_id" class="sref">cn_proc_event_id//a> = {CN_IDX_PROC//a>,CN_VAL_PROC//a> };.< 43//a>.< 44//a>/spa. class="comment">/* proc_event_counts is used as the sequence number of the netlink m ssage *///spa.6.< 45//a>staticDEFINE_PER_CPU//a>(/a href="+code=__u32" class="sref">__u32//a>,proc_event_counts//a>) = {<0 };.< 46//a>.< 47//a>staticinline//a> voidget_seq//a>(/a href="+code=__u32" class="sref">__u32//a> */a href="+code=ts" class="sref">ts//a>, int */a href="+code=cpu" class="sref">cpu//a>).< 48//a>{.< 49//a> /a href="+code=preempt_disable" class="sref">preempt_disable//a>();.< 50//a> */a href="+code=ts" class="sref">ts//a> = /a href="+code=__this_cpu_inc_return" class="sref">__this_cpu_inc_return//a>(/a href="+code=proc_event_counts" class="sref">proc_event_counts//a>) - 1;.< 51//a> */a href="+code=cpu" class="sref">cpu//a> = /a href="+code=smp_processor_id" class="sref">smp_processor_id//a>();.< 52//a> /a href="+code=preempt_enable" class="sref">preempt_enable//a>();.< 53//a>}.< 54//a>.< 55//a>voidproc_fork_connector//a>(structtask_struct//a> */a href="+code=task" class="sref">task//a>).< 56//a>{.< 57//a> structcn_msg//a> */a href="+code=msg" class="sref">msg//a>;.< 58//a> structproc_event//a> */a href="+code=ev" class="sref">ev//a>;.< 59//a> /a href="+code=__u8" class="sref">__u8//a> /a href="+code=buffer" class="sref">buffer//a>[/a href="+code=CN_PROC_MSG_SIZE" class="sref">CN_PROC_MSG_SIZE//a>];.< 60//a> structtimespec//a> /a href="+code=ts" class="sref">ts//a>;.< 61//a> structtask_struct//a> */a href="+code=parent" class="sref">parent//a>;.< 62//a>.< 63//a> if (/a href="+code=atomic_read" class="sref">atomic_read//a>(&/a href="+code=proc_event_num_listeners" class="sref">proc_event_num_listeners//a>) < 1).< 64//a> return;.< 65//a>.< 66//a> /a href="+code=msg" class="sref">msg//a> = (structcn_msg//a> *)/a href="+code=buffer" class="sref">buffer//a>;.< 67//a> /a href="+code=ev" class="sref">ev//a> = (structproc_event//a> *)/a href="+code=msg" class="sref">msg//a>->/a href="+code=data" class="sref">data//a>;.< 68//a> /a href="+code=memset" class="sref">memset//a>(&/a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>, 0, sizeof(/a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>));.< 69//a> /a href="+code=get_seq" class="sref">get_seq//a>(&/a href="+code=msg" class="sref">msg//a>->/a href="+code=seq" class="sref">seq//a>, &/a href="+code=ev" class="sref">ev//a>->/a href="+code=cpu" class="sref">cpu//a>);.< 70//a> /a href="+code=ktime_get_ts" class="sref">ktime_get_ts//a>(&/a href="+code=ts" class="sref">ts//a>); /spa. class="comment">/* get high res monotonic timestamp *///spa.6.< 71//a> /a href="+code=put_unaligned" class="sref">put_unaligned//a>(/a href="+code=timespec_to_ns" class="sref">timespec_to_ns//a>(&/a href="+code=ts" class="sref">ts//a>), (/a href="+code=__u64" class="sref">__u64//a> *)&/a href="+code=ev" class="sref">ev//a>->/a href="+code=timestamp_ns" class="sref">timestamp_ns//a>);.< 72//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=what" class="sref">what//a> = /a href="+code=PROC_EVENT_FORK" class="sref">PROC_EVENT_FORK//a>;.< 73//a> /a href="+code=rcu_read_lock" class="sref">rcu_read_lock//a>();.< 74//a> /a href="+code=parent" class="sref">parent//a> = /a href="+code=rcu_dereference" class="sref">rcu_dereference//a>(/a href="+code=task" class="sref">task//a>->/a href="+code=real_parent" class="sref">real_parent//a>);.< 75//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=fork" class="sref">fork//a>./a href="+code=parent_pid" class="sref">parent_pid//a> = /a href="+code=parent" class="sref">parent//a>->/a href="+code=pid" class="sref">pid//a>;.< 76//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=fork" class="sref">fork//a>./a href="+code=parent_tgid" class="sref">parent_tgid//a> = /a href="+code=parent" class="sref">parent//a>->/a href="+code=tgid" class="sref">tgid//a>;.< 77//a> /a href="+code=rcu_read_unlock" class="sref">rcu_read_unlock//a>();.< 78//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=fork" class="sref">fork//a>./a href="+code=child_pid" class="sref">child_pid//a> = /a href="+code=task" class="sref">task//a>->/a href="+code=pid" class="sref">pid//a>;.< 79//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=fork" class="sref">fork//a>./a href="+code=child_tgid" class="sref">child_tgid//a> = /a href="+code=task" class="sref">task//a>->/a href="+code=tgid" class="sref">tgid//a>;.< 80//a>.< 81//a> /a href="+code=memcpy" class="sref">memcpy//a>(&/a href="+code=msg" class="sref">msg//a>->/a href="+code=id" class="sref">id//a>, &/a href="+code=cn_proc_event_id" class="sref">cn_proc_event_id//a>, sizeof(/a href="+code=msg" class="sref">msg//a>->/a href="+code=id" class="sref">id//a>));.< 82//a> /a href="+code=msg" class="sref">msg//a>->/a href="+code=ack" class="sref">ack//a> = 0; /spa. class="comment">/* not used *///spa.6.< 83//a> /a href="+code=msg" class="sref">msg//a>->/a href="+code=len" class="sref">len//a> = sizeof(*/a href="+code=ev" class="sref">ev//a>);.< 84//a> /a href="+code=msg" class="sref">msg//a>->/a href="+code=flags" class="sref">flags//a> = 0; /spa. class="comment">/* not used *///spa.6.< 85//a> /spa. class="comment">/* If cn_netlink_send() failed, the data is not sent *///spa.6.< 86//a> /a href="+code=cn_netlink_send" class="sref">cn_netlink_send//a>(/a href="+code=msg" class="sref">msg//a>,CN_IDX_PROC//a>,GFP_KERNEL//a>);.< 87//a>}.< 88//a>.< 89//a>voidproc_exec_connector//a>(structtask_struct//a> */a href="+code=task" class="sref">task//a>).< 90//a>{.< 91//a> structcn_msg//a> */a href="+code=msg" class="sref">msg//a>;.< 92//a> structproc_event//a> */a href="+code=ev" class="sref">ev//a>;.< 93//a> structtimespec//a> /a href="+code=ts" class="sref">ts//a>;.< 94//a> /a href="+code=__u8" class="sref">__u8//a> /a href="+code=buffer" class="sref">buffer//a>[/a href="+code=CN_PROC_MSG_SIZE" class="sref">CN_PROC_MSG_SIZE//a>];.< 95//a>.< 96//a> if (/a href="+code=atomic_read" class="sref">atomic_read//a>(&/a href="+code=proc_event_num_listeners" class="sref">proc_event_num_listeners//a>) < 1).< 97//a> return;.< 98//a>.< 99//a> /a href="+code=msg" class="sref">msg//a> = (structcn_msg//a> *)/a href="+code=buffer" class="sref">buffer//a>;.<100//a> /a href="+code=ev" class="sref">ev//a> = (structproc_event//a> *)/a href="+code=msg" class="sref">msg//a>->/a href="+code=data" class="sref">data//a>;.<101//a> /a href="+code=memset" class="sref">memset//a>(&/a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>, 0, sizeof(/a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>));.<102//a> /a href="+code=get_seq" class="sref">get_seq//a>(&/a href="+code=msg" class="sref">msg//a>->/a href="+code=seq" class="sref">seq//a>, &/a href="+code=ev" class="sref">ev//a>->/a href="+code=cpu" class="sref">cpu//a>);.<103//a> /a href="+code=ktime_get_ts" class="sref">ktime_get_ts//a>(&/a href="+code=ts" class="sref">ts//a>); /spa. class="comment">/* get high res monotonic timestamp *///spa.6.<104//a> /a href="+code=put_unaligned" class="sref">put_unaligned//a>(/a href="+code=timespec_to_ns" class="sref">timespec_to_ns//a>(&/a href="+code=ts" class="sref">ts//a>), (/a href="+code=__u64" class="sref">__u64//a> *)&/a href="+code=ev" class="sref">ev//a>->/a href="+code=timestamp_ns" class="sref">timestamp_ns//a>);.<105//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=what" class="sref">what//a> = /a href="+code=PROC_EVENT_EXEC" class="sref">PROC_EVENT_EXEC//a>;.<106//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=exec" class="sref">exec//a>./a href="+code=process_pid" class="sref">process_pid//a> = /a href="+code=task" class="sref">task//a>->/a href="+code=pid" class="sref">pid//a>;.<107//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=exec" class="sref">exec//a>./a href="+code=process_tgid" class="sref">process_tgid//a> = /a href="+code=task" class="sref">task//a>->/a href="+code=tgid" class="sref">tgid//a>;.<108//a>.<109//a> /a href="+code=memcpy" class="sref">memcpy//a>(&/a href="+code=msg" class="sref">msg//a>->/a href="+code=id" class="sref">id//a>, &/a href="+code=cn_proc_event_id" class="sref">cn_proc_event_id//a>, sizeof(/a href="+code=msg" class="sref">msg//a>->/a href="+code=id" class="sref">id//a>));.<110//a> /a href="+code=msg" class="sref">msg//a>->/a href="+code=ack" class="sref">ack//a> = 0; /spa. class="comment">/* not used *///spa.6.<111//a> /a href="+code=msg" class="sref">msg//a>->/a href="+code=len" class="sref">len//a> = sizeof(*/a href="+code=ev" class="sref">ev//a>);.<112//a> /a href="+code=msg" class="sref">msg//a>->/a href="+code=flags" class="sref">flags//a> = 0; /spa. class="comment">/* not used *///spa.6.<113//a> /a href="+code=cn_netlink_send" class="sref">cn_netlink_send//a>(/a href="+code=msg" class="sref">msg//a>,CN_IDX_PROC//a>,GFP_KERNEL//a>);.<114//a>}.<115//a>.<116//a>voidproc_id_connector//a>(structtask_struct//a> */a href="+code=task" class="sref">task//a>, int /a href="+code=which_id" class="sref">which_id//a>).<117//a>{.<118//a> structcn_msg//a> */a href="+code=msg" class="sref">msg//a>;.<119//a> structproc_event//a> */a href="+code=ev" class="sref">ev//a>;.<120//a> /a href="+code=__u8" class="sref">__u8//a> /a href="+code=buffer" class="sref">buffer//a>[/a href="+code=CN_PROC_MSG_SIZE" class="sref">CN_PROC_MSG_SIZE//a>];.<121//a> structtimespec//a> /a href="+code=ts" class="sref">ts//a>;.<122//a> const structcred//a> */a href="+code=cred" class="sref">cred//a>;.<123//a>.<124//a> if (/a href="+code=atomic_read" class="sref">atomic_read//a>(&/a href="+code=proc_event_num_listeners" class="sref">proc_event_num_listeners//a>) < 1).<125//a> return;.<126//a>.<127//a> /a href="+code=msg" class="sref">msg//a> = (structcn_msg//a> *)/a href="+code=buffer" class="sref">buffer//a>;.<128//a> /a href="+code=ev" class="sref">ev//a> = (structproc_event//a> *)/a href="+code=msg" class="sref">msg//a>->/a href="+code=data" class="sref">data//a>;.<129//a> /a href="+code=memset" class="sref">memset//a>(&/a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>, 0, sizeof(/a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>));.<130//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=what" class="sref">what//a> = /a href="+code=which_id" class="sref">which_id//a>;.<131//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=id" class="sref">id//a>./a href="+code=process_pid" class="sref">process_pid//a> = /a href="+code=task" class="sref">task//a>->/a href="+code=pid" class="sref">pid//a>;.<132//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=id" class="sref">id//a>./a href="+code=process_tgid" class="sref">process_tgid//a> = /a href="+code=task" class="sref">task//a>->/a href="+code=tgid" class="sref">tgid//a>;.<133//a> /a href="+code=rcu_read_lock" class="sref">rcu_read_lock//a>();.<134//a> /a href="+code=cred" class="sref">cred//a> = /a href="+code=__task_cred" class="sref">__task_cred//a>(/a href="+code=task" class="sref">task//a>);.<135//a> if (/a href="+code=which_id" class="sref">which_id//a> == /a href="+code=PROC_EVENT_UID" class="sref">PROC_EVENT_UID//a>) {.<136//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=id" class="sref">id//a>./a href="+code=r" class="sref">r//a>./a href="+code=ruid" class="sref">ruid//a> = /a href="+code=from_kuid_munged" class="sref">from_kuid_munged//a>(&/a href="+code=init_user_ns" class="sref">init_user_ns//a>,cred//a>->/a href="+code=uid" class="sref">uid//a>);.<137//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=id" class="sref">id//a>./a href="+code=e" class="sref">e//a>./a href="+code=euid" class="sref">euid//a> = /a href="+code=from_kuid_munged" class="sref">from_kuid_munged//a>(&/a href="+code=init_user_ns" class="sref">init_user_ns//a>,cred//a>->/a href="+code=euid" class="sref">euid//a>);.<138//a> } else if (/a href="+code=which_id" class="sref">which_id//a> == /a href="+code=PROC_EVENT_GID" class="sref">PROC_EVENT_GID//a>) {.<139//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=id" class="sref">id//a>./a href="+code=r" class="sref">r//a>./a href="+code=rgid" class="sref">rgid//a> = /a href="+code=from_kgid_munged" class="sref">from_kgid_munged//a>(&/a href="+code=init_user_ns" class="sref">init_user_ns//a>,cred//a>->/a href="+code=gid" class="sref">gid//a>);.<140//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=id" class="sref">id//a>./a href="+code=e" class="sref">e//a>./a href="+code=egid" class="sref">egid//a> = /a href="+code=from_kgid_munged" class="sref">from_kgid_munged//a>(&/a href="+code=init_user_ns" class="sref">init_user_ns//a>,cred//a>->/a href="+code=egid" class="sref">egid//a>);.<141//a> } else {.<142//a> /a href="+code=rcu_read_unlock" class="sref">rcu_read_unlock//a>();.<143//a> return;.<144//a> }.<145//a> /a href="+code=rcu_read_unlock" class="sref">rcu_read_unlock//a>();.<146//a> /a href="+code=get_seq" class="sref">get_seq//a>(&/a href="+code=msg" class="sref">msg//a>->/a href="+code=seq" class="sref">seq//a>, &/a href="+code=ev" class="sref">ev//a>->/a href="+code=cpu" class="sref">cpu//a>);.<147//a> /a href="+code=ktime_get_ts" class="sref">ktime_get_ts//a>(&/a href="+code=ts" class="sref">ts//a>); /spa. class="comment">/* get high res monotonic timestamp *///spa.6.<148//a> /a href="+code=put_unaligned" class="sref">put_unaligned//a>(/a href="+code=timespec_to_ns" class="sref">timespec_to_ns//a>(&/a href="+code=ts" class="sref">ts//a>), (/a href="+code=__u64" class="sref">__u64//a> *)&/a href="+code=ev" class="sref">ev//a>->/a href="+code=timestamp_ns" class="sref">timestamp_ns//a>);.<149//a>.<150//a> /a href="+code=memcpy" class="sref">memcpy//a>(&/a href="+code=msg" class="sref">msg//a>->/a href="+code=id" class="sref">id//a>, &/a href="+code=cn_proc_event_id" class="sref">cn_proc_event_id//a>, sizeof(/a href="+code=msg" class="sref">msg//a>->/a href="+code=id" class="sref">id//a>));.<151//a> /a href="+code=msg" class="sref">msg//a>->/a href="+code=ack" class="sref">ack//a> = 0; /spa. class="comment">/* not used *///spa.6.<152//a> /a href="+code=msg" class="sref">msg//a>->/a href="+code=len" class="sref">len//a> = sizeof(*/a href="+code=ev" class="sref">ev//a>);.<153//a> /a href="+code=msg" class="sref">msg//a>->/a href="+code=flags" class="sref">flags//a> = 0; /spa. class="comment">/* not used *///spa.6.<154//a> /a href="+code=cn_netlink_send" class="sref">cn_netlink_send//a>(/a href="+code=msg" class="sref">msg//a>,CN_IDX_PROC//a>,GFP_KERNEL//a>);.<155//a>}.<156//a>.<157//a>voidproc_sid_connector//a>(structtask_struct//a> */a href="+code=task" class="sref">task//a>).<158//a>{.<159//a> structcn_msg//a> */a href="+code=msg" class="sref">msg//a>;.<160//a> structproc_event//a> */a href="+code=ev" class="sref">ev//a>;.<161//a> structtimespec//a> /a href="+code=ts" class="sref">ts//a>;.<162//a> /a href="+code=__u8" class="sref">__u8//a> /a href="+code=buffer" class="sref">buffer//a>[/a href="+code=CN_PROC_MSG_SIZE" class="sref">CN_PROC_MSG_SIZE//a>];.<163//a>.<164//a> if (/a href="+code=atomic_read" class="sref">atomic_read//a>(&/a href="+code=proc_event_num_listeners" class="sref">proc_event_num_listeners//a>) < 1).<165//a> return;.<166//a>.<167//a> /a href="+code=msg" class="sref">msg//a> = (structcn_msg//a> *)/a href="+code=buffer" class="sref">buffer//a>;.<168//a> /a href="+code=ev" class="sref">ev//a> = (structproc_event//a> *)/a href="+code=msg" class="sref">msg//a>->/a href="+code=data" class="sref">data//a>;.<169//a> /a href="+code=memset" class="sref">memset//a>(&/a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>, 0, sizeof(/a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>));.<170//a> /a href="+code=get_seq" class="sref">get_seq//a>(&/a href="+code=msg" class="sref">msg//a>->/a href="+code=seq" class="sref">seq//a>, &/a href="+code=ev" class="sref">ev//a>->/a href="+code=cpu" class="sref">cpu//a>);.<171//a> /a href="+code=ktime_get_ts" class="sref">ktime_get_ts//a>(&/a href="+code=ts" class="sref">ts//a>); /spa. class="comment">/* get high res monotonic timestamp *///spa.6.<172//a> /a href="+code=put_unaligned" class="sref">put_unaligned//a>(/a href="+code=timespec_to_ns" class="sref">timespec_to_ns//a>(&/a href="+code=ts" class="sref">ts//a>), (/a href="+code=__u64" class="sref">__u64//a> *)&/a href="+code=ev" class="sref">ev//a>->/a href="+code=timestamp_ns" class="sref">timestamp_ns//a>);.<173//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=what" class="sref">what//a> = /a href="+code=PROC_EVENT_SID" class="sref">PROC_EVENT_SID//a>;.<174//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=sid" class="sref">sid//a>./a href="+code=process_pid" class="sref">process_pid//a> = /a href="+code=task" class="sref">task//a>->/a href="+code=pid" class="sref">pid//a>;.<175//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=sid" class="sref">sid//a>./a href="+code=process_tgid" class="sref">process_tgid//a> = /a href="+code=task" class="sref">task//a>->/a href="+code=tgid" class="sref">tgid//a>;.<176//a>.<177//a> /a href="+code=memcpy" class="sref">memcpy//a>(&/a href="+code=msg" class="sref">msg//a>->/a href="+code=id" class="sref">id//a>, &/a href="+code=cn_proc_event_id" class="sref">cn_proc_event_id//a>, sizeof(/a href="+code=msg" class="sref">msg//a>->/a href="+code=id" class="sref">id//a>));.<178//a> /a href="+code=msg" class="sref">msg//a>->/a href="+code=ack" class="sref">ack//a> = 0; /spa. class="comment">/* not used *///spa.6.<179//a> /a href="+code=msg" class="sref">msg//a>->/a href="+code=len" class="sref">len//a> = sizeof(*/a href="+code=ev" class="sref">ev//a>);.<180//a> /a href="+code=msg" class="sref">msg//a>->/a href="+code=flags" class="sref">flags//a> = 0; /spa. class="comment">/* not used *///spa.6.<181//a> /a href="+code=cn_netlink_send" class="sref">cn_netlink_send//a>(/a href="+code=msg" class="sref">msg//a>,CN_IDX_PROC//a>,GFP_KERNEL//a>);.<182//a>}.<183//a>.<184//a>voidproc_ptrace_connector//a>(structtask_struct//a> */a href="+code=task" class="sref">task//a>, int /a href="+code=ptrace_id" class="sref">ptrace_id//a>).<185//a>{.<186//a> structcn_msg//a> */a href="+code=msg" class="sref">msg//a>;.<187//a> structproc_event//a> */a href="+code=ev" class="sref">ev//a>;.<188//a> structtimespec//a> /a href="+code=ts" class="sref">ts//a>;.<189//a> /a href="+code=__u8" class="sref">__u8//a> /a href="+code=buffer" class="sref">buffer//a>[/a href="+code=CN_PROC_MSG_SIZE" class="sref">CN_PROC_MSG_SIZE//a>];.<190//a>.<191//a> if (/a href="+code=atomic_read" class="sref">atomic_read//a>(&/a href="+code=proc_event_num_listeners" class="sref">proc_event_num_listeners//a>) < 1).<192//a> return;.<193//a>.<194//a> /a href="+code=msg" class="sref">msg//a> = (structcn_msg//a> *)/a href="+code=buffer" class="sref">buffer//a>;.<195//a> /a href="+code=ev" class="sref">ev//a> = (structproc_event//a> *)/a href="+code=msg" class="sref">msg//a>->/a href="+code=data" class="sref">data//a>;.<196//a> /a href="+code=memset" class="sref">memset//a>(&/a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>, 0, sizeof(/a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>));.<197//a> /a href="+code=get_seq" class="sref">get_seq//a>(&/a href="+code=msg" class="sref">msg//a>->/a href="+code=seq" class="sref">seq//a>, &/a href="+code=ev" class="sref">ev//a>->/a href="+code=cpu" class="sref">cpu//a>);.<198//a> /a href="+code=ktime_get_ts" class="sref">ktime_get_ts//a>(&/a href="+code=ts" class="sref">ts//a>); /spa. class="comment">/* get high res monotonic timestamp *///spa.6.<199//a> /a href="+code=put_unaligned" class="sref">put_unaligned//a>(/a href="+code=timespec_to_ns" class="sref">timespec_to_ns//a>(&/a href="+code=ts" class="sref">ts//a>), (/a href="+code=__u64" class="sref">__u64//a> *)&/a href="+code=ev" class="sref">ev//a>->/a href="+code=timestamp_ns" class="sref">timestamp_ns//a>);.<200//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=what" class="sref">what//a> = /a href="+code=PROC_EVENT_PTRACE" class="sref">PROC_EVENT_PTRACE//a>;.<201//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=ptrace" class="sref">ptrace//a>./a href="+code=process_pid" class="sref">process_pid//a> = /a href="+code=task" class="sref">task//a>->/a href="+code=pid" class="sref">pid//a>;.<202//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=ptrace" class="sref">ptrace//a>./a href="+code=process_tgid" class="sref">process_tgid//a> = /a href="+code=task" class="sref">task//a>->/a href="+code=tgid" class="sref">tgid//a>;.<203//a> if (/a href="+code=ptrace_id" class="sref">ptrace_id//a> == /a href="+code=PTRACE_ATTACH" class="sref">PTRACE_ATTACH//a>) {.<204//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=ptrace" class="sref">ptrace//a>./a href="+code=tracer_pid" class="sref">tracer_pid//a> = /a href="+code=current" class="sref">current//a>->/a href="+code=pid" class="sref">pid//a>;.<205//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=ptrace" class="sref">ptrace//a>./a href="+code=tracer_tgid" class="sref">tracer_tgid//a> = /a href="+code=current" class="sref">current//a>->/a href="+code=tgid" class="sref">tgid//a>;.<206//a> } else if (/a href="+code=ptrace_id" class="sref">ptrace_id//a> == /a href="+code=PTRACE_DETACH" class="sref">PTRACE_DETACH//a>) {.<207//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=ptrace" class="sref">ptrace//a>./a href="+code=tracer_pid" class="sref">tracer_pid//a> = 0;.<208//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=ptrace" class="sref">ptrace//a>./a href="+code=tracer_tgid" class="sref">tracer_tgid//a> = 0;.<209//a> } else.<210//a> return;.<211//a>.<212//a> /a href="+code=memcpy" class="sref">memcpy//a>(&/a href="+code=msg" class="sref">msg//a>->/a href="+code=id" class="sref">id//a>, &/a href="+code=cn_proc_event_id" class="sref">cn_proc_event_id//a>, sizeof(/a href="+code=msg" class="sref">msg//a>->/a href="+code=id" class="sref">id//a>));.<213//a> /a href="+code=msg" class="sref">msg//a>->/a href="+code=ack" class="sref">ack//a> = 0; /spa. class="comment">/* not used *///spa.6.<214//a> /a href="+code=msg" class="sref">msg//a>->/a href="+code=len" class="sref">len//a> = sizeof(*/a href="+code=ev" class="sref">ev//a>);.<215//a> /a href="+code=msg" class="sref">msg//a>->/a href="+code=flags" class="sref">flags//a> = 0; /spa. class="comment">/* not used *///spa.6.<216//a> /a href="+code=cn_netlink_send" class="sref">cn_netlink_send//a>(/a href="+code=msg" class="sref">msg//a>,CN_IDX_PROC//a>,GFP_KERNEL//a>);.<217//a>}.<218//a>.<219//a>voidproc_comm_connector//a>(structtask_struct//a> */a href="+code=task" class="sref">task//a>).<220//a>{.<221//a> structcn_msg//a> */a href="+code=msg" class="sref">msg//a>;.<222//a> structproc_event//a> */a href="+code=ev" class="sref">ev//a>;.<223//a> structtimespec//a> /a href="+code=ts" class="sref">ts//a>;.<224//a> /a href="+code=__u8" class="sref">__u8//a> /a href="+code=buffer" class="sref">buffer//a>[/a href="+code=CN_PROC_MSG_SIZE" class="sref">CN_PROC_MSG_SIZE//a>];.<225//a>.<226//a> if (/a href="+code=atomic_read" class="sref">atomic_read//a>(&/a href="+code=proc_event_num_listeners" class="sref">proc_event_num_listeners//a>) < 1).<227//a> return;.<228//a>.<229//a> /a href="+code=msg" class="sref">msg//a> = (structcn_msg//a> *)/a href="+code=buffer" class="sref">buffer//a>;.<230//a> /a href="+code=ev" class="sref">ev//a> = (structproc_event//a> *)/a href="+code=msg" class="sref">msg//a>->/a href="+code=data" class="sref">data//a>;.<231//a> /a href="+code=memset" class="sref">memset//a>(&/a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>, 0, sizeof(/a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>));.<232//a> /a href="+code=get_seq" class="sref">get_seq//a>(&/a href="+code=msg" class="sref">msg//a>->/a href="+code=seq" class="sref">seq//a>, &/a href="+code=ev" class="sref">ev//a>->/a href="+code=cpu" class="sref">cpu//a>);.<233//a> /a href="+code=ktime_get_ts" class="sref">ktime_get_ts//a>(&/a href="+code=ts" class="sref">ts//a>); /spa. class="comment">/* get high res monotonic timestamp *///spa.6.<234//a> /a href="+code=put_unaligned" class="sref">put_unaligned//a>(/a href="+code=timespec_to_ns" class="sref">timespec_to_ns//a>(&/a href="+code=ts" class="sref">ts//a>), (/a href="+code=__u64" class="sref">__u64//a> *)&/a href="+code=ev" class="sref">ev//a>->/a href="+code=timestamp_ns" class="sref">timestamp_ns//a>);.<235//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=what" class="sref">what//a> = /a href="+code=PROC_EVENT_COMM" class="sref">PROC_EVENT_COMM//a>;.<236//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=comm" class="sref">comm//a>./a href="+code=process_pid" class="sref">process_pid//a> = /a href="+code=task" class="sref">task//a>->/a href="+code=pid" class="sref">pid//a>;.<237//a> /a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=comm" class="sref">comm//a>./a href="+code=process_tgid" class="sref">process_tgid//a> = /a href="+code=task" class="sref">task//a>->/a href="+code=tgid" class="sref">tgid//a>;.<238//a> /a href="+code=get_task_comm" class="sref">get_task_comm//a>(/a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>./a href="+code=comm" class="sref">comm//a>./a href="+code=comm" class="sref">comm//a>,task//a>);.<239//a>.<240//a> /a href="+code=memcpy" class="sref">memcpy//a>(&/a href="+code=msg" class="sref">msg//a>->/a href="+code=id" class="sref">id//a>, &/a href="+code=cn_proc_event_id" class="sref">cn_proc_event_id//a>, sizeof(/a href="+code=msg" class="sref">msg//a>->/a href="+code=id" class="sref">id//a>));.<241//a> /a href="+code=msg" class="sref">msg//a>->/a href="+code=ack" class="sref">ack//a> = 0; /spa. class="comment">/* not used *///spa.6.<242//a> /a href="+code=msg" class="sref">msg//a>->/a href="+code=len" class="sref">len//a> = sizeof(*/a href="+code=ev" class="sref">ev//a>);.<243//a> /a href="+code=msg" class="sref">msg//a>->/a href="+code=flags" class="sref">flags//a> = 0; /spa. class="comment">/* not used *///spa.6.<244//a> /a href="+code=cn_netlink_send" class="sref">cn_netlink_send//a>(/a href="+code=msg" class="sref">msg//a>,CN_IDX_PROC//a>,GFP_KERNEL//a>);.<245//a>}.<246//a>.<247//a>voidproc_coredump_connector//a>(structtask_struct//a> */a href="+code=task" class="sref">task//a>).<248//a>{.<249//a> structcn_msg//a> */a href="+code=msg" class="sref">msg//a>;.<250//a> structproc_event//a> */a href="+code=ev" class="sref">ev//a>;.<251//a> /a href="+code=__u8" class="sref">__u8//a> /a href="+code=buffer" class="sref">buffer//a>[/a href="+code=CN_PROC_MSG_SIZE" class="sref">CN_PROC_MSG_SIZE//a>];.las8"><248//a>{.buffer//a>ode=CNt;/a href="+code=flags" class="s9" id ts//a>), (/a 2ROC_MSG_SIZE//a>];.ts//a>), (/a 2;/a href="+code=proc_event_num_listeners" class="sref">proc_event_num_listeners//a>) < 1).<227//a> re/connecto2/cn_proc.c#L156" id <166//a>.<157//a>voidcn_msg//a> *)/a href="+code=buffer" class="sref">buffer//a>;.<168//a> /a href="2/connecto2/cn_proc.c#L159" id proc_event//a> *)/a href="+code=msg" class="sref">msg//a>->/a href="+code=data" class="sref">data//a>;.<169//a> /a href="2href="+co2e=cn_msg" class="sref">c2_msg/25/a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>, 0, sizeof(/a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>));.<232//a> /a href="+href="+co2e=proc_event" class="sre2">pro26p;/a href="+code=msg" class="sref">msg//a>->/a href="+code=seq" class="sref">seq//a>, &/a href="+code=ev" class="sref">ev//a>->/a href="+code=cpu" class="sref">cpu//a>);.<232//a> /a href="+hode=__u8"e=timespec" class="sref"2times26+code=buffer" class="sref">bs" class="sref">ts//a>); /spa. class="comment">/* get high res monotonic timestamp *///spa.6.<234//a> /a href="+code=__u82 class="sref">__u8//a> /2 href2"+code=buffer" class="sref">bspec_to_ns" class="sref">timespec_to_ns//a>(&/a href="+code=ts" class="sref">ts//a>), (/a href="+code=__u64" class="sref">__u64//a> *)&/a href="+code=ev" class="sref">ev//a>->/a href="+code=timestamp_ns" class="sref">timestamp_ns//a>);.<235//a> /a href="+connector2cn_proc.c#L164" id what//a> = /a href="+code=PROC_EVENT_SID" class="sref">PROC_EVENT_SID//a>;.<169//a> /a href="2f="+code=2tomic_read" class="sref"2atomi26ink_send//a>(/a href="+code=f">event_data//a>./a href="+code=comm" class="sref">comm//a>./a href="+code=comm" class="sref">comm/ef">taa>);.ta/a href="+code=task" class="sref">task//a>->/a href="+code=id" class="sref">pid//a>;.<237//a> /a href="+turn;.event_data//a>./a href="+code=sid" class="sref">sid//a>./a href="+code=process_tgid" class="srem/ef">taa>);.ta/a href="+code=task" class=""sref">task//a>->/a href="+code=tgid" class="sref">tgid//a>;.<238//a> /a href="+connector2cn_proc.c#L167" id <167//a> /a href="2code=msg"2class="sref">msg//a> = (2truct2/a href="+code=cn_msg" class="ef">msg//a>->/a href="+code=id" class="sref">id//a>, &/a href="+code=cn_proc_event_id" class="sref">cn_proc_event_id//a>, sizeof(/a href="+code=msg" class="sref">msg//a>->/a href="+code=id" class="sref">id//a>));.<241//a> /a href="+code=ev" 2lass="sref">ev//a> = (st2uct = 0; /spa. class="comment">/* not used *///spa.6.<242//a> /a href="+code=mems2t" class="sref">memset//2>(&am2;/a href="+code=ev" class="sre//a> = sizeof(*/a href="+code=ev" class="sref">ev//a>);.<243//a> /a href="+code=get_2eq" class="sref">get_seq2/a>(&2mp;/a href="+code=msg" class=flags//a> = 0; /spa. class="comment">/* not used *///spa.6.<244//a> /a href="+code=ktim2_get_ts" class="sref">kt2me_ge2_ts//a>(&/a href="+code=tmsg" class="sref">msg//a>,CN_IDX_PROC//a>,GFP_KERNEL//a>);.<245//a>}.p2t_una27="line" nam <183//a>.ev//a>->/2 href27ref="drivers/conne/a> /a href="+code=kcode=ev" 2lass="sref">ev//a>->/2 href27_ptrace_connector//a>(struct */a href="+code=task" class="sref">task//a>).<248//a>{.ev//a>->/2 href27="line" nam <186//a> struct */a href="+code=msg" class="sref">msg//a>;.<187//a> structmemcpy//2>(&am2;/a href="+cod href="+code=ev" class="sref">ev//a>;.<251//a> /a href="+code=msg"2class="sref">msg//a>->2/a hr2f="+code=ack" class="sref">acuffer//a>[/a href="+code=CN_PROC_MSG_SIZE" class="sref">CN_PROC_MSG_SIZE//a>];.msg//a>->2/a hr27> */a href="+code=msg" class="sref"ROC" clr" class="sref">buffer//a>ode=CNt;/a href="+code=flags" class="s9" id msg//a>->2/a hr28"line" nam <191//a> if (/a hr2code=cn_n2tlink_send" class="sref"2cn_ne2link_send//a>(;/a href="+code=proc_event_num_listeners" class="sref">proc_event_num_listeners//a>) < 1).<227//a> re/connecto2/cn_proc.c#L183" id <193//a>.<184//a>voidpr28a href="+code=cn_msg" class="sref">cn_msg//a> *)/a href="+code=buffer" class="sref">buffer//a>;.<195//a> /a href="2/connecto2/cn_proc.c#L186" id proc_event//a> *)/a href="+code=msg" class="sref">msg//a>->/a href="+code=data" class="sref">data//a>;.<196//a> /a href="2href="+co2e=cn_msg" class="sref">c2_msg/28+code=event_data" class="sreef">ev//a>->/a href="+code=event_data" class="sref">event_data//a>, 0, sizeof(/a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>));.<196//a> /a href="2hode=memc2e=proc_event" class="sre2">pro28a href="+code=cn_msg" class="sref">msg//a>->/a href="+code=seq" class="sref">seq//a>, &/a href="+code=ev" class="sref">ev//a>->/a href="+code=cpu" class="sref">cpu//a>);.<232//a> /a href="+href="+co2e=timespec" class="sref"2times28ts//a>(&/a href="+code=ts" class="sref">ts//a>); /spa. class="comment">/* get high res monotonic timestamp *///spa.6.<199//a> /a href="2code=__u82 class="sref">__u8//a> /2 href2"+code=buffer" class="sref">bspec_to_ns" class="sref">timespec_to_ns//a>(&/a href="+code=ts" class="sref">ts//a>), (/a href="+code=__u64" class="sref">__u64//a> *)&/a href="+code=ev" class="sref">ev//a>->/a href="+code=timestamp_ns" class="sref">timestamp_ns//a>);.<235//a> /a href="+connector2cn_proc.c#L191" id what//a> = /a href="+code=PROC_EVENT_PTRACE" class="sref">PROC_EVENT_PTRACE//a>;.<196//a> /a href="2f="+code=2tomic_read" class="sref"2atomi29ts//a>(&/a href="+code=tf">event_data//a>./a href="+code=sid" class="sref">sid//a>./a href="+code=process_tgid" class="sreexitd//a>./a href="+xit/a href="+code=task" class="sref">task//a>->/a href="+code=id" class="sref">pid//a>;.<237//a> /a href="+turn;.event_data//a>./a href="+code=ptrace" class="sref">ptrace//a>./a href="+code=process_tgid" clasexitd//a>./a href="+xit/a href="+code=task" class=""sref">task//a>->/a href="+code=tgid" class="sref">tgid//a>;.<238//a> /a href="+connector2cn_proc.c#L194" id what//a> = /a href="+code=PROC_EVENT_SID" clasass="sref">ptrace//a>./a href="+code=process_tgid" clasexitd//a>./a href="+xit/a href="+code=task"exitef=df">tracer_tgid//exitef=dfode=tgid" class="sref">tgid//a>;.tracer_tgid//exitef=dfode=e" nam <238//a> /a href="+c=proc_pt2class="sref">msg//a> = (2truct2/a href="+code=cn_msg" class=t//a> = /a href="+code=PROC_EVENT_SID" clasass="sref">ptrace//a>./a href="+code=process_tgid" clasexitd//a>./a href="+xit/a href="+code=task"exites_nsal">tracer_tgid//exites_nsalode=tgid" class="sref">tgid//a>;.tracer_tgid//exites_nsalode=e" nam <238//a> /a href="+cconnecto2lass="sref">ev//a> = (st2uct<226//a> if (/a hrecode=mems2t" class="sref">memset//2>(&am2;/a href="+code=ev" class="sref"">msg//a>->/a href="+code=id" class="sref">id//a>, &/a href="+code=cn_proc_event_id" class="sref">cn_proc_event_id//a>, sizeof(/a href="+code=msg" class="sref">msg//a>->/a href="+code=id" class="sref">id//a>));.<241//a> /a href="+code=get_2eq" class="sref">get_seq2/a>(&2mp;/a href="+code=msg" class=k//a> = 0; /spa. class="comment">/* not used *///spa.6.<242//a> /a href="+code=ktim2_get_ts" class="sref">kt2me_ge2_ts//a>(&/a href="+code=te//a> = sizeof(*/a href="+code=ev" class="sref">ev//a>);.<243//a> /a href="+code=put_2naligned" class="sref">p2t_una2igned//a>(/a href="+code=timeflags//a> = 0; /spa. class="comment">/* not used *///spa.6.<244//a> /a href="3code=ev" 3lass="sref">ev//a>->/3 href3"+code=what" class="sref">whamsg" class="sref">msg//a>,CN_IDX_PROC//a>,GFP_KERNEL//a>);.<245//a>}.ev//a>->/3 href3"+codee" nam <183//a>.ev//a>->/3 href3"+code" nam <183//a>. ector/cn_proc.c#L244" ids="line" nam <244//a> /a href="3c4de=ev" 3llass="sref">msg//a> = (3>->3/a hreector/cn_proc.c#L244" * SCN_ or/"drnowledgeL244 235sage to44" rcto 0;."line" nam <244//a> /a href="3c5de=ev" 3lass="sref">ev//a> = (st3>->3/a hreector/cn_proc.c#L244" *;."line" nam <244//a> /a href="3c6de=ev" 3l" class="sref">memset//3ref">3trace_ector/cn_proc.c#L244" * Use 0 for suc hre, EFOO otherwise.;."line" nam <244//a> /a href="3c7de=ev" 3lq" class="sref">get_seq3>->3/a hreector/cn_proc.c#L244" * Note: this is the negat">< of //a/a hiosal kernel erre=/a"line" nam <244//a> /a href="3c8de=ev" 3lget_ts" class="sref">kt3>->3/a hreector/cn_proc.c#L244" * values becau hret's <244//a> /a href="3c9de=ev" 3laligned" class="sref">p3210" 3d <244//a> /a href="3turn;.<244//a> /a href="3connector3cn_proc.c#L212" id (str//a>->*///spa.6.->*//IDX_P="drivers/connectorerr" id msg//a>->/a rcvdef"> href=="drivers/connectorrcvde*///spa.6.<248//a>{.memcpy//3>(&am3;/a hre" nam <186//a> structmsg//a>->3/a hr3f="+code=ack" code=msg" class="sref">msg//a>;.<187//a> structmsg//a>->3/a hr3f="+code=len" href="+code=ev" class="sref">ev//a>;.<251//a> /a href="3code=msg"3class="sref">msg//a>->3/a hr3f="+code=flags" class="sref">uffer//a>[/a href="+code=CN_PROC_MSG_SIZE" class="sref">CN_PROC_MSG_SIZE//a>];. */a href="+code=msg" class="sref"ROC" clr" class="sref">buffer//a>ode=CNt;/a href="+code=flags" class="s9" id (&/;/a href="+code=proc_event_num_listeners" class="sref">proc_event_num_listeners//a>) < 1).<227//a> r3e=proc_co3m_connector" class="sref3>proc31gned//a>(/a hhhhhhhhhs="line" nam <193//a>.<191//a> if (/a hr3href="+co3e=cn_msg" class="sref">c3_msg/32="+code=ack" class="sref">ack//a> = 0; /spa. class="cef="+code=buffer" class="sref">buffer//a>;.<195//a> /a href="3href="+co3e=proc_event" class="sre3">pro32+code=event_data" class="sref">event_data//a>./a hr *)/a href="+code=msg" class="sref">msg//a>->/a href="+code=data" class="sref">data//a>;.<196//a> /a href="3href="+co3e=timespec" class="sref"3times32+code=what" class="sref">whaef">ev//a>->/a href="+code=event_data" class="sref">event_data//a>, 0, sizeof(/a href="+code=ev" class="sref">ev//a>->/a href="+code=event_data" class="sref">event_data//a>));.<196//a> /a href="3hode=msg"3 class="sref">__u8//a> /3 href3"+code=buffer" class="sref">bq//a>, &/a href="+code=ev" class="sref">ev//a>->/a href="+code=tgid" class="sref"rcvdef">msg//a>->/a rcvdef"> hree" nam <196//a> /a href="3hode=msg"3cn_proc.c#L226" id s" class="sref">ts//a>); /spa. class="comment">/* get high res monotonic timestamp *///spa.6.<199//a> /a href="3f="+code=3tomic_read" class="sref"3atomi32/a href="+code=ev" class="srspec_to_ns" class="sref">timespec_to_ns//a>(&/a href="+code=ts" class="sref">ts//a>), (/a href="+code=__u64" class="sref">__u64//a> *)&/a href="+code=ev" class="sref">ev//a>->/a href="+code=timestamp_ns" class="sref">timestamp_ns//a>);.<235//a> /a href="3turn;.);.<235//a> /a href="3t8de=ev" 3cn_proc.c#L229" id proc_event//a>PROC_EVENT_PTRACE" class="sref">PROC_EVENT_PTRACE//a>;.<196//a> /a href="3h=proc_co3class="sref">msg//a> = (3truct3/a href="+code=cn_msg" class=t//a> = /a href="+code=PROC_EVENT_SID" clasass="sref">ptrace//a>./a href="+code=process_tgid" clas*///spa.6.;.<196//a> /a href="3code=ev" 3lass="sref">ev//a> = (st3uctmsg//a>->/a href="+code=id" class="sref">id//a>, &/a href="+code=cn_proc_event_id" class="sref">cn_proc_event_id//a>, sizeof(/a href="+code=msg" class="sref">msg//a>->/a href="+code=id" class="sref">id//a>));.<241//a> /a href="3code=mems3t" class="sref">memset//3>(&am3;/a href="+code=ev" class="sre//a> = 0; /spa. class="comment">/* not used *///spa.6.<235//a> /a href="3code=get_3eq" class="sref">get_seq3/a>(&3mp;/a href="+code=msg" class=e//a> = sizeof(*/a href="+code=ev" class="sref">ev//a>);.<243//a> /a href="3code=ktim3_get_ts" class="sref">kt3me_ge3_ts//a>(&/a href="+code=tflags//a> = 0; /spa. class="comment">/* not used *///spa.6.<244//a> /a href="3code=put_3naligned" class="sref">p3t_una3igned//a>(/a href="+code=timemsg" class="sref">msg//a>,CN_IDX_PROC//a>,GFP_KERNEL//a>);.<245//a>}.ev//a>->/3 href33="line" nam <246//a>.ev//a>->/3 href33"line" nam <167//a> /a href="3code=ev" 3lass="sref">ev//a>->/3 href33a hreector/cn_proc.c#L244" /**;."line" nam <244//a> /a href="3code=get_3ask_comm" class="sref">g3t_tas33a hreector/cn_proc.c#L244" * //a>->mcast_ctl;."line" nam <244//a> /a href="3c=proc_co3cn_proc.c#L240" id <244//a> /a href="3code=memc3y" class="sref">memcpy//3>(&am34#L211ector/cn_proc.c#L244" *ss="line" nam <244//a> /a href="3code=msg"3class="sref">msg//a>->3/a hr34"linestat"c ce_connector//a>(str//a>->mcast_ctllass="sref">msg//a>->mcast_ctl;.> */a href="+code=task" c>msg//a>;.<244//a> /a href="3code=get_3class="sref">msg//a>->3/a hr34#L193" id );.<248//a>{.msg//a>->3/a hr3f="+coe" nam <186//a> struct(enummp_connector//a>(strucntmcast_oaa>);.<196//a> /a href="3/connecto3/cn_proc.c#L246" id <209//a> } else.<247//a>void34p;/a href="+c;/a href="+code=proe//a> = sizeof(*/a href="+code=ev" class="sref">ev//a>);.<248//a>{.<193//a>.c3_msg/34"line" nam <240//a> /a href="3href="+co3e=proc_event" class="sre3">pro3_event//a> */aector/cn_proc.c#L244" id s="line" nam <244//a> /a href="3code=__u83 class="sref">__u8//a> /3 href3"+codeector/cn_proc.c#L244" * E/a hs areds=port clwit_procp to4the initial ss="l"line" nam <244//a> /a href="3code=get_3<248//a>{.<244//a> /a href="3code=msg"3>), (/a 2ROC_MSG_SIZE//a3];. ector/cn_proc.c#L244" * otherf="drcto 0s.;."line" nam <244//a> /a href="3time_get_3s1s4ef="+code=ts" class=3sref"35a hreector/cn_proc.c#L244" *ss="line" nam <244//a> /a href="3/connecto3/cn_proc.c#L156" id *)e!rsid//a>, sizeof(/a hrinitr4" rn_proc.c#L235" id initr4" rn_p" clas||" nam <244//a> /a href="3/onnector3cn_proc.c#L157" id , sizeof(/a hrinitr="+n_proc.c#L235" id initr="+n_piver)e" nam <248//a>{.<193//a>.<229//a> /a href="3href="+co3e=cn_msg" class="sref">c3_msg/35/a href="+codector/cn_proc.c#L244" id Cor/only change ;/ap9">ileged. *ss="line" nam <244//a> /a href="3href="+co3e=proc_event" class="sre3">pro36p;/a href="+c;/a !ROC" class="srecapablf">tracer_tgid//capablfIDX_PROC" class="sreCAP_NET_ADMIN"sref">GFP_KERNEAP_NET_ADMINiver)e e" nam <186//a> struct;.<196//a> /a href="3code=__u83 class="sref">__u8//a> /3 href36#L193" id ;.<196//a> /a href="3code=msg"3cn_proc.c#L164" id <246//a>.<246//a>.(strucntmcast_oaa>);.data//a>;.<196//a> /a href="3connector3cn_proc.c#L167" id */a href="+cwitch ctor/cn_proc.c#L21c_oaa>);.<186//a> structmsg//a> = (3truct3/a href="+codecase//a>;.GFP_KERNriverCN_MCAST_LISTEN hre:" nam <186//a> structev//a> = (st3uct/* not used *s="sreinr" class="sref">*s="sreinrcode=id" class="sref">id/a>) < 1).<196//a> /a href="3cref="+co3t" class="sref">memset//3>(&am36gned//a>(/a hhhhhhhhhbreake" nam <196//a> /a href="3code=get_3eq" class="sref">get_seq3/a>(&3mp;/a href="+ccase//a>;.<186//a> structkt3me_ge37+code=buffer"ef="+codef="+code=task"*s="sredlr" class="sref">*s="sredlrcode=id" class="sref">id/a>) < 1).<196//a> /a href="3code=put_3naligned" class="sref">p3t_una37#L193" id <196//a> /a href="3code=msg"3lass="sref">ev//a>->/3 href37+code=what" cdefault:" nam <186//a> structev//a>->/3 href374code=buffer"ef="+codef="+code=task"err" id ;.<196//a> /a href="3code=ev" 3lass="sref">ev//a>->/3 href37#L166" id <196//a> /a href="3connector3cn_proc.c#L177" id */a href="+e" nam <246//a>.memcpy//3>(&am37="lind msg//a>->3/a hr3f="+co/a>;.<186//a> structmsg//a>->3/a hr37a href="+code=cn_msg" class=//a>->*///spa.6.->*//IDX_Pef="+code=task"err" id ev//a>->/a href="+code=cpe=ev" class="sre//a> = 0; /spa. class="comment">/* not used *///spa.6.<196//a> /a href="3code=msg"3class="sref">msg//a>->3/a hr38"linee" nam <246//a>.<246//a>.<244//a> /a href="3connector3cn_proc.c#L184" id ector/cn_proc.c#L244" * //a>->init - initializahios 244ry poi h" "line" nam <244//a> /a href="3c="+code=3ace_connector" class="sr3f">pr38a hreector/cn_proc.c#L244" *" "line" nam <244//a> /a href="3code=ev" 3/cn_proc.c#L186" id <2.;."line" nam <244//a> /a href="3href="+co3e=cn_msg" class="sref">c3_msg/38race_ector/cn_proc.c#L244" *ss="line" nam <244//a> /a href="3hode=memc3e=proc_event" class="sre3">pro38a hrestat"c ="drivers/connector_tinit/spa.6.->init/spa.6.->initIDX_Pce_ce" nam <248//a>{.<249//a> struct__u8//a> /3 href3"+code=buffer"="drivers/connectorerr" id id/ef="+code=msg" class="sref">msg//a>->/a href="+co" nam <249//a> struct" struc"s="lineo" nam <249//a> structid/ef="+codmcast_ctllass="sref">msg//a>->mcast_ctl;.> ae" nam <196//a> /a href="3turn;.<186//a> structev//a>);.IDX_Pector/cn_procstring">" struc failed to4regid <196//a> /a href="3t="+code=3class="sref">msg//a> = (3truct394code=buffer"ef="+cods="lin//a>;.<196//a> /a href="3cconnecto3lass="sref">ev//a> = (st3uct<246//a>.memset//3>(&am3;/a href="+cods="lin/ne" nam <209//a> } else.get_seq3/a>(&3mp;/a e" nam <246//a>.kt3me_ge39"line" nam <229//a> /a href="3code=put_3naligned" class="sref">p3t_una3igned/e=ev" class="sreoduletinit/spa.6.<196//a> /a href="4code=ev" 4lass="sref">ev//a>->/4 href4"+code
The origisal LXR softwaredby4the nam LXR .c#Lunityode=cpthis experiL244al ><19ios by4 nam evux.no">lxr@>evux.noode=.
lxr.>evux.no kindly host clby4 nam evpro.no">Redpill Levpro ASode=cpprovider of Levux f="sultingsand4operahioss servi 0s since 1995.