summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/sys
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/sys')
-rw-r--r--freebsd/sys/sys/conf.h11
-rw-r--r--freebsd/sys/sys/counter.h13
-rw-r--r--freebsd/sys/sys/eventhandler.h7
-rw-r--r--freebsd/sys/sys/mount.h1
-rw-r--r--freebsd/sys/sys/mutex.h8
-rw-r--r--freebsd/sys/sys/seq.h1
-rw-r--r--freebsd/sys/sys/socket.h1
-rw-r--r--freebsd/sys/sys/sysctl.h129
-rw-r--r--freebsd/sys/sys/sysproto.h6
-rw-r--r--freebsd/sys/sys/systm.h4
-rw-r--r--freebsd/sys/sys/vnode.h1
11 files changed, 119 insertions, 63 deletions
diff --git a/freebsd/sys/sys/conf.h b/freebsd/sys/sys/conf.h
index 78bb1e2a..084cab22 100644
--- a/freebsd/sys/sys/conf.h
+++ b/freebsd/sys/sys/conf.h
@@ -311,7 +311,6 @@ int make_dev_physpath_alias(int _flags, struct cdev **_cdev,
const char *_physpath);
void dev_lock(void);
void dev_unlock(void);
-void setconf(void);
#ifdef KLD_MODULE
#define MAKEDEV_ETERNAL_KLD 0
@@ -351,6 +350,8 @@ int dev_stdclone(char *_name, char **_namep, const char *_stem, int *_unit);
EVENTHANDLER_DECLARE(dev_clone, dev_clone_fn);
/* Stuff relating to kernel-dump */
+struct kerneldumpcrypto;
+struct kerneldumpheader;
struct dumperinfo {
dumper_t *dumper; /* Dumping function. */
@@ -360,12 +361,18 @@ struct dumperinfo {
off_t mediaoffset; /* Initial offset in bytes. */
off_t mediasize; /* Space available in bytes. */
void *blockbuf; /* Buffer for padding shorter dump blocks */
+ struct kerneldumpcrypto *kdc; /* Kernel dump crypto. */
};
-int set_dumper(struct dumperinfo *, const char *_devname, struct thread *td);
+int set_dumper(struct dumperinfo *di, const char *devname, struct thread *td,
+ uint8_t encrypt, const uint8_t *key, uint32_t encryptedkeysize,
+ const uint8_t *encryptedkey);
int dump_write(struct dumperinfo *, void *, vm_offset_t, off_t, size_t);
int dump_write_pad(struct dumperinfo *, void *, vm_offset_t, off_t, size_t,
size_t *);
+int dump_write_header(struct dumperinfo *di, struct kerneldumpheader *kdh,
+ vm_offset_t physical, off_t offset);
+int dump_write_key(struct dumperinfo *di, vm_offset_t physical, off_t offset);
int doadump(boolean_t);
#ifndef __rtems__
extern int dumping; /* system is dumping */
diff --git a/freebsd/sys/sys/counter.h b/freebsd/sys/sys/counter.h
index 2ce71341..5046d41d 100644
--- a/freebsd/sys/sys/counter.h
+++ b/freebsd/sys/sys/counter.h
@@ -59,5 +59,18 @@ uint64_t counter_u64_fetch(counter_u64_t);
for (int i = 0; i < (n); i++) \
counter_u64_zero((a)[i]); \
} while (0)
+
+/*
+ * counter(9) based rate checking.
+ */
+struct counter_rate {
+ counter_u64_t cr_rate; /* Events since last second */
+ volatile int cr_lock; /* Lock to clean the struct */
+ int cr_ticks; /* Ticks on last clean */
+ int cr_over; /* Over limit since cr_ticks? */
+};
+
+int64_t counter_ratecheck(struct counter_rate *, int64_t);
+
#endif /* _KERNEL */
#endif /* ! __SYS_COUNTER_H__ */
diff --git a/freebsd/sys/sys/eventhandler.h b/freebsd/sys/sys/eventhandler.h
index 845b28c1..d03cd054 100644
--- a/freebsd/sys/sys/eventhandler.h
+++ b/freebsd/sys/sys/eventhandler.h
@@ -277,4 +277,11 @@ typedef void (*ada_probe_veto_fn)(void *, struct cam_path *,
struct ata_params *, int *);
EVENTHANDLER_DECLARE(ada_probe_veto, ada_probe_veto_fn);
+/* Swap device events */
+struct swdevt;
+typedef void (*swapon_fn)(void *, struct swdevt *);
+typedef void (*swapoff_fn)(void *, struct swdevt *);
+EVENTHANDLER_DECLARE(swapon, swapon_fn);
+EVENTHANDLER_DECLARE(swapoff, swapoff_fn);
+
#endif /* _SYS_EVENTHANDLER_H_ */
diff --git a/freebsd/sys/sys/mount.h b/freebsd/sys/sys/mount.h
index 1bf583a6..acc9b81b 100644
--- a/freebsd/sys/sys/mount.h
+++ b/freebsd/sys/sys/mount.h
@@ -597,6 +597,7 @@ struct uio;
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_MOUNT);
+MALLOC_DECLARE(M_STATFS);
#endif
extern int maxvfsconf; /* highest defined filesystem type */
diff --git a/freebsd/sys/sys/mutex.h b/freebsd/sys/sys/mutex.h
index 84feea7c..3cec5dbd 100644
--- a/freebsd/sys/sys/mutex.h
+++ b/freebsd/sys/sys/mutex.h
@@ -448,10 +448,16 @@ extern struct mtx_pool *mtxpool_sleep;
_sleep((chan), &(mtx)->lock_object, (pri), (wmesg), \
tick_sbt * (timo), 0, C_HARDCLOCK)
+#define MTX_READ_VALUE(m) ((m)->mtx_lock)
+
#define mtx_initialized(m) lock_initialized(&(m)->lock_object)
#ifndef __rtems__
-#define mtx_owned(m) (((m)->mtx_lock & ~MTX_FLAGMASK) == (uintptr_t)curthread)
+#define lv_mtx_owner(v) ((struct thread *)((v) & ~MTX_FLAGMASK))
+
+#define mtx_owner(m) lv_mtx_owner(MTX_READ_VALUE(m))
+
+#define mtx_owned(m) (mtx_owner(m) == curthread)
#define mtx_recursed(m) ((m)->mtx_recurse != 0)
#else /* __rtems__ */
diff --git a/freebsd/sys/sys/seq.h b/freebsd/sys/sys/seq.h
index 228be2f2..94be8a4c 100644
--- a/freebsd/sys/sys/seq.h
+++ b/freebsd/sys/sys/seq.h
@@ -59,7 +59,6 @@ typedef uint32_t seq_t;
* lobj = gobj;
* if (seq_consistent(&gobj->seq, seq))
* break;
- * cpu_spinwait();
* }
* foo(lobj);
*/
diff --git a/freebsd/sys/sys/socket.h b/freebsd/sys/sys/socket.h
index ea3d9b6b..9429f5a1 100644
--- a/freebsd/sys/sys/socket.h
+++ b/freebsd/sys/sys/socket.h
@@ -435,6 +435,7 @@ struct msghdr {
#endif
#ifdef _KERNEL
#define MSG_SOCALLBCK 0x10000 /* for use by socket callbacks - soreceive (TCP) */
+#define MSG_MORETOCOME 0x20000 /* additional data pending */
#endif
/*
diff --git a/freebsd/sys/sys/sysctl.h b/freebsd/sys/sys/sysctl.h
index 291b7e44..988cec2e 100644
--- a/freebsd/sys/sys/sysctl.h
+++ b/freebsd/sys/sys/sysctl.h
@@ -192,6 +192,7 @@ struct sysctl_oid {
int oid_refcnt;
u_int oid_running;
const char *oid_descr;
+ const char *oid_label;
};
#define SYSCTL_IN(r, p, l) (r->newfunc)(r, p, l)
@@ -270,7 +271,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
#endif
/* This macro is only for internal use */
-#define SYSCTL_OID_RAW(id, parent_child_head, nbr, name, kind, a1, a2, handler, fmt, descr) \
+#define SYSCTL_OID_RAW(id, parent_child_head, nbr, name, kind, a1, a2, handler, fmt, descr, label) \
struct sysctl_oid id = { \
.oid_parent = (parent_child_head), \
.oid_children = SLIST_HEAD_INITIALIZER(&id.oid_children), \
@@ -281,69 +282,81 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
.oid_name = (name), \
.oid_handler = (handler), \
.oid_fmt = (fmt), \
- .oid_descr = __DESCR(descr) \
+ .oid_descr = __DESCR(descr), \
+ .oid_label = (label), \
}; \
DATA_SET(sysctl_set, id)
/* This constructs a static "raw" MIB oid. */
-#ifndef __rtems__
#define SYSCTL_OID(parent, nbr, name, kind, a1, a2, handler, fmt, descr) \
- static SYSCTL_OID_RAW(sysctl__##parent##_##name, \
- SYSCTL_CHILDREN(&sysctl__##parent), \
- nbr, #name, kind, a1, a2, handler, fmt, descr)
+ SYSCTL_OID_WITH_LABEL(parent, nbr, name, kind, a1, a2, \
+ handler, fmt, descr, NULL)
+
+#ifndef __rtems__
+#define SYSCTL_OID_WITH_LABEL(parent, nbr, name, kind, a1, a2, handler, fmt, descr, label) \
+ static SYSCTL_OID_RAW(sysctl__##parent##_##name, \
+ SYSCTL_CHILDREN(&sysctl__##parent), \
+ nbr, #name, kind, a1, a2, handler, fmt, descr, label)
#else /* __rtems__ */
-#define SYSCTL_OID(parent, nbr, name, kind, a1, a2, handler, fmt, descr) \
- static SYSCTL_OID_RAW(_bsd_sysctl__##parent##_##name, \
- SYSCTL_CHILDREN(&_bsd_sysctl__##parent), \
- nbr, #name, kind, a1, a2, handler, fmt, descr)
+#define SYSCTL_OID_WITH_LABEL(parent, nbr, name, kind, a1, a2, handler, fmt, descr, label) \
+ static SYSCTL_OID_RAW(_bsd_sysctl__##parent##_##name, \
+ SYSCTL_CHILDREN(&_bsd_sysctl__##parent), \
+ nbr, #name, kind, a1, a2, handler, fmt, descr, label)
#endif /* __rtems__ */
/* This constructs a global "raw" MIB oid. */
#ifndef __rtems__
-#define SYSCTL_OID_GLOBAL(parent, nbr, name, kind, a1, a2, handler, fmt, descr) \
+#define SYSCTL_OID_GLOBAL(parent, nbr, name, kind, a1, a2, handler, fmt, descr, label) \
SYSCTL_OID_RAW(sysctl__##parent##_##name, \
SYSCTL_CHILDREN(&sysctl__##parent), \
- nbr, #name, kind, a1, a2, handler, fmt, descr)
+ nbr, #name, kind, a1, a2, handler, fmt, descr, label)
#else /* __rtems__ */
-#define SYSCTL_OID_GLOBAL(parent, nbr, name, kind, a1, a2, handler, fmt, descr) \
+#define SYSCTL_OID_GLOBAL(parent, nbr, name, kind, a1, a2, handler, fmt, descr, label) \
SYSCTL_OID_RAW(_bsd_sysctl__##parent##_##name, \
SYSCTL_CHILDREN(&_bsd_sysctl__##parent), \
- nbr, #name, kind, a1, a2, handler, fmt, descr)
+ nbr, #name, kind, a1, a2, handler, fmt, descr, label)
#endif /* __rtems__ */
#define SYSCTL_ADD_OID(ctx, parent, nbr, name, kind, a1, a2, handler, fmt, descr) \
- sysctl_add_oid(ctx, parent, nbr, name, kind, a1, a2, handler, fmt, __DESCR(descr))
+ sysctl_add_oid(ctx, parent, nbr, name, kind, a1, a2, handler, fmt, __DESCR(descr), NULL)
/* This constructs a root node from which other nodes can hang. */
#ifndef __rtems__
#define SYSCTL_ROOT_NODE(nbr, name, access, handler, descr) \
SYSCTL_OID_RAW(sysctl___##name, &sysctl__children, \
nbr, #name, CTLTYPE_NODE|(access), NULL, 0, \
- handler, "N", descr); \
+ handler, "N", descr, NULL); \
CTASSERT(((access) & CTLTYPE) == 0 || \
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_NODE)
#else /* __rtems__ */
#define SYSCTL_ROOT_NODE(nbr, name, access, handler, descr) \
SYSCTL_OID_RAW(_bsd_sysctl___##name, &sysctl__children, \
nbr, #name, CTLTYPE_NODE|(access), NULL, 0, \
- handler, "N", descr); \
+ handler, "N", descr, NULL); \
CTASSERT(((access) & CTLTYPE) == 0 || \
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_NODE)
#endif /* __rtems__ */
/* This constructs a node from which other oids can hang. */
-#define SYSCTL_NODE(parent, nbr, name, access, handler, descr) \
+#define SYSCTL_NODE(parent, nbr, name, access, handler, descr) \
+ SYSCTL_NODE_WITH_LABEL(parent, nbr, name, access, handler, descr, NULL)
+
+#define SYSCTL_NODE_WITH_LABEL(parent, nbr, name, access, handler, descr, label) \
SYSCTL_OID_GLOBAL(parent, nbr, name, CTLTYPE_NODE|(access), \
- NULL, 0, handler, "N", descr); \
+ NULL, 0, handler, "N", descr, label); \
CTASSERT(((access) & CTLTYPE) == 0 || \
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_NODE)
#define SYSCTL_ADD_NODE(ctx, parent, nbr, name, access, handler, descr) \
+ SYSCTL_ADD_NODE_WITH_LABEL(ctx, parent, nbr, name, access, \
+ handler, descr, NULL)
+
+#define SYSCTL_ADD_NODE_WITH_LABEL(ctx, parent, nbr, name, access, handler, descr, label) \
({ \
CTASSERT(((access) & CTLTYPE) == 0 || \
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_NODE); \
sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_NODE|(access), \
- NULL, 0, handler, "N", __DESCR(descr)); \
+ NULL, 0, handler, "N", __DESCR(descr), label); \
})
#define SYSCTL_ADD_ROOT_NODE(ctx, nbr, name, access, handler, descr) \
@@ -352,7 +365,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_NODE); \
sysctl_add_oid(ctx, &sysctl__children, nbr, name, \
CTLTYPE_NODE|(access), \
- NULL, 0, handler, "N", __DESCR(descr)); \
+ NULL, 0, handler, "N", __DESCR(descr), NULL); \
})
/* Oid for a string. len can be 0 to indicate '\0' termination. */
@@ -368,7 +381,8 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
CTASSERT(((access) & CTLTYPE) == 0 || \
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_STRING); \
sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_STRING|(access), \
- __arg, len, sysctl_handle_string, "A", __DESCR(descr)); \
+ __arg, len, sysctl_handle_string, "A", __DESCR(descr), \
+ NULL); \
})
/* Oid for a bool. If ptr is NULL, val is returned. */
@@ -386,7 +400,8 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
CTASSERT(((access) & CTLTYPE) == 0); \
sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_U8 | CTLFLAG_MPSAFE | (access), \
- __ptr, val, sysctl_handle_bool, "CU", __DESCR(descr)); \
+ __ptr, val, sysctl_handle_bool, "CU", __DESCR(descr), \
+ NULL); \
})
/* Oid for a signed 8-bit int. If ptr is NULL, val is returned. */
@@ -406,7 +421,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S8); \
sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_S8 | CTLFLAG_MPSAFE | (access), \
- __ptr, val, sysctl_handle_8, "C", __DESCR(descr)); \
+ __ptr, val, sysctl_handle_8, "C", __DESCR(descr), NULL); \
})
/* Oid for an unsigned 8-bit int. If ptr is NULL, val is returned. */
@@ -426,7 +441,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U8); \
sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_U8 | CTLFLAG_MPSAFE | (access), \
- __ptr, val, sysctl_handle_8, "CU", __DESCR(descr)); \
+ __ptr, val, sysctl_handle_8, "CU", __DESCR(descr), NULL); \
})
/* Oid for a signed 16-bit int. If ptr is NULL, val is returned. */
@@ -446,7 +461,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S16); \
sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_S16 | CTLFLAG_MPSAFE | (access), \
- __ptr, val, sysctl_handle_16, "S", __DESCR(descr)); \
+ __ptr, val, sysctl_handle_16, "S", __DESCR(descr), NULL); \
})
/* Oid for an unsigned 16-bit int. If ptr is NULL, val is returned. */
@@ -466,7 +481,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U16); \
sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_U16 | CTLFLAG_MPSAFE | (access), \
- __ptr, val, sysctl_handle_16, "SU", __DESCR(descr)); \
+ __ptr, val, sysctl_handle_16, "SU", __DESCR(descr), NULL); \
})
/* Oid for a signed 32-bit int. If ptr is NULL, val is returned. */
@@ -486,7 +501,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S32); \
sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_S32 | CTLFLAG_MPSAFE | (access), \
- __ptr, val, sysctl_handle_32, "I", __DESCR(descr)); \
+ __ptr, val, sysctl_handle_32, "I", __DESCR(descr), NULL); \
})
/* Oid for an unsigned 32-bit int. If ptr is NULL, val is returned. */
@@ -506,7 +521,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U32); \
sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_U32 | CTLFLAG_MPSAFE | (access), \
- __ptr, val, sysctl_handle_32, "IU", __DESCR(descr)); \
+ __ptr, val, sysctl_handle_32, "IU", __DESCR(descr), NULL); \
})
/* Oid for a signed 64-bit int. If ptr is NULL, val is returned. */
@@ -526,7 +541,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S64); \
sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_S64 | CTLFLAG_MPSAFE | (access), \
- __ptr, val, sysctl_handle_64, "Q", __DESCR(descr)); \
+ __ptr, val, sysctl_handle_64, "Q", __DESCR(descr), NULL); \
})
/* Oid for an unsigned 64-bit int. If ptr is NULL, val is returned. */
@@ -546,16 +561,19 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U64); \
sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_U64 | CTLFLAG_MPSAFE | (access), \
- __ptr, val, sysctl_handle_64, "QU", __DESCR(descr)); \
+ __ptr, val, sysctl_handle_64, "QU", __DESCR(descr), NULL); \
})
/* Oid for an int. If ptr is SYSCTL_NULL_INT_PTR, val is returned. */
#define SYSCTL_NULL_INT_PTR ((int *)NULL)
-#define SYSCTL_INT(parent, nbr, name, access, ptr, val, descr) \
- SYSCTL_OID(parent, nbr, name, \
- CTLTYPE_INT | CTLFLAG_MPSAFE | (access), \
- ptr, val, sysctl_handle_int, "I", descr); \
- CTASSERT((((access) & CTLTYPE) == 0 || \
+#define SYSCTL_INT(parent, nbr, name, access, ptr, val, descr) \
+ SYSCTL_INT_WITH_LABEL(parent, nbr, name, access, ptr, val, descr, NULL)
+
+#define SYSCTL_INT_WITH_LABEL(parent, nbr, name, access, ptr, val, descr, label) \
+ SYSCTL_OID_WITH_LABEL(parent, nbr, name, \
+ CTLTYPE_INT | CTLFLAG_MPSAFE | (access), \
+ ptr, val, sysctl_handle_int, "I", descr, label); \
+ CTASSERT((((access) & CTLTYPE) == 0 || \
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_INT) && \
sizeof(int) == sizeof(*(ptr)))
@@ -566,7 +584,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_INT); \
sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_INT | CTLFLAG_MPSAFE | (access), \
- __ptr, val, sysctl_handle_int, "I", __DESCR(descr)); \
+ __ptr, val, sysctl_handle_int, "I", __DESCR(descr), NULL); \
})
/* Oid for an unsigned int. If ptr is NULL, val is returned. */
@@ -586,7 +604,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_UINT); \
sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_UINT | CTLFLAG_MPSAFE | (access), \
- __ptr, val, sysctl_handle_int, "IU", __DESCR(descr)); \
+ __ptr, val, sysctl_handle_int, "IU", __DESCR(descr), NULL); \
})
/* Oid for a long. The pointer must be non NULL. */
@@ -606,7 +624,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_LONG); \
sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_LONG | CTLFLAG_MPSAFE | (access), \
- __ptr, 0, sysctl_handle_long, "L", __DESCR(descr)); \
+ __ptr, 0, sysctl_handle_long, "L", __DESCR(descr), NULL); \
})
/* Oid for an unsigned long. The pointer must be non NULL. */
@@ -626,7 +644,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_ULONG); \
sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_ULONG | CTLFLAG_MPSAFE | (access), \
- __ptr, 0, sysctl_handle_long, "LU", __DESCR(descr)); \
+ __ptr, 0, sysctl_handle_long, "LU", __DESCR(descr), NULL); \
})
/* Oid for a quad. The pointer must be non NULL. */
@@ -646,7 +664,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S64); \
sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_S64 | CTLFLAG_MPSAFE | (access), \
- __ptr, 0, sysctl_handle_64, "Q", __DESCR(descr)); \
+ __ptr, 0, sysctl_handle_64, "Q", __DESCR(descr), NULL); \
})
#define SYSCTL_NULL_UQUAD_PTR ((uint64_t *)NULL)
@@ -665,7 +683,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U64); \
sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_U64 | CTLFLAG_MPSAFE | (access), \
- __ptr, 0, sysctl_handle_64, "QU", __DESCR(descr)); \
+ __ptr, 0, sysctl_handle_64, "QU", __DESCR(descr), NULL); \
})
/* Oid for a CPU dependent variable */
@@ -679,12 +697,12 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
__ret = sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_U64 | CTLFLAG_MPSAFE | (access), \
(ptr), 0, sysctl_handle_64, "QU", \
- __DESCR(descr)); \
+ __DESCR(descr), NULL); \
} else { \
__ret = sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_UINT | CTLFLAG_MPSAFE | (access), \
(ptr), 0, sysctl_handle_int, "IU", \
- __DESCR(descr)); \
+ __DESCR(descr), NULL); \
} \
__ret; \
})
@@ -706,7 +724,8 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U64); \
sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_U64 | CTLFLAG_MPSAFE | (access), \
- __ptr, 0, sysctl_handle_counter_u64, "QU", __DESCR(descr)); \
+ __ptr, 0, sysctl_handle_counter_u64, "QU", __DESCR(descr), \
+ NULL); \
})
/* Oid for an array of counter(9)s. The pointer and length must be non zero. */
@@ -728,7 +747,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_OPAQUE | CTLFLAG_MPSAFE | (access), \
__ptr, len, sysctl_handle_counter_u64_array, "S", \
- __DESCR(descr)); \
+ __DESCR(descr), NULL); \
})
/* Oid for an opaque object. Specified by a pointer and a length. */
@@ -743,7 +762,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
CTASSERT(((access) & CTLTYPE) == 0 || \
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_OPAQUE); \
sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_OPAQUE|(access), \
- ptr, len, sysctl_handle_opaque, fmt, __DESCR(descr)); \
+ ptr, len, sysctl_handle_opaque, fmt, __DESCR(descr), NULL); \
})
/* Oid for a struct. Specified by a pointer and a type. */
@@ -760,7 +779,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_OPAQUE); \
sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_OPAQUE|(access), \
(ptr), sizeof(struct type), \
- sysctl_handle_opaque, "S," #type, __DESCR(descr)); \
+ sysctl_handle_opaque, "S," #type, __DESCR(descr), NULL); \
})
/* Oid for a procedure. Specified by a pointer and an arg. */
@@ -773,7 +792,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
({ \
CTASSERT(((access) & CTLTYPE) != 0); \
sysctl_add_oid(ctx, parent, nbr, name, (access), \
- (ptr), (arg), (handler), (fmt), __DESCR(descr)); \
+ (ptr), (arg), (handler), (fmt), __DESCR(descr), NULL); \
})
/* Oid to handle limits on uma(9) zone specified by pointer. */
@@ -791,7 +810,8 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_INT); \
sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_INT | CTLFLAG_MPSAFE | (access), \
- __ptr, 0, sysctl_handle_uma_zone_max, "I", __DESCR(descr)); \
+ __ptr, 0, sysctl_handle_uma_zone_max, "I", __DESCR(descr), \
+ NULL); \
})
/* Oid to obtain current use of uma(9) zone specified by pointer. */
@@ -809,7 +829,8 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_INT); \
sysctl_add_oid(ctx, parent, nbr, name, \
CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RD | (access), \
- __ptr, 0, sysctl_handle_uma_zone_cur, "I", __DESCR(descr)); \
+ __ptr, 0, sysctl_handle_uma_zone_cur, "I", __DESCR(descr), \
+ NULL); \
})
/*
@@ -817,8 +838,8 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
* kernel features.
*/
#define FEATURE(name, desc) \
- SYSCTL_INT(_kern_features, OID_AUTO, name, CTLFLAG_RD | CTLFLAG_CAPRD, \
- SYSCTL_NULL_INT_PTR, 1, desc)
+ SYSCTL_INT_WITH_LABEL(_kern_features, OID_AUTO, name, \
+ CTLFLAG_RD | CTLFLAG_CAPRD, SYSCTL_NULL_INT_PTR, 1, desc, "feature")
#endif /* _KERNEL */
@@ -1037,7 +1058,7 @@ extern char kern_ident[];
struct sysctl_oid *sysctl_add_oid(struct sysctl_ctx_list *clist,
struct sysctl_oid_list *parent, int nbr, const char *name, int kind,
void *arg1, intmax_t arg2, int (*handler)(SYSCTL_HANDLER_ARGS),
- const char *fmt, const char *descr);
+ const char *fmt, const char *descr, const char *label);
int sysctl_remove_name(struct sysctl_oid *parent, const char *name, int del,
int recurse);
void sysctl_rename_oid(struct sysctl_oid *oidp, const char *name);
diff --git a/freebsd/sys/sys/sysproto.h b/freebsd/sys/sys/sysproto.h
index b3c944bf..a1673035 100644
--- a/freebsd/sys/sys/sysproto.h
+++ b/freebsd/sys/sys/sysproto.h
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/kern/syscalls.master 309677 2016-12-07 16:11:55Z rwatson
+ * created from FreeBSD: head/sys/kern/syscalls.master 310638 2016-12-27 20:21:11Z jhb
*/
#ifndef _SYS_SYSPROTO_H_
@@ -1147,7 +1147,7 @@ struct mac_syscall_args {
struct getfsstat_args {
char buf_l_[PADL_(struct statfs *)]; struct statfs * buf; char buf_r_[PADR_(struct statfs *)];
char bufsize_l_[PADL_(long)]; long bufsize; char bufsize_r_[PADR_(long)];
- char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
+ char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)];
};
struct statfs_args {
char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
@@ -2395,7 +2395,7 @@ int ogetdirentries(struct thread *, struct ogetdirentries_args *);
struct freebsd4_getfsstat_args {
char buf_l_[PADL_(struct ostatfs *)]; struct ostatfs * buf; char buf_r_[PADR_(struct ostatfs *)];
char bufsize_l_[PADL_(long)]; long bufsize; char bufsize_r_[PADR_(long)];
- char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
+ char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)];
};
struct freebsd4_statfs_args {
char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
diff --git a/freebsd/sys/sys/systm.h b/freebsd/sys/sys/systm.h
index d2205a7a..2f781e9e 100644
--- a/freebsd/sys/sys/systm.h
+++ b/freebsd/sys/sys/systm.h
@@ -272,8 +272,8 @@ int vsnprintf(char *, size_t, const char *, __va_list) __printflike(3, 0);
int vsnrprintf(char *, size_t, int, const char *, __va_list) __printflike(4, 0);
int vsprintf(char *buf, const char *, __va_list) __printflike(2, 0);
int ttyprintf(struct tty *, const char *, ...) __printflike(2, 3);
-int sscanf(const char *, char const *, ...) __nonnull(1) __nonnull(2);
-int vsscanf(const char *, char const *, __va_list) __nonnull(1) __nonnull(2);
+int sscanf(const char *, char const *, ...) __nonnull(1) __nonnull(2) __scanflike(2, 3);
+int vsscanf(const char *, char const *, __va_list) __nonnull(1) __nonnull(2) __scanflike(2, 0);
long strtol(const char *, char **, int) __nonnull(1);
u_long strtoul(const char *, char **, int) __nonnull(1);
quad_t strtoq(const char *, char **, int) __nonnull(1);
diff --git a/freebsd/sys/sys/vnode.h b/freebsd/sys/sys/vnode.h
index 5400fe1c..e125b0de 100644
--- a/freebsd/sys/sys/vnode.h
+++ b/freebsd/sys/sys/vnode.h
@@ -829,6 +829,7 @@ void vput(struct vnode *vp);
void vrele(struct vnode *vp);
void vref(struct vnode *vp);
void vrefl(struct vnode *vp);
+void vrefact(struct vnode *vp);
int vrefcnt(struct vnode *vp);
void v_addpollinfo(struct vnode *vp);