Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge FreeBSD 2024-06-14 #2218

Merged
merged 181 commits into from
Sep 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
5ee5c40
arm64 pmap: Defer bti lookup
alcriceedu Jun 7, 2024
888796a
libm: fma: correct zero sign with small inputs
emaste Mar 19, 2024
13a5123
nfsd: Delete an unused VNET global variable
Jun 8, 2024
ebc2bab
pflog: Correctly check if bpf peers are present
gmshake Jun 9, 2024
2671bde
pfsync: Correctly check if bpf peers are present
gmshake Jun 9, 2024
3ce9b2e
ti/am335x: Fix the device_set_descf() call in dmtpps_probe()
markjdb Jun 9, 2024
da925fc
libc/tests: Further refine the condition for installing h_raw
markjdb Jun 1, 2024
bbca3a7
sound: Include sound(4) channel information in sndstat nvlist
christosmarg Jun 9, 2024
6c5ee6e
simd(7): add missing aarch64 SIMD functions
soppelmann Jun 7, 2024
e335a74
accf_http.9: Fix grammar in description (singular/plural)
bsdbcr Jun 10, 2024
e5a54f1
accf_tls(9): Fix grammar in description (singular/plural)
bsdbcr Jun 10, 2024
3ff0dc1
vmxnet3: make descriptor count checks more robust
kprovost Jun 10, 2024
fd911ae
Hyper-V: remove unused alloc_pcpu_ptr()
Jun 10, 2024
a87651e
ktrace(1): add xref to namei(9)
emaste Jun 10, 2024
87e5b17
prepare-commit-msg: add 50 column marker
emaste Jun 9, 2024
63f7a38
vmm: Only link the arm64 hyp code in vmm.ko once
zxombie Jun 10, 2024
86bafdd
arm64: Fix indentation to be consistent
zxombie Jun 10, 2024
6abad5b
Remove the arm FIQ support
zxombie Jun 10, 2024
0e34d09
Add WITHOUT_LLVM_BINUTILS src.conf description
emaste Jun 10, 2024
9747d11
Add some ATF tests for ctladm
asomers Jun 5, 2024
591de75
ctladm: print port number with a succesful "port -c" command
asomers Jun 5, 2024
afecc74
ctladm: better documentation for adding and removing cfiscsi ports
asomers Jun 6, 2024
edbd489
ctladm: don't require the use of "-p" with "port -r"
asomers Jun 6, 2024
81ef0a8
Fix mtree entry for ctladm tests
asomers Jun 10, 2024
7affbee
virstor: basic functional test
rlibby Jun 10, 2024
0f409d2
BSD.tests.dist: add entry for virstor test
rlibby Jun 10, 2024
a2fda81
virstor: write large maps in chunks during label
rlibby Jun 11, 2024
e754909
virstor: remove relation between chunk size and MAXPHYS
rlibby Jun 11, 2024
f65d0b1
stress2: Replace rename() with arc4random()
phoatfreebsd Jun 11, 2024
e02d20d
Hyper_V: add a boot parameter to tlb flush hypercall
Jun 11, 2024
abf239c
arm64/vmm: Add braces to fix the gcc build
zxombie Jun 11, 2024
9a4813e
bhyve: Fix the build with gcc
zxombie Jun 11, 2024
cb53f83
Revert "stress2: Replace rename() with arc4random()"
phoatfreebsd Jun 11, 2024
ff4a72c
stress2: Replace random() with arc4random()
phoatfreebsd Jun 11, 2024
0277c0c
ktrace(1): add more xrefs
emaste Jun 11, 2024
dd0e5c0
swap_pager: small improvement to find_least
Jun 11, 2024
703768a
mx25l.4: Document the correct disk device path
jrtc27 Jun 11, 2024
92927b8
msun: update Clang bug reference in fma test
emaste Jun 12, 2024
e77ad95
Revert "libm: fma: correct zero sign with small inputs"
emaste Jun 12, 2024
a880104
swap_pager: add new page range struct
Jun 12, 2024
f0a0420
powerof2: replace loops with fls or ilog2
Jun 12, 2024
b8a496d
lib: Remove __ARM_ARCH checks that are always true
zxombie Jun 12, 2024
bbdf32d
nanobsd: Remove pre-armv6 support
zxombie Jun 12, 2024
62cb671
riscv: include ahci device to GENERIC.
bukinr Jun 12, 2024
a7ae78c
cdefs: Add __writeonly to mark write only vars
zxombie Jun 12, 2024
19782e5
ibcore: Mark write-only variables
zxombie Jun 12, 2024
4eec584
arm64: Clear td_frame when returning to userspace
zxombie Jun 12, 2024
a30149b
arm64: Create a version of vfp_save_state for cpu_switch
zxombie Jun 12, 2024
8a9f0fa
ifconfig: Fix default netmask calculation
grembo Jun 12, 2024
20a2fe6
pf: correctly reset max_win if the SYN-ACK lacks a wscale option.
kprovost Jun 12, 2024
07ed239
pf: make TCP sequence number tracking less strict by one octet for FI…
kprovost Jun 12, 2024
ec1f285
nfscl: Add support for the NFSv4.1/4.2 WANT_xxx flags
Jun 12, 2024
4308d6e
nfscl: Add a check for VREG for delegations
Jun 12, 2024
bb53f07
nfscl: Add support for read delegations and atomic upgrade
Jun 12, 2024
a16cb87
tzsetup: Correct UTC description
emaste Jun 13, 2024
c0d0bc2
subr_pctrie: add leaf callbacks to pctrie_reclaim
Jun 13, 2024
d2acf0a
swap_pager: pctrie_reclaim_cb in meta_free_all
Jun 13, 2024
a7f67eb
subr_rangeset: use pctrie_reclaim_cb in remove_all
Jun 13, 2024
268f19a
vm: Reduce address space fragmentation
alcriceedu Jun 9, 2024
d19851f
subr_pctrie: add a word to a comment
Jun 13, 2024
d9220f6
uniq tests: Make uniq_test:stdout more reliable
markjdb Jun 14, 2024
ab250b0
bnxt: Use a simpler test for 32-bit platforms
markjdb Jun 14, 2024
69ccea1
vm_page: Let vm_page_init_page() take a pool parameter
markjdb Jun 14, 2024
d7ec4a8
vm_phys: Factor out some calls to vm_freelist_add()
markjdb Jun 14, 2024
69cbb18
vm_phys: Add a vm_phys_seg_paddr_to_vm_page() helper
markjdb Jun 14, 2024
b16b4c2
vm_page: Implement lazy page initialization
markjdb Jun 14, 2024
a03354b
arm64/vmm: Implement vm_disable_vcpu_creation()
markjdb Jun 14, 2024
d730cde
arm64/vmm: Avoid unnecessary indirection in vmmops_modinit()
markjdb Jun 14, 2024
aede0d3
amd64/vmm: Make vmm.h more self-contained
markjdb Jun 14, 2024
fbff6d5
vm_phys: Fix vm_phys_find_range() after commit 69cbb18746b6
markjdb Jun 14, 2024
2a21cfe
pctrie: avoid typecast
Jun 14, 2024
70e3e1b
tzsetup: add detail for -s option
emaste Jun 13, 2024
de4bfd6
udp_var: correct intoudpcb macro unintended identifier dependency
May 7, 2024
ec73588
libkern.h: Make more self-sufficient
bsdimp Jun 14, 2024
4fd5b8a
boot1.chrp: Include memset
bsdimp Jun 14, 2024
aa6fb1d
tzsetup: ask local/UTC question only on x86
emaste Jun 12, 2024
fb1028d
hda: add support for Tiger Lake-H
adamretter Jun 14, 2024
97ab935
rk_pinctrl: fix error check
VoxSciurorum Jun 14, 2024
cadc9c7
boot/efi: Fix warning for non-standard formats when debugging
VoxSciurorum Jun 14, 2024
0e4e770
riscv: adjust physmem reservation
mhorne Jun 14, 2024
3ff9815
riscv: Don't handle missing kernel L3 pages
mhorne Nov 24, 2023
134f7b5
riscv: improve commentary around initial stvec
mhorne Jun 3, 2024
2909ddd
ctld: plug memory leaks
asomers Jun 12, 2024
a70ecfb
rc.subr: add new sysv option for service jails
netchild Jun 14, 2024
2d08f6b
rc.subr: add some sanity checks for service jails
netchild Jun 14, 2024
80b4232
nvme: Fix panic on detach after ce75bfcac9cfe
amotin Jun 14, 2024
517c585
vm_phys: Make sure that vm_phys_enq_chunk() stays in bounds
markjdb Jun 14, 2024
5198178
cdefs.h: Add POSIX.1-2024 values
bsdimp Jun 14, 2024
1bce7cd
nvme: Add Linux copatible ioctls
bsdimp Jun 14, 2024
ad9cc86
linux: Translate Linux NVME ioctls to the lower layers.
Jun 14, 2024
c18b997
arm64 pmap: Defer bti lookup
alcriceedu Jun 7, 2024
839df3a
libm: fma: correct zero sign with small inputs
emaste Mar 19, 2024
c680ac2
nfsd: Delete an unused VNET global variable
Jun 8, 2024
730b1cb
pflog: Correctly check if bpf peers are present
gmshake Jun 9, 2024
b92270b
pfsync: Correctly check if bpf peers are present
gmshake Jun 9, 2024
e728b67
ti/am335x: Fix the device_set_descf() call in dmtpps_probe()
markjdb Jun 9, 2024
71fef73
libc/tests: Further refine the condition for installing h_raw
markjdb Jun 1, 2024
76db9c9
sound: Include sound(4) channel information in sndstat nvlist
christosmarg Jun 9, 2024
7b14d35
simd(7): add missing aarch64 SIMD functions
soppelmann Jun 7, 2024
218fc96
accf_http.9: Fix grammar in description (singular/plural)
bsdbcr Jun 10, 2024
46b2bc6
accf_tls(9): Fix grammar in description (singular/plural)
bsdbcr Jun 10, 2024
212ff32
vmxnet3: make descriptor count checks more robust
kprovost Jun 10, 2024
7fa5574
Hyper-V: remove unused alloc_pcpu_ptr()
Jun 10, 2024
de300a5
ktrace(1): add xref to namei(9)
emaste Jun 10, 2024
7c9910b
prepare-commit-msg: add 50 column marker
emaste Jun 9, 2024
1090456
vmm: Only link the arm64 hyp code in vmm.ko once
zxombie Jun 10, 2024
7b8ca19
arm64: Fix indentation to be consistent
zxombie Jun 10, 2024
fb2d8ca
Remove the arm FIQ support
zxombie Jun 10, 2024
07b09f1
Add WITHOUT_LLVM_BINUTILS src.conf description
emaste Jun 10, 2024
b886255
Add some ATF tests for ctladm
asomers Jun 5, 2024
761e840
ctladm: print port number with a succesful "port -c" command
asomers Jun 5, 2024
2a38cba
ctladm: better documentation for adding and removing cfiscsi ports
asomers Jun 6, 2024
b676259
ctladm: don't require the use of "-p" with "port -r"
asomers Jun 6, 2024
bd6fc38
Fix mtree entry for ctladm tests
asomers Jun 10, 2024
8b6cc37
virstor: basic functional test
rlibby Jun 10, 2024
a3f7338
BSD.tests.dist: add entry for virstor test
rlibby Jun 10, 2024
a9733c1
virstor: write large maps in chunks during label
rlibby Jun 11, 2024
542f9c1
virstor: remove relation between chunk size and MAXPHYS
rlibby Jun 11, 2024
e8f777d
stress2: Replace rename() with arc4random()
phoatfreebsd Jun 11, 2024
c128e60
Hyper_V: add a boot parameter to tlb flush hypercall
Jun 11, 2024
279f135
arm64/vmm: Add braces to fix the gcc build
zxombie Jun 11, 2024
2a3d2ea
bhyve: Fix the build with gcc
zxombie Jun 11, 2024
b7c20a9
Revert "stress2: Replace rename() with arc4random()"
phoatfreebsd Jun 11, 2024
0f8c5e7
stress2: Replace random() with arc4random()
phoatfreebsd Jun 11, 2024
8cba07c
ktrace(1): add more xrefs
emaste Jun 11, 2024
c4386ac
swap_pager: small improvement to find_least
Jun 11, 2024
d216b15
mx25l.4: Document the correct disk device path
jrtc27 Jun 11, 2024
5db5273
msun: update Clang bug reference in fma test
emaste Jun 12, 2024
fbbb795
Revert "libm: fma: correct zero sign with small inputs"
emaste Jun 12, 2024
79bd377
swap_pager: add new page range struct
Jun 12, 2024
6b3eb43
powerof2: replace loops with fls or ilog2
Jun 12, 2024
b135954
lib: Remove __ARM_ARCH checks that are always true
zxombie Jun 12, 2024
69dd167
nanobsd: Remove pre-armv6 support
zxombie Jun 12, 2024
fd535de
riscv: include ahci device to GENERIC.
bukinr Jun 12, 2024
df97ff2
cdefs: Add __writeonly to mark write only vars
zxombie Jun 12, 2024
8c1ee4d
ibcore: Mark write-only variables
zxombie Jun 12, 2024
06914c0
arm64: Clear td_frame when returning to userspace
zxombie Jun 12, 2024
1072d4d
arm64: Create a version of vfp_save_state for cpu_switch
zxombie Jun 12, 2024
7871328
ifconfig: Fix default netmask calculation
grembo Jun 12, 2024
57bb80e
pf: correctly reset max_win if the SYN-ACK lacks a wscale option.
kprovost Jun 12, 2024
820798f
pf: make TCP sequence number tracking less strict by one octet for FI…
kprovost Jun 12, 2024
cf32017
nfscl: Add support for the NFSv4.1/4.2 WANT_xxx flags
Jun 12, 2024
e5e91b4
nfscl: Add a check for VREG for delegations
Jun 12, 2024
1183256
nfscl: Add support for read delegations and atomic upgrade
Jun 12, 2024
ce321b1
tzsetup: Correct UTC description
emaste Jun 13, 2024
7d2f12a
subr_pctrie: add leaf callbacks to pctrie_reclaim
Jun 13, 2024
d5edd39
swap_pager: pctrie_reclaim_cb in meta_free_all
Jun 13, 2024
65f19a6
subr_rangeset: use pctrie_reclaim_cb in remove_all
Jun 13, 2024
71226ba
vm: Reduce address space fragmentation
alcriceedu Jun 9, 2024
2e904c4
subr_pctrie: add a word to a comment
Jun 13, 2024
8328cea
uniq tests: Make uniq_test:stdout more reliable
markjdb Jun 14, 2024
84a1760
bnxt: Use a simpler test for 32-bit platforms
markjdb Jun 14, 2024
da2cc31
vm_page: Let vm_page_init_page() take a pool parameter
markjdb Jun 14, 2024
b43ac39
vm_phys: Factor out some calls to vm_freelist_add()
markjdb Jun 14, 2024
79a702a
vm_phys: Add a vm_phys_seg_paddr_to_vm_page() helper
markjdb Jun 14, 2024
2dbbc6e
vm_page: Implement lazy page initialization
markjdb Jun 14, 2024
22caebc
arm64/vmm: Implement vm_disable_vcpu_creation()
markjdb Jun 14, 2024
cd9cbce
arm64/vmm: Avoid unnecessary indirection in vmmops_modinit()
markjdb Jun 14, 2024
4c1b351
amd64/vmm: Make vmm.h more self-contained
markjdb Jun 14, 2024
caf7d20
vm_phys: Fix vm_phys_find_range() after commit 69cbb18746b6
markjdb Jun 14, 2024
5a0c7d7
pctrie: avoid typecast
Jun 14, 2024
def4b03
tzsetup: add detail for -s option
emaste Jun 13, 2024
924b5bd
udp_var: correct intoudpcb macro unintended identifier dependency
May 7, 2024
9f22148
libkern.h: Make more self-sufficient
bsdimp Jun 14, 2024
614a96a
boot1.chrp: Include memset
bsdimp Jun 14, 2024
2e3f0fd
tzsetup: ask local/UTC question only on x86
emaste Jun 12, 2024
65945f6
hda: add support for Tiger Lake-H
adamretter Jun 14, 2024
cc90a0b
rk_pinctrl: fix error check
VoxSciurorum Jun 14, 2024
926df3e
boot/efi: Fix warning for non-standard formats when debugging
VoxSciurorum Jun 14, 2024
4e870d7
riscv: adjust physmem reservation
mhorne Jun 14, 2024
ecef1e6
riscv: Don't handle missing kernel L3 pages
mhorne Nov 24, 2023
72858fa
riscv: improve commentary around initial stvec
mhorne Jun 3, 2024
84a6895
ctld: plug memory leaks
asomers Jun 12, 2024
818c307
rc.subr: add new sysv option for service jails
netchild Jun 14, 2024
c0ac160
rc.subr: add some sanity checks for service jails
netchild Jun 14, 2024
868205b
nvme: Fix panic on detach after ce75bfcac9cfe
amotin Jun 14, 2024
d1f6589
vm_phys: Make sure that vm_phys_enq_chunk() stays in bounds
markjdb Jun 14, 2024
bf13de5
cdefs.h: Add POSIX.1-2024 values
bsdimp Jun 14, 2024
b303f79
nvme: Add Linux copatible ioctls
bsdimp Jun 14, 2024
7a6bb1a
linux: Translate Linux NVME ioctls to the lower layers.
Jun 14, 2024
e52eeb8
Revert "tzsetup: ask local/UTC question only on x86"
emaste Jun 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions etc/mtree/BSD.tests.dist
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,8 @@
etalon
..
..
virstor
..
..
..
kern
Expand Down Expand Up @@ -1223,6 +1225,8 @@
usr.sbin
chown
..
ctladm
..
daemon
..
etcupdate
Expand Down
99 changes: 57 additions & 42 deletions lib/geom/virstor/geom_virstor.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ virstor_label(struct gctl_req *req)
char param[32];
int hardcode, nargs, error;
struct virstor_map_entry *map;
size_t total_chunks; /* We'll run out of memory if
this needs to be bigger. */
size_t total_chunks, write_max_map_entries;
unsigned int map_chunks; /* Chunks needed by the map (map size). */
size_t map_size; /* In bytes. */
ssize_t written;
Expand Down Expand Up @@ -196,27 +195,6 @@ virstor_label(struct gctl_req *req)
return;
}

