freebsd-dev/sys
Dimitry Andric 0f166953f7 Use NLDT to get number of LDTs on i386
Compiling a GENERIC kernel for i386 with clang 8.0 results in the
following warning:

/usr/src/sys/i386/i386/sys_machdep.c:542:40: error: 'sizeof ((ldt))' will return the size of the pointer, not the array itself [-Werror,-Wsizeof-pointer-div]
        nldt = pldt != NULL ? pldt->ldt_len : nitems(ldt);
                                              ^~~~~~~~~~~
/usr/src/sys/sys/param.h:299:32: note: expanded from macro 'nitems'
#define nitems(x)       (sizeof((x)) / sizeof((x)[0]))
                         ~~~~~~~~~~~ ^

Indeed, 'ldt' is declared as 'union descriptor *', so nitems() is not
the right way to determine the number of LDTs.  Instead, the NLDT define
from sys/x86/include/segments.h should be used.

Reviewed by:	kib
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D19074
2019-02-04 18:07:03 +00:00
..
amd64 Enable COVERAGE and KCOV by default on arm64 and amd64. 2019-02-03 12:46:27 +00:00
arm awg: fix soft reset failure with no link 2019-01-21 14:35:36 +00:00
arm64 Enable COVERAGE and KCOV by default on arm64 and amd64. 2019-02-03 12:46:27 +00:00
bsm Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
cam Use switch instead of chained if/else to improve readability. 2019-02-04 01:20:56 +00:00
cddl Add missed tunables/sysctls for some new vdev variables. 2019-02-04 16:13:41 +00:00
compat Fix compilation with 'option NDISAPI + device ndis' and 2019-01-30 11:40:12 +00:00
conf Only enable trace-cmp on Clang and modern GCC. 2019-02-04 16:55:24 +00:00
contrib Remove two more #ifdefs missed in r343701. 2019-02-04 05:37:16 +00:00
crypto Generalize AES iov optimization 2018-12-13 04:40:53 +00:00
ddb ddb: Enable 'thread <address>' 2018-10-20 20:45:49 +00:00
dev netmap: upgrade sync-kloop support 2019-02-02 22:39:29 +00:00
dts [rpi] Reorganize spigen(4) overlays for Raspberry Pi 2019-01-16 01:08:34 +00:00
fs ext2fs: Add some extra consistency checks for the superblock. 2019-01-25 22:22:29 +00:00
gdb
geom geom_uzip(4): set 'gp != NULL' assertion on top of the function 2019-01-26 17:17:25 +00:00
gnu Import DTS from Linux 4.20 2019-01-11 09:40:34 +00:00
i386 Use NLDT to get number of LDTs on i386 2019-02-04 18:07:03 +00:00
isa Reapply, with minor tweaks, r338025, from the original commit: 2018-09-26 17:12:14 +00:00
kern Do not call PHOLD() while owning the allproc_lock sx. 2019-02-03 21:31:40 +00:00
kgssapi
libkern mcount: tidy up ANSIfication 2018-10-20 22:39:35 +00:00
mips Make iflib a loadable module. 2019-01-31 19:05:56 +00:00
modules qlnxr(4), qlnxe(4): Unbreak gcc build 2019-02-01 23:04:45 +00:00
net Teach pfil_ioctl() about VIMAGE. 2019-02-03 08:28:02 +00:00
net80211 net80211(4): do not setup Tx parameters for unsupported modes. 2019-02-03 04:31:50 +00:00
netgraph Allow ng_nat to be attached to a ethernet interface directly via ng_ether(4) 2018-12-17 16:00:35 +00:00
netinet When handling SYN-ACK segments in the SYN-RCVD state, set tp->snd_wnd 2019-02-01 12:33:00 +00:00
netinet6 New pfil(9) KPI together with newborn pfil API and control utility. 2019-01-31 23:01:03 +00:00
netipsec Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
netpfil Return PFIL_CONSUMED if packet was consumed. While here gather all 2019-02-02 05:49:05 +00:00
netsmb Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
nfs
nfsclient
nfsserver
nlm
ofed Mechanical cleanup of epoch(9) usage in network stack. 2019-01-09 01:11:19 +00:00
opencrypto Plug memory leak for AES_*_NIST_GMAC algorithms. 2018-12-13 08:59:51 +00:00
powerpc powerpc64: Add a trap stack area 2019-02-04 16:02:03 +00:00
riscv Follow arm[32] and sparc64 KAPI and provide the FreeBSD standard spelling 2019-01-29 20:10:27 +00:00
rpc Add kern.rpc.gss.client_max, to make it possible to bump it easily. 2018-12-15 11:32:11 +00:00
security Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
sparc64 Make iflib a loadable module. 2019-01-31 19:05:56 +00:00
sys Regen after r342190. 2019-01-31 22:58:17 +00:00
teken Fix function keys for syscons in cons25 mode (vidcontrol -T cons25). 2019-02-01 16:07:49 +00:00
tests
tools make_dtb.sh: Use $CPP instead of assuming that cpp is in $PATH 2018-12-14 23:53:28 +00:00
ufs This bug was introduced with the change to use softdep_bp_to_mp() in 2019-01-28 21:36:45 +00:00
vm Allow vm_page_free_prep() to dequeue pages without the page lock. 2019-02-03 18:43:20 +00:00
x86 x86: correctly limit max memory resource address.. 2019-02-01 20:46:47 +00:00
xdr
xen xen: introduce a new way to setup event channel upcall 2019-01-30 11:34:52 +00:00
Makefile