svn commit: r359629 - head/lib/msun/man
Author: carlavilla (doc committer) Date: Sat Apr 4 07:43:47 2020 New Revision: 359629 URL: https://svnweb.freebsd.org/changeset/base/359629 Log: Fix typo Modified: head/lib/msun/man/cos.3 Modified: head/lib/msun/man/cos.3 == --- head/lib/msun/man/cos.3 Sat Apr 4 04:03:10 2020(r359628) +++ head/lib/msun/man/cos.3 Sat Apr 4 07:43:47 2020(r359629) @@ -83,6 +83,6 @@ These functions conform to .St -isoC-99 . .Sh HISTORY The -.Fn sin +.Fn cos function first appeared in .At v1 . ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r359631 - head/usr.bin/ruptime
Author: nyan Date: Sat Apr 4 12:07:36 2020 New Revision: 359631 URL: https://svnweb.freebsd.org/changeset/base/359631 Log: Remove extra spaces for the load average of machines that are down. PR: 245296 Submitted by: martin _at_ lispworks.com MFC after:1 week Modified: head/usr.bin/ruptime/ruptime.c Modified: head/usr.bin/ruptime/ruptime.c == --- head/usr.bin/ruptime/ruptime.c Sat Apr 4 11:11:27 2020 (r359630) +++ head/usr.bin/ruptime/ruptime.c Sat Apr 4 12:07:36 2020 (r359631) @@ -234,18 +234,21 @@ ruptime(const char *host, int aflg, int (*cmp)(const v if (hostnamewidth < (int)strlen(wd->wd_hostname)) hostnamewidth = (int)strlen(wd->wd_hostname); - for (i = 0; i < 3; i++) { - w = iwidth(wd->wd_loadav[i] / 100) + 3; - if (loadavwidth[i] < w) - loadavwidth[i] = w; + + if (!ISDOWN(hsp)) { + for (i = 0; i < 3; i++) { + w = iwidth(wd->wd_loadav[i] / 100) + 3; + if (loadavwidth[i] < w) + loadavwidth[i] = w; + } + for (hsp->hs_nusers = 0, we = &wd->wd_we[0]; +(char *)(we + 1) <= (char *)wd + cc; we++) + if (aflg || we->we_idle < 3600) + ++hsp->hs_nusers; + if (userswidth < iwidth(hsp->hs_nusers)) + userswidth = iwidth(hsp->hs_nusers); } - for (hsp->hs_nusers = 0, we = &wd->wd_we[0]; - (char *)(we + 1) <= (char *)wd + cc; we++) - if (aflg || we->we_idle < 3600) - ++hsp->hs_nusers; - if (userswidth < iwidth(hsp->hs_nusers)) - userswidth = iwidth(hsp->hs_nusers); ++hsp; ++nhosts; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r359633 - head/share/man/man4
Author: brueffer Date: Sat Apr 4 21:38:00 2020 New Revision: 359633 URL: https://svnweb.freebsd.org/changeset/base/359633 Log: Add a manpage for smbios(4). Submitted by: Gordon Bergling MFC after:1 week Differential Revision:https://reviews.freebsd.org/D23714 Added: head/share/man/man4/smbios.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileSat Apr 4 17:08:58 2020 (r359632) +++ head/share/man/man4/MakefileSat Apr 4 21:38:00 2020 (r359633) @@ -471,6 +471,7 @@ MAN=aac.4 \ sk.4 \ ${_smartpqi.4} \ smb.4 \ + smbios.4 \ smbus.4 \ smp.4 \ smsc.4 \ Added: head/share/man/man4/smbios.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/smbios.4Sat Apr 4 21:38:00 2020 (r359633) @@ -0,0 +1,63 @@ +.\" Copyright (c) 2020 Gordon Bergling +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd April 4, 2020 +.Dt SMBIOS 4 +.Os +.Sh NAME +.Nm smbios +.Nd "System Management BIOS" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device smbios" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +smbios_load="YES" +.Ed +.Sh DESCRIPTION +The System Management BIOS (SMBIOS) describes hardware components. +.Sh SEE ALSO +.Xr efi 4 +.Rs +.%T System Management BIOS (SMBIOS) Reference Specification +.%N DMTF DSP0134 +.Re +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 4.8 . +.Sh AUTHORS +The +.Nm +device driver was written by +.An Matthew N. Dodd Aq Mt win...@jurai.net . ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r359634 - head/libexec/rtld-elf
Author: kib Date: Sat Apr 4 22:37:50 2020 New Revision: 359634 URL: https://svnweb.freebsd.org/changeset/base/359634 Log: Make p_vaddr % p_align == p_offset % p_align for (some) TLS segments. See https://sourceware.org/bugzilla/show_bug.cgi?id=24606 for the test case. See https://reviews.llvm.org/D64930 for the background and more discussion. Also this fixes another bug in malloc_aligned() where total size of the allocated memory might be not enough to fit the aligned requested block after the initial pointer is incremented by the pointer size. Reviewed by: bdragon Tested by:antoine (exp-run PR 244866), bdragon, emaste Sponsored by: The FreeBSD Foundation MFC after:2 weeks Differential revision:https://reviews.freebsd.org/D21163 Modified: head/libexec/rtld-elf/map_object.c head/libexec/rtld-elf/rtld.c head/libexec/rtld-elf/rtld.h head/libexec/rtld-elf/xmalloc.c Modified: head/libexec/rtld-elf/map_object.c == --- head/libexec/rtld-elf/map_object.c Sat Apr 4 21:38:00 2020 (r359633) +++ head/libexec/rtld-elf/map_object.c Sat Apr 4 22:37:50 2020 (r359634) @@ -313,6 +313,7 @@ map_object(int fd, const char *path, const struct stat obj->tlsindex = ++tls_max_index; obj->tlssize = phtls->p_memsz; obj->tlsalign = phtls->p_align; + obj->tlspoffset = phtls->p_offset; obj->tlsinitsize = phtls->p_filesz; obj->tlsinit = mapbase + phtls->p_vaddr; } Modified: head/libexec/rtld-elf/rtld.c == --- head/libexec/rtld-elf/rtld.cSat Apr 4 21:38:00 2020 (r359633) +++ head/libexec/rtld-elf/rtld.cSat Apr 4 22:37:50 2020 (r359634) @@ -1501,6 +1501,7 @@ digest_phdr(const Elf_Phdr *phdr, int phnum, caddr_t e obj->tlsalign = ph->p_align; obj->tlsinitsize = ph->p_filesz; obj->tlsinit = (void*)(ph->p_vaddr + obj->relocbase); + obj->tlspoffset = ph->p_offset; break; case PT_GNU_STACK: @@ -4868,7 +4869,7 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcb Elf_Addr addr; Elf_Addr i; size_t extra_size, maxalign, post_size, pre_size, tls_block_size; -size_t tls_init_align; +size_t tls_init_align, tls_init_offset; if (oldtcb != NULL && tcbsize == TLS_TCB_SIZE) return (oldtcb); @@ -4885,7 +4886,7 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcb tls_block_size += pre_size + tls_static_space - TLS_TCB_SIZE - post_size; /* Allocate whole TLS block */ -tls_block = malloc_aligned(tls_block_size, maxalign); +tls_block = malloc_aligned(tls_block_size, maxalign, 0); tcb = (Elf_Addr **)(tls_block + pre_size + extra_size); if (oldtcb != NULL) { @@ -4909,15 +4910,21 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcb for (obj = globallist_curr(objs); obj != NULL; obj = globallist_next(obj)) { - if (obj->tlsoffset > 0) { - addr = (Elf_Addr)tcb + obj->tlsoffset; - if (obj->tlsinitsize > 0) - memcpy((void*) addr, obj->tlsinit, obj->tlsinitsize); - if (obj->tlssize > obj->tlsinitsize) - memset((void*)(addr + obj->tlsinitsize), 0, - obj->tlssize - obj->tlsinitsize); - dtv[obj->tlsindex + 1] = addr; + if (obj->tlsoffset == 0) + continue; + tls_init_offset = obj->tlspoffset & (obj->tlsalign - 1); + addr = (Elf_Addr)tcb + obj->tlsoffset; + if (tls_init_offset > 0) + memset((void *)addr, 0, tls_init_offset); + if (obj->tlsinitsize > 0) { + memcpy((void *)(addr + tls_init_offset), obj->tlsinit, + obj->tlsinitsize); } + if (obj->tlssize > obj->tlsinitsize) { + memset((void *)(addr + tls_init_offset + obj->tlsinitsize), + 0, obj->tlssize - obj->tlsinitsize - tls_init_offset); + } + dtv[obj->tlsindex + 1] = addr; } } @@ -4975,7 +4982,7 @@ allocate_tls(Obj_Entry *objs, void *oldtls, size_t tcb size = round(tls_static_space, ralign) + round(tcbsize, ralign); assert(tcbsize >= 2*sizeof(Elf_Addr)); -tls = malloc_aligned(size, ralign); +tls = malloc_aligned(size, ralign, 0 /* XXX */); dtv = xcalloc(tls_max_index + 2, sizeof(Elf_Addr)); segbase = (Elf_Addr)(tls + round(tls_static_space, ralign)); @@ -5068,25 +5075,24 @@ free_tls(void *tls, size_t tcbsize __unused, size_t t void * allocate_module_tls(int index) { -Obj_Entry* obj; -char* p; + Obj_Entry *obj; + char *p; -TAILQ_FOREACH(obj, &obj_list, next) { - if (obj->marker) - continue; - if (obj->tlsindex == index) - break; -
Re: svn commit: r359633 - head/share/man/man4
> Author: brueffer > Date: Sat Apr 4 21:38:00 2020 > New Revision: 359633 > URL: https://svnweb.freebsd.org/changeset/base/359633 > > Log: > Add a manpage for smbios(4). > > Submitted by: Gordon Bergling There should be an AUTHORS section entry for him writting the man page. > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D23714 > > Added: > head/share/man/man4/smbios.4 (contents, props changed) > Modified: > head/share/man/man4/Makefile > > Modified: head/share/man/man4/Makefile > == > --- head/share/man/man4/Makefile Sat Apr 4 17:08:58 2020 > (r359632) > +++ head/share/man/man4/Makefile Sat Apr 4 21:38:00 2020 > (r359633) > @@ -471,6 +471,7 @@ MAN= aac.4 \ > sk.4 \ > ${_smartpqi.4} \ > smb.4 \ > + smbios.4 \ > smbus.4 \ > smp.4 \ > smsc.4 \ > > Added: head/share/man/man4/smbios.4 > == > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/share/man/man4/smbios.4 Sat Apr 4 21:38:00 2020 > (r359633) > @@ -0,0 +1,63 @@ > +.\" Copyright (c) 2020 Gordon Bergling > +.\" > +.\" Redistribution and use in source and binary forms, with or without > +.\" modification, are permitted provided that the following conditions > +.\" are met: > +.\" 1. Redistributions of source code must retain the above copyright > +.\"notice, this list of conditions and the following disclaimer. > +.\" 2. Redistributions in binary form must reproduce the above copyright > +.\"notice, this list of conditions and the following disclaimer in the > +.\"documentation and/or other materials provided with the distribution. > +.\" > +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > PURPOSE > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > CONSEQUENTIAL > +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, > STRICT > +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > +.\" SUCH DAMAGE. > +.\" > +.\" $FreeBSD$ > +.\" > +.Dd April 4, 2020 > +.Dt SMBIOS 4 > +.Os > +.Sh NAME > +.Nm smbios > +.Nd "System Management BIOS" > +.Sh SYNOPSIS > +To compile this driver into the kernel, > +place the following lines in your > +kernel configuration file: > +.Bd -ragged -offset indent > +.Cd "device smbios" > +.Ed > +.Pp > +Alternatively, to load the driver as a > +module at boot time, place the following line in > +.Xr loader.conf 5 : > +.Bd -literal -offset indent > +smbios_load="YES" > +.Ed > +.Sh DESCRIPTION > +The System Management BIOS (SMBIOS) describes hardware components. > +.Sh SEE ALSO > +.Xr efi 4 > +.Rs > +.%T System Management BIOS (SMBIOS) Reference Specification > +.%N DMTF DSP0134 > +.Re > +.Sh HISTORY > +The > +.Nm > +device driver first appeared in > +.Fx 4.8 . > +.Sh AUTHORS > +The > +.Nm > +device driver was written by > +.An Matthew N. Dodd Aq Mt win...@jurai.net . > -- Rod Grimes rgri...@freebsd.org ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r359633 - head/share/man/man4
On Sat, 2020-04-04 at 17:10 -0700, Rodney W. Grimes wrote: > > Author: brueffer > > Date: Sat Apr 4 21:38:00 2020 > > New Revision: 359633 > > URL: https://svnweb.freebsd.org/changeset/base/359633 > > > > Log: > >Add a manpage for smbios(4). > > > >Submitted by: Gordon Bergling > > There should be an AUTHORS section entry for him writting the man > page. Is that not optional? I've never added one to any manpage I've ever written, and don't especially want it to be added. -- Ian ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r359633 - head/share/man/man4
> On Sat, 2020-04-04 at 17:10 -0700, Rodney W. Grimes wrote: > > > Author: brueffer > > > Date: Sat Apr 4 21:38:00 2020 > > > New Revision: 359633 > > > URL: https://svnweb.freebsd.org/changeset/base/359633 > > > > > > Log: > > >Add a manpage for smbios(4). > > > > > >Submitted by: Gordon Bergling > > > > There should be an AUTHORS section entry for him writting the man > > page. > > Is that not optional? I've never added one to any manpage I've ever > written, and don't especially want it to be added. Yes, of cource it is optional, but perhaps he was not aware that option even existed as he probably copied the man page from some other work which may of not had that attribution. > -- Ian -- Rod Grimes rgri...@freebsd.org ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"