if (md.md_chunk_size % MAXPHYS != 0) {
/* XXX: This is not strictly needed, but it's convenient to
* impose some limitations on it, so why not MAXPHYS. */
size_t new_size = rounddown(md.md_chunk_size, MAXPHYS);
if (new_size < md.md_chunk_size)
new_size += MAXPHYS;
fprintf(stderr, "Resizing chunk size to be a multiple of "
"MAXPHYS (%d kB).\n", MAXPHYS / 1024);
fprintf(stderr, "New chunk size: %zu kB\n", new_size / 1024);
md.md_chunk_size = new_size;
}

if (md.md_virsize % md.md_chunk_size != 0) {
off_t chunk_count = md.md_virsize / md.md_chunk_size;
md.md_virsize = chunk_count * md.md_chunk_size;
fprintf(stderr, "Resizing virtual size to be a multiple of "
"chunk size.\n");
fprintf(stderr, "New virtual size: %zu MB\n",
(size_t)(md.md_virsize/(1024 * 1024)));
}

msize = secsize = 0;
for (i = 1; i < (unsigned)nargs; i++) {
snprintf(param, sizeof(param), "arg%u", i);
Expand All @@ -241,11 +219,20 @@ virstor_label(struct gctl_req *req)
}

if (md.md_chunk_size % secsize != 0) {
fprintf(stderr, "Error: chunk size is not a multiple of sector "
"size.");
gctl_error(req, "Chunk size (in bytes) must be multiple of %u.",
(unsigned int)secsize);
return;
size_t new_size = roundup(md.md_chunk_size, secsize);
fprintf(stderr, "Resizing chunk size to be a multiple of "
"sector size (%zu bytes).\n", secsize);
fprintf(stderr, "New chunk size: %zu kB\n", new_size / 1024);
md.md_chunk_size = new_size;
}

