Skip to content

Commit

Permalink
Merge remote-tracking branch 'freebsd/master' into hardened/current/m…
Browse files Browse the repository at this point in the history
…aster
  • Loading branch information
opntr-auto committed Jul 14, 2015
2 parents 3581827 + af15cad commit bf919b9
Show file tree
Hide file tree
Showing 14 changed files with 222 additions and 49 deletions.
4 changes: 2 additions & 2 deletions bin/ps/ps.1
Original file line number Diff line number Diff line change
Expand Up @@ -738,9 +738,9 @@ Display information on all system processes:
.Xr procstat 1 ,
.Xr w 1 ,
.Xr kvm 3 ,
.Xr libxo 3
.Xr libxo 3 ,
.Xr strftime 3 ,
.Xr xo_parse_args 3
.Xr xo_parse_args 3 ,
.Xr mac 4 ,
.Xr procfs 5 ,
.Xr pstat 8 ,
Expand Down
72 changes: 72 additions & 0 deletions release/doc/en_US.ISO8859-1/relnotes/article.xml
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,15 @@
system.</para>
</important>

<para revision="278338" arch="arm">A new module for creating
<filename>rpi.dtb</filename> has been added for the Raspberry
Pi.</para>

<para revision="278340" arch="arm">The
<filename>rpi.dtb</filename> module is now installed to
<filename class="directory">/boot/dtb/</filename> by
default for the Raspberry Pi system.</para>

<para revision="279189" contrib="sponsor" sponsor="&ff;"
arch="powerpc">Kernel support for Vector-Scalar eXtension
(<acronym>VSX</acronym>) found on POWER7 and POWER8 hardware
Expand All @@ -783,6 +792,32 @@
&powerpc; processors has been overhaulded to improve
concurrency.</para>

<para revision="279824" arch="arm">A new module for creating
the <filename>dtb</filename> module for AM335x systems has
been added.</para>

<para revision="281495" contrib="sponsor" sponsor="&ff;">The
<literal>PAE_TABLES</literal> kernel configuration option has
been added for &os;/&arch.i386;, which instructs &man.pmap.9;
to use <acronym>PAE</acronym> format for page tables.</para>

<para revision="282215">The <literal>SIFTR</literal> kernel
configuration has been added, allowing building &man.siftr.4;
statically into the kernel.</para>

<para revision="282727">Support for booting relocatable kernels
has been extended to non-<acronym>EFI</acronym>
systems.</para>

<para revision="282731" arch="arm">The &arch.arm; boot loader,
<filename>ubldr</filename>, is now relocatable. In addition,
<filename>ubldr.bin</filename> is now created during build
time, which is a stripped binary with an entry point of
<literal>0</literal>, providing the ability to specify the
load address by running <literal>go
&dollar;{loadaddr}</literal> in
<literal>u-boot</literal>.</para>

<para revision="282921" contrib="sponsor" sponsor="&intelcorp;"
arch="amd64,i386">The &man.nvd.4; and &man.nvme.4; drivers are
now included in the <filename>GENERIC</filename> kernel
Expand Down Expand Up @@ -998,9 +1033,17 @@
<para revision="278551">The &man.ral.4; driver has been updated
to support the RT5390 and RT5392 chipsets.</para>

<para revision="283514" contrib="sponsor"
sponsor="&solarflare;">The &man.sfxge.4; driver has been
updated to support Solarflare Flareon Ultra 7000-series
chipsets.</para>

<para revision="283766" contrib="sponsor"
sponsor="&limelight;">The &man.em.4; driver has been updated
with improved transmission queue hang detection.</para>

<para revision="284125">The &man.cdce.4; driver has been updated
to include support for the RTL8153 chipset.</para>
</sect2>
</sect1>

Expand Down Expand Up @@ -1147,6 +1190,16 @@
<para revision="260921">The &man.nand.4; device is enabled for
ARM devices by default.</para>

<para revision="266943" arch="arm">Support for the Exynos 5420
Octa system has been added.</para>

<para revision="267390" arch="arm">The <acronym>SMP</acronym>
option has been enabled for all Exynos 5 systems supported by
&os;.</para>

<para revision="268838" arch="arm">Support for the Toradex
Apalis i.MX6 development board has been added.</para>

<para revision="273264" arch="armv6">An issue that could cause
instability when detecting <acronym>SD</acronym> cards on the
Raspberry Pi <acronym>SOC</acronym> has been fixed.</para>
Expand All @@ -1156,6 +1209,17 @@
frequency and voltage control on the Raspberry Pi
<acronym>SOC</acronym>.</para>

