Skip to content
Permalink
Browse files

Merge remote-tracking branch 'freebsd/master' into hardened/current/m…

…aster
  • Loading branch information...
opntr-auto committed Jul 5, 2015
2 parents 4033023 + 36b302f commit 67cfda1170f03991ba024be8931dee8c33d9afdf
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd June 30, 2013
.Dd July 5, 2015
.Dt LOCKING 9
.Os
.Sh NAME
@@ -387,6 +387,7 @@ At this time this is a rather easy to remember table.
.It interrupt filter: Ta \&ok Ta \&no Ta \&no Ta \&no Ta \&no Ta \&no
.It interrupt thread: Ta \&ok Ta \&ok Ta \&ok Ta \&no Ta \&no Ta \&no
.It callout: Ta \&ok Ta \&ok Ta \&ok Ta \&no Ta \&no Ta \&no
.It direct callout: Ta \&ok Ta \&no Ta \&no Ta \&no Ta \&no Ta \&no
.It system call: Ta \&ok Ta \&ok Ta \&ok Ta \&ok Ta \&ok Ta \&ok
.El
.Sh SEE ALSO
@@ -401,7 +402,8 @@ At this time this is a rather easy to remember table.
.Xr rwlock 9 ,
.Xr sema 9 ,
.Xr sleep 9 ,
.Xr sx 9
.Xr sx 9 ,
.Xr timeout 9
.Sh HISTORY
These
functions appeared in
@@ -184,15 +184,25 @@ void
cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg,
stack_t *stack)
{
struct trapframe *tf = td->td_frame;

panic("cpu_set_upcall_kse");
tf->tf_sp = STACKALIGN(stack->ss_sp + stack->ss_size);
tf->tf_elr = (register_t)entry;
tf->tf_x[0] = (register_t)arg;
}

int
cpu_set_user_tls(struct thread *td, void *tls_base)
{
struct pcb *pcb;

panic("cpu_set_user_tls");
if ((uintptr_t)tls_base >= VM_MAXUSER_ADDRESS)
return (EINVAL);

pcb = td->td_pcb;
pcb->pcb_tpidr_el0 = (register_t)tls_base;

return (0);
}

void
@@ -52,9 +52,10 @@ static __inline void
releasef(int fd)
{
struct file *fp;
cap_rights_t rights;

/* No CAP_ rights required, as we're only releasing. */
if (fget(curthread, fd, NULL, &fp) == 0) {
if (fget(curthread, fd, cap_rights_init(&rights), &fp) == 0) {
fdrop(fp, curthread);
fdrop(fp, curthread);
}
@@ -139,13 +139,14 @@ translate_fd_major_minor(struct thread *td, int fd, struct stat *buf)
{
struct file *fp;
struct vnode *vp;
cap_rights_t rights;
int major, minor;

/*
* No capability rights required here.
*/
if ((!S_ISCHR(buf->st_mode) && !S_ISBLK(buf->st_mode)) ||
fget(td, fd, 0, &fp) != 0)
fget(td, fd, cap_rights_init(&rights), &fp) != 0)
return;
vp = fp->f_vnode;
if (vp != NULL && vp->v_rdev != NULL &&
@@ -288,6 +288,7 @@ fdesc_lookup(ap)
struct thread *td = cnp->cn_thread;
struct file *fp;
struct fdesc_get_ino_args arg;
cap_rights_t rights;
int nlen = cnp->cn_namelen;
u_int fd, fd1;
int error;
@@ -332,7 +333,7 @@ fdesc_lookup(ap)
/*
* No rights to check since 'fp' isn't actually used.
*/
if ((error = fget(td, fd, NULL, &fp)) != 0)
if ((error = fget(td, fd, cap_rights_init(&rights), &fp)) != 0)
goto bad;

/* Check if we're looking up ourselves. */
@@ -2423,13 +2423,10 @@ _fget(struct thread *td, int fd, struct file **fpp, int flags,
{
struct filedesc *fdp;
struct file *fp;
cap_rights_t needrights;
int error;

*fpp = NULL;
fdp = td->td_proc->p_fd;
if (needrightsp == NULL)
needrightsp = cap_rights_init(&needrights);
error = fget_unlocked(fdp, fd, needrightsp, &fp, seqp);
if (error != 0)
return (error);
@@ -2058,14 +2058,15 @@ sys_aio_cancel(struct thread *td, struct aio_cancel_args *uap)
struct aiocblist *cbe, *cbn;
struct file *fp;
struct socket *so;
cap_rights_t rights;
int error;
int remove;
int cancelled = 0;
int notcancelled = 0;
struct vnode *vp;

/* Lookup file object. */
error = fget(td, uap->fd, NULL, &fp);
error = fget(td, uap->fd, cap_rights_init(&rights), &fp);
if (error)
return (error);

@@ -32,6 +32,7 @@
__FBSDID("$FreeBSD$");

#include <sys/param.h>
#include <sys/capsicum.h>
#include <sys/fcntl.h>
#include <sys/filedesc.h>
#include <sys/libkern.h>
@@ -467,6 +468,7 @@ audit_canon_path(struct thread *td, int dirfd, char *path, char *cpath)
char *rbuf, *fbuf, *copy;
struct filedesc *fdp;
struct sbuf sbf;
cap_rights_t rights;
int error, needslash;

WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "%s: at %s:%d",
@@ -495,7 +497,7 @@ audit_canon_path(struct thread *td, int dirfd, char *path, char *cpath)
vhold(cvnp);
} else {
/* XXX: fgetvp() that vhold()s vnode instead of vref()ing it would be better */
error = fgetvp(td, dirfd, NULL, &cvnp);
error = fgetvp(td, dirfd, cap_rights_init(&rights), &cvnp);
if (error) {
FILEDESC_SUNLOCK(fdp);
cpath[0] = '\0';
@@ -1418,7 +1418,7 @@
#define PACKAGE_NAME "ntp"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "ntp 4.2.8p2"
#define PACKAGE_STRING "ntp 4.2.8p3"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "ntp"
@@ -1427,7 +1427,7 @@
#define PACKAGE_URL "http://www.ntp.org./"

/* Define to the version of this package. */
#define PACKAGE_VERSION "4.2.8p2"
#define PACKAGE_VERSION "4.2.8p3"

/* data dir */
#define PERLLIBDIR "/usr/local/share/ntp/lib"
@@ -1608,7 +1608,7 @@ typedef unsigned int uintptr_t;
/* #undef USE_UDP_SIGPOLL */

/* Version number of package */
#define VERSION "4.2.8p2"
#define VERSION "4.2.8p3"

/* vsnprintf expands "%m" to strerror(errno) */
/* #undef VSNPRINTF_PERCENT_M */

0 comments on commit 67cfda1

Please sign in to comment.
You can’t perform that action at this time.