if (md.md_virsize % md.md_chunk_size != 0) {
off_t chunk_count = md.md_virsize / md.md_chunk_size;
md.md_virsize = chunk_count * md.md_chunk_size;
fprintf(stderr, "Resizing virtual size to be a multiple of "
"chunk size.\n");
fprintf(stderr, "New virtual size: %zu MB\n",
(size_t)(md.md_virsize / (1024 * 1024)));
}

total_chunks = md.md_virsize / md.md_chunk_size;
Expand Down Expand Up @@ -325,28 +312,56 @@ virstor_label(struct gctl_req *req)
sprintf(param, "%s%s", _PATH_DEV, name);
fd = open(param, O_RDWR);
}
if (fd < 0)
if (fd < 0) {
gctl_error(req, "Cannot open provider %s to write map", name);
return;
}

/* Do it with calloc because there might be a need to set up chunk flags
* in the future */
map = calloc(total_chunks, sizeof(*map));
/*
* Initialize and write the map. Don't malloc the whole map at once,
* in case it's large. Use calloc because there might be a need to set
* up chunk flags in the future.
*/
write_max_map_entries = 1024 * 1024 / sizeof(*map);
if (write_max_map_entries > total_chunks)
write_max_map_entries = total_chunks;
map = calloc(write_max_map_entries, sizeof(*map));
if (map == NULL) {
gctl_error(req,
"Out of memory (need %zu bytes for allocation map)",
map_size);
write_max_map_entries * sizeof(*map));
close(fd);
return;
}