<para revision="277042" arch="arm">Support to turn off the
BeagleBone Black system with the &man.shutdown.8;
<literal>-p</literal> flag or by invoking &man.poweroff.8; has
been added.</para>

<para revision="277644" arch="arm">Audio transmission drivers
have been added for Digital Audio Multiplexer
(<acronym>AUDMUXM</acronym>), Smart Direct Memory Access
Controller (<acronym>SDMA</acronym>), and Syncronous Serial
Interface (<acronym>SSI</acronym>).</para>

<para revision="280259" contrib="sponsor" sponsor="&ff;">Initial
support for the ARM AArch64 architecture has been
added.</para>
Expand Down Expand Up @@ -1217,6 +1281,11 @@
is administered with the &man.automount.8; userland utility,
and the &man.automountd.8; and &man.autounmountd.8;
daemons.</para>

<para revision="273849" contrib="sponsor" sponsor="&ff;">Support
for the <literal>timeo</literal>, <literal>actimeo</literal>,
<literal>noac</literal>, and <literal>proto</literal> options
have been added to &man.mount.nfs.8;.</para>
</sect2>

<sect2 xml:id="storage-zfs">
Expand Down Expand Up @@ -1271,6 +1340,9 @@
entering <literal>set kern.vty=sc</literal> at the
&man.loader.8; prompt.</para>

<para revision="279950">Support for <literal>bzipfs</literal>
has been added to the <acronym>EFI</acronym> loader.</para>

<para revision="281616">The boot loader has been updated to
support entering the <acronym>GELI</acronym> passphrase before
loading the kernel. To enable this behavior, add
Expand Down
1 change: 1 addition & 0 deletions release/doc/share/xml/sponsor.ent
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

<!ENTITY sandvine "Sandvine, Inc.">
<!ENTITY scaleengine "ScaleEngine, Inc.">
<!ENTITY solarflare "Solarflare Communications, Inc.">
<!ENTITY spectralogic "Spectra Logic">

<!ENTITY yandex "Yandex LLC">
1 change: 1 addition & 0 deletions share/man/man9/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,7 @@ MLINKS+=psignal.9 gsignal.9 \
MLINKS+=random.9 arc4rand.9 \
random.9 arc4random.9 \
random.9 read_random.9 \
random.9 read_random_uio.9 \
random.9 srandom.9
MLINKS+=refcount.9 refcount_acquire.9 \
refcount.9 refcount_init.9 \
Expand Down
41 changes: 38 additions & 3 deletions share/man/man9/random.9
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@
.\"
.\" $FreeBSD$
.\" "
.Dd June 30, 2015
.Dd July 14, 2015
.Dt RANDOM 9
.Os
.Sh NAME
.Nm arc4rand ,
.Nm arc4random ,
.Nm random ,
.Nm read_random ,
.Nm read_random_uio ,
.Nm srandom
.Nd supply pseudo-random numbers
.Sh SYNOPSIS
Expand All @@ -50,6 +51,8 @@
.In sys/random.h
.Ft int
.Fn read_random "void *buffer" "int count"
.Ft int
.Fn read_random_uio "struct uio *uio" "bool nonblock"
.Sh DESCRIPTION
The
.Fn random
Expand Down Expand Up @@ -117,11 +120,27 @@ necessary to know
that no entropy
has been returned.
.Pp
The
.Fn read_random_uio
function behaves identically to
.Xr read 2
on
.Pa /dev/random .
The
.Fa uio
argument points to a buffer where random data should be stored.
This function only returns data if the the random device is seeded.
It blocks if unseeded,
except when the
.Fa nonblock
argument is true.
.Pp
All the bits returned by
.Fn random ,
.Fn arc4rand
.Fn arc4rand ,
.Fn read_random ,
and
.Fn read_random
.Fn read_random_uio
are usable.
For example,
.Sq Li random()&01
Expand Down Expand Up @@ -168,6 +187,22 @@ The
function returns
the number of bytes placed in
.Fa buffer .
.Pp
.Fn read_random_uio
returns zero when successful,
otherwise an error code is returned.
.Sh ERRORS
.Fn read_random_uio
may fail if:
.Bl -tag -width Er
.It Bq Er EFAULT
.Fa uio
points to an invalid memory region.
.It Bq Er EWOULDBLOCK
The random device is unseeded and
.Fa nonblock
is true.
.El
.Sh AUTHORS
.An Dan Moschuk
wrote
Expand Down
19 changes: 17 additions & 2 deletions sys/compat/cloudabi/cloudabi_random.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,28 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");

#include <sys/types.h>
#include <sys/random.h>
#include <sys/uio.h>

#include <compat/cloudabi/cloudabi_proto.h>

