diff options
| -rw-r--r-- | cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 | 2 | ||||
| -rw-r--r-- | release/tools/vmimage.subr | 6 | ||||
| -rw-r--r-- | share/man/man7/ports.7 | 6 | ||||
| -rw-r--r-- | share/man/man9/atomic.9 | 54 | ||||
| -rw-r--r-- | sys/kern/subr_syscall.c | 10 |
5 files changed, 60 insertions, 18 deletions
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 index 0ae8bf0d2bcb..842505a5746f 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 +++ b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 @@ -548,7 +548,7 @@ to disallow the possibility of enabling destructive actions system-wide at any p Any attempts to enable destructive actions will cause .Nm to exit with a runtime error. -.It Fl x Ar arg Op Ns = Ns value +.It Fl x Ar arg Ns Op = Ns Ar value Enable or modify a DTrace runtime option or D compiler option. Boolean options are enabled by specifying their name. Options with values are set by separating the option name and value with an diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 04c0d5bb2bb5..7a078e357adf 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -304,7 +304,11 @@ vm_create_disk() { # Create an ESP espfilename=$(mktemp /tmp/efiboot.XXXXXX) make_esp_file ${espfilename} ${fat32min} ${BOOTFILES}/efi/loader_lua/loader_lua.efi - BOOTPARTS="${BOOTPARTS} -p efi/efiesp:=${espfilename}" + espsuffix="" + if [ -z "${BOOTPARTS}" ]; then + espsuffix="${BOOTPARTSOFFSET}" + fi + BOOTPARTS="${BOOTPARTS} -p efi/efiesp:=${espfilename}${espsuffix}" # Add this to fstab mkdir -p ${DESTDIR}/boot/efi diff --git a/share/man/man7/ports.7 b/share/man/man7/ports.7 index 2b6f17965fce..092489acb795 100644 --- a/share/man/man7/ports.7 +++ b/share/man/man7/ports.7 @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 10, 2025 +.Dd November 6, 2025 .Dt PORTS 7 .Os .Sh NAME @@ -597,6 +597,10 @@ data. The default ports directory. .It Pa /usr/ports/Mk/bsd.port.mk The big Kahuna. +.It Pa /var/db/ports +The directory where the results of configuring +.Va OPTIONS +are stored. .El .Sh EXAMPLES .Bl -tag -width 0n diff --git a/share/man/man9/atomic.9 b/share/man/man9/atomic.9 index df24cd4a4d2b..af94b5773f0e 100644 --- a/share/man/man9/atomic.9 +++ b/share/man/man9/atomic.9 @@ -182,35 +182,42 @@ This variant is the default. The second variant has acquire semantics, and the third variant has release semantics. .Pp -When an atomic operation has acquire semantics, the operation must have +An atomic operation can only have +.Em acquire +semantics if it performs a load +from memory. +When an atomic operation has acquire semantics, a load performed as +part of the operation must have completed before any subsequent load or store (by program order) is performed. Conversely, acquire semantics do not require that prior loads or stores have -completed before the atomic operation is performed. -An atomic operation can only have acquire semantics if it performs a load -from memory. +completed before a load from the atomic operation is performed. To denote acquire semantics, the suffix .Dq Li _acq is inserted into the function name immediately prior to the .Dq Li _ Ns Aq Fa type suffix. -For example, to subtract two integers ensuring that the subtraction is +For example, to subtract two integers ensuring that the load of +the value from memory is completed before any subsequent loads and stores are performed, use .Fn atomic_subtract_acq_int . .Pp +An atomic operation can only have +.Em release +semantics if it performs a store to memory. When an atomic operation has release semantics, all prior loads or stores -(by program order) must have completed before the operation is performed. -Conversely, release semantics do not require that the atomic operation must +(by program order) must have completed before a store executed as part of +the operation that is performed. +Conversely, release semantics do not require that a store from the atomic +operation must have completed before any subsequent load or store is performed. -An atomic operation can only have release semantics if it performs a store -to memory. To denote release semantics, the suffix .Dq Li _rel is inserted into the function name immediately prior to the .Dq Li _ Ns Aq Fa type suffix. For example, to add two long integers ensuring that all prior loads and -stores are completed before the addition is performed, use +stores are completed before the store of the result is performed, use .Fn atomic_add_rel_long . .Pp When a release operation by one thread @@ -235,6 +242,33 @@ section. However, they will not prevent the compiler or processor from moving loads or stores into the critical section, which does not violate the semantics of a mutex. +.Ss Architecture-dependent caveats for compare-and-swap +The +.Fn atomic_[f]cmpset_<type> +operations, specifically those without explicitly specified memory +ordering, are defined as relaxed. +Consequently, a thread's accesses to memory locations different from +that of the atomic operation can be reordered in relation to the +atomic operation. +.Pp +However, the implementation on the +.Sy amd64 +and +.Sy i386 +architectures provide sequentially consistent semantics. +In particular, the reordering mentioned above cannot occur. +.Pp +On the +.Sy arm64/aarch64 +architecture, the operation may include either acquire +semantics on the constituent load or release semantics +on the constituent store. +This means that accesses to other locations in program order +before the atomic, might be observed as executed after the load +that is the part of the atomic operation (but not after the store +from the operation due to release). +Similarly, accesses after the atomic might be observed as executed +before the store. .Ss Thread Fence Operations Alternatively, a programmer can use atomic thread fence operations to constrain the reordering of accesses. diff --git a/sys/kern/subr_syscall.c b/sys/kern/subr_syscall.c index 25843eec3754..139a4df57f13 100644 --- a/sys/kern/subr_syscall.c +++ b/sys/kern/subr_syscall.c @@ -57,8 +57,8 @@ syscallenter(struct thread *td) struct proc *p; struct syscall_args *sa; struct sysent *se; - int error, traced; - bool sy_thr_static; + int error; + bool sy_thr_static, traced; VM_CNT_INC(v_syscall); p = td->td_proc; @@ -217,7 +217,7 @@ syscallret(struct thread *td) struct proc *p; struct syscall_args *sa; ksiginfo_t ksi; - int traced; + bool traced; KASSERT(td->td_errno != ERELOOKUP, ("ERELOOKUP not consumed syscall %d", td->td_sa.code)); @@ -248,9 +248,9 @@ syscallret(struct thread *td) } #endif - traced = 0; + traced = false; if (__predict_false(p->p_flag & P_TRACED)) { - traced = 1; + traced = true; PROC_LOCK(p); td->td_dbgflags |= TDB_SCX; PROC_UNLOCK(p); |