written = pwrite(fd, map, map_size, 0);
free(map);
if ((size_t)written != map_size) {
if (verbose) {
fprintf(stderr, "\nTried to write %zu, written %zd (%s)\n",
map_size, written, strerror(errno));
for (size_t chunk = 0; chunk < total_chunks;
chunk += write_max_map_entries) {
size_t bytes_to_write, entries_to_write;

entries_to_write = total_chunks - chunk;
if (entries_to_write > write_max_map_entries)
entries_to_write = write_max_map_entries;
bytes_to_write = entries_to_write * sizeof(*map);
for (size_t off = 0; off < bytes_to_write; off += written) {
written = write(fd, ((char *)map) + off,
bytes_to_write - off);
if (written < 0) {
if (verbose) {
fprintf(stderr,
"\nError writing map at offset "
"%zu of %zu: %s\n",
chunk * sizeof(*map) + off,
map_size, strerror(errno));
}
gctl_error(req,
"Error writing out allocation map!");
free(map);
close(fd);
return;
}
}
gctl_error(req, "Error writing out allocation map!");
return;
}
free(map);
map = NULL;
close (fd);

if (verbose)
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/arm/aeabi/aeabi_vfp.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
* C Helper macros
*/

#if __ARM_ARCH >= 6 && !defined(SOFTFLOAT_FOR_GCC)
#if !defined(SOFTFLOAT_FOR_GCC)
/*
* Generate a function that will either call into the VFP implementation,
* or the soft float version for a given __aeabi_* helper. The function
Expand Down
8 changes: 4 additions & 4 deletions lib/libc/arm/gen/_setjmp.S
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@
ENTRY(_setjmp)
ldr r1, .L_setjmp_magic

#if !defined(_STANDALONE) && __ARM_ARCH >= 6 && !defined(SOFTFLOAT_FOR_GCC)
#if !defined(_STANDALONE) && !defined(SOFTFLOAT_FOR_GCC)
add r2, r0, #(_JB_REG_D8 * 4)
vstmia r2, {d8-d15}
vmrs r2, fpscr
str r2, [r0, #(_JB_REG_FPSCR * 4)]
#endif /* !_STANDALONE && __ARM_ARCH >= 6 */
#endif /* !_STANDALONE && !SOFTFLOAT_FOR_GCC */

str r1, [r0]

Expand Down Expand Up @@ -91,12 +91,12 @@ ENTRY(_longjmp)
teq ip, r2 /* magic correct? */
bne botch /* no, botch */

#if !defined(_STANDALONE) && __ARM_ARCH >= 6 && !defined(SOFTFLOAT_FOR_GCC)
#if !defined(_STANDALONE) && !defined(SOFTFLOAT_FOR_GCC)
add ip, r0, #(_JB_REG_D8 * 4)
vldmia ip, {d8-d15}
ldr ip, [r0, #(_JB_REG_FPSCR * 4)]
vmsr fpscr, ip
#endif /* !_STANDALONE && __ARM_ARCH >= 6 */
#endif /* !_STANDALONE && !SOFTFLOAT_FOR_GCC */

add r0, r0, #(_JB_REG_R4 * 4)
/* Restore integer registers */
Expand Down
4 changes: 2 additions & 2 deletions lib/libc/arm/gen/setjmp.S
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ ENTRY(setjmp)

ldr r1, .Lsetjmp_magic

#if __ARM_ARCH >= 6 && !defined(SOFTFLOAT_FOR_GCC)
#if !defined(SOFTFLOAT_FOR_GCC)
add r2, r0, #(_JB_REG_D8 * 4)
vstmia r2, {d8-d15}
vmrs r2, fpscr
Expand Down Expand Up @@ -102,7 +102,7 @@ ENTRY(__longjmp)
bl PIC_SYM(_C_LABEL(sigprocmask), PLT)
ldmfd sp!, {r0-r2, r14}

#if __ARM_ARCH >= 6 && !defined(SOFTFLOAT_FOR_GCC)
#if !defined(SOFTFLOAT_FOR_GCC)
add ip, r0, #(_JB_REG_D8 * 4)
vldmia ip, {d8-d15}
ldr ip, [r0, #(_JB_REG_FPSCR * 4)]
Expand Down
7 changes: 0 additions & 7 deletions lib/libsys/arm/__vdso_gettc.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include <errno.h>
#include "libc_private.h"

#if __ARM_ARCH >= 6
static inline uint64_t
cp15_cntvct_get(void)
{
Expand All @@ -55,7 +54,6 @@ cp15_cntpct_get(void)
__asm __volatile("mrrc\tp15, 0, %Q0, %R0, c14" : "=r" (reg));
return (reg);
}
#endif

#pragma weak __vdso_gettc
int
Expand All @@ -64,7 +62,6 @@ __vdso_gettc(const struct vdso_timehands *th, u_int *tc)

if (th->th_algo != VDSO_TH_ALGO_ARM_GENTIM)
return (ENOSYS);
#if __ARM_ARCH >= 6
/*
* Userspace gettimeofday() is only enabled on ARMv7 CPUs, but
* libc is compiled for ARMv6. Due to clang issues, .arch
Expand All @@ -73,10 +70,6 @@ __vdso_gettc(const struct vdso_timehands *th, u_int *tc)
__asm __volatile(".word\t0xf57ff06f" : : : "memory"); /* isb */
*tc = th->th_physical == 0 ? cp15_cntvct_get() : cp15_cntpct_get();
return (0);
#else
*tc = 0;
return (ENOSYS);
#endif
}

#pragma weak __vdso_gettimekeep
Expand Down
6 changes: 1 addition & 5 deletions lib/msun/arm/fenv.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@

#include <machine/acle-compat.h>

#if __ARM_ARCH >= 6
#define FENV_ARMv6
#endif

/* When SOFTFP_ABI is defined we are using the softfp ABI. */
#if defined(__VFP_FP__) && !defined(__ARM_PCS_VFP)
#define SOFTFP_ABI
Expand All @@ -52,7 +48,7 @@ const fenv_t __fe_dfl_env = 0;


/* If this is a non-mangled softfp version special processing is required */
#if defined(FENV_MANGLE) || !defined(SOFTFP_ABI) || !defined(FENV_ARMv6)
#if defined(FENV_MANGLE) || !defined(SOFTFP_ABI)

/*
* The following macros map between the softfloat emulator's flags and
Expand Down
4 changes: 2 additions & 2 deletions lib/msun/src/s_fma.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ fma(double x, double y, double z)
zs = copysign(DBL_MIN, zs);

fesetround(FE_TONEAREST);
/* work around clang bug 8100 */
/* work around clang issue #8472 */
volatile double vxs = xs;

/*
Expand Down Expand Up @@ -276,7 +276,7 @@ fma(double x, double y, double z)
* rounding modes.
*/
fesetround(oround);
/* work around clang bug 8100 */
/* work around clang issue #8472 */
volatile double vrlo = r.lo;
adj = vrlo + xy.lo;
return (ldexp(r.hi + adj, spread));
Expand Down
4 changes: 2 additions & 2 deletions lib/msun/src/s_fmal.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ fmal(long double x, long double y, long double z)
zs = copysignl(LDBL_MIN, zs);

fesetround(FE_TONEAREST);
/* work around clang bug 8100 */
/* work around clang issue #8472 */
volatile long double vxs = xs;

/*
Expand Down Expand Up @@ -257,7 +257,7 @@ fmal(long double x, long double y, long double z)
* rounding modes.
*/
fesetround(oround);
/* work around clang bug 8100 */
/* work around clang issue #8472 */
volatile long double vrlo = r.lo;
adj = vrlo + xy.lo;
return (ldexpl(r.hi + adj, spread));
Expand Down
50 changes: 45 additions & 5 deletions libexec/rc/rc.subr
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,7 @@ run_rc_command()
if [ -n "$_svcj_options" ]; then # translate service jail options
_svcj_cmd_options=""

_svcj_sysvipc_x=0
for _svcj_option in $_svcj_options; do
case "$_svcj_option" in
mlock)
Expand All @@ -1243,8 +1244,13 @@ run_rc_command()
_svcj_cmd_options="allow.nfsd enforce_statfs=1 ${_svcj_cmd_options}"
;;
sysvipc)
_svcj_sysvipc_x=$((${_svcj_sysvipc_x} + 1))
_svcj_cmd_options="sysvmsg=inherit sysvsem=inherit sysvshm=inherit ${_svcj_cmd_options}"
;;
sysvipcnew)
_svcj_sysvipc_x=$((${_svcj_sysvipc_x} + 1))
_svcj_cmd_options="sysvmsg=new sysvsem=new sysvshm=new ${_svcj_cmd_options}"
;;
vmm)
_svcj_cmd_options="allow.vmm ${_svcj_cmd_options}"
;;
Expand All @@ -1253,6 +1259,11 @@ run_rc_command()
;;
esac
done
if [ ${_svcj_sysvipc_x} -gt 1 ]; then
echo -n "ERROR: more than one sysvipc option is "
echo "specified in ${name}_svcj_options: $_svcj_options"
return 1
fi
fi