int
cloudabi_sys_random_get(struct thread *td,
struct cloudabi_sys_random_get_args *uap)
{
struct iovec iov = {
.iov_base = uap->buf,
.iov_len = uap->nbyte
};
struct uio uio = {
.uio_iov = &iov,
.uio_iovcnt = 1,
.uio_resid = iov.iov_len,
.uio_segflg = UIO_USERSPACE,
.uio_rw = UIO_READ,
.uio_td = td
};

/* Not implemented. */
return (ENOSYS);
return (read_random_uio(&uio, false));
}
3 changes: 2 additions & 1 deletion sys/dev/ofw/ofw_bus_subr.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ ofw_bus_status_okay(device_t dev)
const char *status;

status = ofw_bus_get_status(dev);
if (status == NULL || strcmp(status, "okay") == 0)
if (status == NULL || strcmp(status, "okay") == 0 ||
strcmp(status, "ok") == 0)
return (1);

return (0);
Expand Down
9 changes: 8 additions & 1 deletion sys/dev/random/randomdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ static struct selinfo rsel;
/* ARGSUSED */
static int
randomdev_read(struct cdev *dev __unused, struct uio *uio, int flags)
{

return (read_random_uio(uio, (flags & O_NONBLOCK) != 0));
}

int
read_random_uio(struct uio *uio, bool nonblock)
{
uint8_t *random_buf;
int error;
Expand All @@ -161,7 +168,7 @@ randomdev_read(struct cdev *dev __unused, struct uio *uio, int flags)
/* (Un)Blocking logic */
error = 0;
while (!random_alg_context.ra_seeded()) {
if (flags & O_NONBLOCK) {
if (nonblock) {
error = EWOULDBLOCK;
break;
}
Expand Down
21 changes: 11 additions & 10 deletions sys/kern/imgact_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,7 @@ __elfN(coredump)(struct thread *td, struct vnode *vp, off_t limit, int flags)

compress = (flags & IMGACT_CORE_COMPRESS) != 0;
hdr = NULL;
tmpbuf = NULL;
TAILQ_INIT(&notelst);

/* Size the program segments. */
Expand All @@ -1262,6 +1263,14 @@ __elfN(coredump)(struct thread *td, struct vnode *vp, off_t limit, int flags)
__elfN(prepare_notes)(td, &notelst, &notesz);
coresize = round_page(hdrsize + notesz) + seginfo.size;

/* Set up core dump parameters. */
params.offset = 0;
params.active_cred = cred;
params.file_cred = NOCRED;
params.td = td;
params.vp = vp;
params.gzs = NULL;

#ifdef RACCT
if (racct_enable) {
PROC_LOCK(td->td_proc);
Expand All @@ -1278,15 +1287,6 @@ __elfN(coredump)(struct thread *td, struct vnode *vp, off_t limit, int flags)
goto done;
}

/* Set up core dump parameters. */
params.offset = 0;
params.active_cred = cred;
params.file_cred = NOCRED;
params.td = td;
params.vp = vp;
params.gzs = NULL;

tmpbuf = NULL;
#ifdef GZIO
/* Create a compression stream if necessary. */
if (compress) {
Expand Down Expand Up @@ -1343,7 +1343,8 @@ __elfN(coredump)(struct thread *td, struct vnode *vp, off_t limit, int flags)
#ifdef GZIO
if (compress) {
free(tmpbuf, M_TEMP);
gzio_fini(params.gzs);
if (params.gzs != NULL)
gzio_fini(params.gzs);
}
#endif
while ((ninfo = TAILQ_FIRST(&notelst)) != NULL) {
Expand Down
5 changes: 5 additions & 0 deletions sys/sys/random.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@

#ifdef _KERNEL

#include <sys/types.h>

struct uio;

u_int read_random(void *, u_int);
int read_random_uio(struct uio *, bool);

/*
* Note: if you add or remove members of random_entropy_source, remember to also update the
Expand Down
1 change: 1 addition & 0 deletions usr.bin/rctl/rctl.8
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ Enable
This defaults to 1, unless
.Cd "options RACCT_DEFAULT_TO_DISABLED"
is set in the kernel configuration file.
.El
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
Expand Down
2 changes: 1 addition & 1 deletion usr.bin/w/w.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ static struct entry {

#define W_DISPUSERSIZE 10
#define W_DISPLINESIZE 8
#define W_DISPHOSTSIZE 24
#define W_DISPHOSTSIZE 40

static void pr_header(time_t *, int);
static struct stat *ttystat(char *);
Expand Down
Loading

0 comments on commit bf919b9

Please sign in to comment.