#include <linux/spinlock.h>
#include <linux/string.h>
#include <linux/kobject.h>
#include <linux/export.h>
#include <linux/kmod.h>
#include <linux/slab.h>
#include <linux/socket.h>
#include <linux/skbuff.h>
#include <linux/netlink.h>
#include <linux/uidgid.h>
#include <linux/uuid.h>
#include <linux/ctype.h>
#include <net/sock.h>
#include <net/netlink.h>
#include <net/net_namespace.h>
atomic64_t uevent_seqnum;
#ifdef CONFIG_UEVENT_HELPER
char uevent_helper[UEVENT_HELPER_PATH_LEN] = …;
#endif
struct uevent_sock { … };
#ifdef CONFIG_NET
static LIST_HEAD(uevent_sock_list);
static DEFINE_MUTEX(uevent_sock_mutex);
#endif
static const char *kobject_actions[] = …;
static int kobject_action_type(const char *buf, size_t count,
enum kobject_action *type,
const char **args)
{ … }
static const char *action_arg_word_end(const char *buf, const char *buf_end,
char delim)
{ … }
static int kobject_action_args(const char *buf, size_t count,
struct kobj_uevent_env **ret_env)
{ … }
int kobject_synth_uevent(struct kobject *kobj, const char *buf, size_t count)
{ … }
#ifdef CONFIG_UEVENT_HELPER
static int kobj_usermode_filter(struct kobject *kobj)
{ … }
static int init_uevent_argv(struct kobj_uevent_env *env, const char *subsystem)
{ … }
static void cleanup_uevent_env(struct subprocess_info *info)
{ … }
#endif
#ifdef CONFIG_NET
static struct sk_buff *alloc_uevent_skb(struct kobj_uevent_env *env,
const char *action_string,
const char *devpath)
{ … }
static int uevent_net_broadcast_untagged(struct kobj_uevent_env *env,
const char *action_string,
const char *devpath)
{ … }
static int uevent_net_broadcast_tagged(struct sock *usk,
struct kobj_uevent_env *env,
const char *action_string,
const char *devpath)
{ … }
#endif
static int kobject_uevent_net_broadcast(struct kobject *kobj,
struct kobj_uevent_env *env,
const char *action_string,
const char *devpath)
{ … }
static void zap_modalias_env(struct kobj_uevent_env *env)
{ … }
int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
char *envp_ext[])
{ … }
EXPORT_SYMBOL_GPL(…);
int kobject_uevent(struct kobject *kobj, enum kobject_action action)
{ … }
EXPORT_SYMBOL_GPL(…);
int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...)
{ … }
EXPORT_SYMBOL_GPL(…);
#if defined(CONFIG_NET)
static int uevent_net_broadcast(struct sock *usk, struct sk_buff *skb,
struct netlink_ext_ack *extack)
{ … }
static int uevent_net_rcv_skb(struct sk_buff *skb, struct nlmsghdr *nlh,
struct netlink_ext_ack *extack)
{ … }
static void uevent_net_rcv(struct sk_buff *skb)
{ … }
static int uevent_net_init(struct net *net)
{ … }
static void uevent_net_exit(struct net *net)
{ … }
static struct pernet_operations uevent_net_ops = …;
static int __init kobject_uevent_init(void)
{ … }
postcore_initcall(kobject_uevent_init);
#endif