[ -z "$autoboot" ] && eval $_pidcmd # determine the pid if necessary
Expand Down Expand Up @@ -1321,11 +1332,28 @@ run_rc_command()
start)
if [ "${_rc_svcj}" != jailing ]; then
_return=1
$JAIL_CMD -c $_svcj_generic_params $_svcj_cmd_options \
exec.start="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}start $rc_extra_args" \
exec.stop="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}stop $rc_extra_args" \
exec.consolelog="/var/log/svcj_${name}_console.log" \
name=svcj-${name} && _return=0
_do_jailing=1

if check_jail jailed; then
if [ $(${SYSCTL_N} security.jail.children.max) -eq 0 ]; then
echo ERROR: jail parameter children.max is set to 0, can not create a new service jail.
_do_jailing=0
else
_free_jails=$(($(${SYSCTL_N} security.jail.children.max) - $(${SYSCTL_N} security.jail.children.cur)))
if [ ${_free_jails} -eq 0 ]; then
echo ERROR: max number of jail children reached, can not create a new service jail.
_do_jailing=0

fi
fi
fi
if [ ${_do_jailing} -eq 1 ]; then
$JAIL_CMD -c $_svcj_generic_params $_svcj_cmd_options \
exec.start="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}start $rc_extra_args" \
exec.stop="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}stop $rc_extra_args" \
exec.consolelog="/var/log/svcj_${name}_console.log" \
name=svcj-${name} && _return=0
fi
else
_run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || _return=1
fi
Expand Down Expand Up @@ -1421,6 +1449,18 @@ run_rc_command()

if checkyesno ${name}_svcj; then
if [ "${_rc_svcj}" != jailing ]; then
if check_jail jailed; then
if [ $(${SYSCTL_N} security.jail.children.max) -eq 0 ]; then
echo ERROR: jail parameter children.max is set to 0, can not create a new service jail.
return 1
else
_free_jails=$(($(${SYSCTL_N} security.jail.children.max) - $(${SYSCTL_N} security.jail.children.cur)))
if [ ${_free_jails} -eq 0 ]; then
echo ERROR: max number of jail children reached, can not create a new service jail.
return 1
fi
fi
fi
$JAIL_CMD -c $_svcj_generic_params $_svcj_cmd_options\
exec.start="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}start $rc_extra_args" \
exec.stop="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}stop $rc_extra_args" \
Expand Down
Loading
Loading