svn commit: r368436 - head/lib/libc/sys
Author: ngie Date: Tue Dec 8 04:18:16 2020 New Revision: 368436 URL: https://svnweb.freebsd.org/changeset/base/368436 Log: extattr_get_file(20: bump .Dd This is being done for the formatting and context changes. While the net content hasn't been changed, the content/context changes were sufficient to warrant the date bump. MFC after:1 week MFC with: r368431, r368433, r368434, r368435 Sponsored by: DellEMC Isilon Modified: head/lib/libc/sys/extattr_get_file.2 Modified: head/lib/libc/sys/extattr_get_file.2 == --- head/lib/libc/sys/extattr_get_file.2Tue Dec 8 04:16:05 2020 (r368435) +++ head/lib/libc/sys/extattr_get_file.2Tue Dec 8 04:18:16 2020 (r368436) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 29, 2008 +.Dd December 7, 2020 .Dt EXTATTR 2 .Os .Sh NAME ___ 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: r368435 - head/lib/libc/sys
Author: ngie Date: Tue Dec 8 04:16:05 2020 New Revision: 368435 URL: https://svnweb.freebsd.org/changeset/base/368435 Log: extattr_get_file(2): clarify RETURN VALUES While some of the syscalls' behavior were documented and implied in the RETURN VALUES section by earlier, e.g., the DESCRIPTION sections, as having behavior of the other calls (`*_fd` vs `*_file` vs `*_link`), there was a lot of implied return value behavior in the section prior to this change. Explicitly document the syscall behavior per the current implementation in sys/kern/vfs_extattr.c so others can better develop based on its explicit documented behavior instead of having to digest the context of the manpage to understand the appropriate behavior. MFC after:1 week MFC with: r368431, r368433, r368434 Sponsored by: DellEMC Isilon Modified: head/lib/libc/sys/extattr_get_file.2 Modified: head/lib/libc/sys/extattr_get_file.2 == --- head/lib/libc/sys/extattr_get_file.2Tue Dec 8 04:05:19 2020 (r368434) +++ head/lib/libc/sys/extattr_get_file.2Tue Dec 8 04:16:05 2020 (r368435) @@ -169,21 +169,32 @@ For more information on named extended attributes, ple .Xr extattr 9 . .Sh RETURN VALUES If successful, the +.Fn extattr_get_fd , .Fn extattr_get_file , +.Fn extattr_get_link , +.Fn extattr_list_fd , +.Fn extattr_list_file , +.Fn extattr_list_link , +.Fn extattr_set_fd , .Fn extattr_set_file , and -.Fn extattr_list_file +.Fn extattr_set_link calls return the number of bytes that were read or written from the .Fa data , -respectively, or if +respectively. +If .Fa data was .Dv NULL , then -.Fn extattr_get_file +.Fn extattr_get_fd , +.Fn extattr_get_file , +.Fn extattr_get_link , +.Fn extattr_list_fd , +.Fn extattr_list_file , and -.Fn extattr_list_file +.Fn extattr_list_link return the number of bytes available to read. If any of the calls are unsuccessful, the value \-1 is returned and the global variable ___ 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: r368434 - head/lib/libc/sys
Author: ngie Date: Tue Dec 8 04:05:19 2020 New Revision: 368434 URL: https://svnweb.freebsd.org/changeset/base/368434 Log: extattr_get_file(2): fix more formatting - Remove an unnecessary trailing comma separating a two-item clause. - Sort more function calls alphabetically (in the same vein as r368433). MFC after:1 week Sponsored by: DellEMC Isilon Modified: head/lib/libc/sys/extattr_get_file.2 Modified: head/lib/libc/sys/extattr_get_file.2 == --- head/lib/libc/sys/extattr_get_file.2Tue Dec 8 04:01:03 2020 (r368433) +++ head/lib/libc/sys/extattr_get_file.2Tue Dec 8 04:05:19 2020 (r368434) @@ -101,7 +101,7 @@ Each list entry consists of a single byte containing t of the attribute name, followed by the attribute name. The attribute name is not terminated by ASCII 0 (nul). The -.Fn extattr_get_file , +.Fn extattr_get_file and .Fn extattr_list_file calls consume the @@ -135,10 +135,10 @@ they do not follow symlinks. .Pp The .Fn extattr_get_fd , -.Fn extattr_set_fd , .Fn extattr_delete_fd , -and .Fn extattr_list_fd , +and +.Fn extattr_set_fd calls are identical to their .Qq Li _file counterparts except for the first argument. ___ 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: r368433 - head/lib/libc/sys
Author: ngie Date: Tue Dec 8 04:01:03 2020 New Revision: 368433 URL: https://svnweb.freebsd.org/changeset/base/368433 Log: extattr_get_file(2): sort syscalls alphabetically Although some sections of the manpage sort the syscalls alphabetically, many core areas of the manpage do not. Sort the syscalls so it is easier to pick out functional changes and to improve manpage readability. This formatting change is also being done to make future functional changes easier to spot. MFC after:1 week Sponsored by: DellEMC Isilon Modified: head/lib/libc/sys/extattr_get_file.2 Modified: head/lib/libc/sys/extattr_get_file.2 == --- head/lib/libc/sys/extattr_get_file.2Tue Dec 8 03:48:05 2020 (r368432) +++ head/lib/libc/sys/extattr_get_file.2Tue Dec 8 04:01:03 2020 (r368433) @@ -30,48 +30,48 @@ .Dt EXTATTR 2 .Os .Sh NAME -.Nm extattr_get_fd , -.Nm extattr_set_fd , .Nm extattr_delete_fd , -.Nm extattr_list_fd , -.Nm extattr_get_file , -.Nm extattr_set_file , .Nm extattr_delete_file , -.Nm extattr_list_file , -.Nm extattr_get_link , -.Nm extattr_set_link , .Nm extattr_delete_link , -.Nm extattr_list_link +.Nm extattr_get_fd , +.Nm extattr_get_file , +.Nm extattr_get_link , +.Nm extattr_list_fd , +.Nm extattr_list_file , +.Nm extattr_list_link , +.Nm extattr_set_fd , +.Nm extattr_set_file , +.Nm extattr_set_link .Nd system calls to manipulate VFS extended attributes .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In sys/types.h .In sys/extattr.h -.Ft ssize_t -.Fn extattr_get_fd "int fd" "int attrnamespace" "const char *attrname" "void *data" "size_t nbytes" -.Ft ssize_t -.Fn extattr_set_fd "int fd" "int attrnamespace" "const char *attrname" "const void *data" "size_t nbytes" .Ft int .Fn extattr_delete_fd "int fd" "int attrnamespace" "const char *attrname" +.Ft int +.Fn extattr_delete_file "const char *path" "int attrnamespace" "const char *attrname" +.Ft int +.Fn extattr_delete_link "const char *path" "int attrnamespace" "const char *attrname" .Ft ssize_t -.Fn extattr_list_fd "int fd" "int attrnamespace" "void *data" "size_t nbytes" +.Fn extattr_get_fd "int fd" "int attrnamespace" "const char *attrname" "void *data" "size_t nbytes" .Ft ssize_t .Fn extattr_get_file "const char *path" "int attrnamespace" "const char *attrname" "void *data" "size_t nbytes" .Ft ssize_t -.Fn extattr_set_file "const char *path" "int attrnamespace" "const char *attrname" "const void *data" "size_t nbytes" -.Ft int -.Fn extattr_delete_file "const char *path" "int attrnamespace" "const char *attrname" +.Fn extattr_get_link "const char *path" "int attrnamespace" "const char *attrname" "void *data" "size_t nbytes" .Ft ssize_t +.Fn extattr_list_fd "int fd" "int attrnamespace" "void *data" "size_t nbytes" +.Ft ssize_t .Fn extattr_list_file "const char *path" "int attrnamespace" "void *data" "size_t nbytes" .Ft ssize_t -.Fn extattr_get_link "const char *path" "int attrnamespace" "const char *attrname" "void *data" "size_t nbytes" +.Fn extattr_list_link "const char *path" "int attrnamespace" "void *data" "size_t nbytes" .Ft ssize_t -.Fn extattr_set_link "const char *path" "int attrnamespace" "const char *attrname" "const void *data" "size_t nbytes" -.Ft int -.Fn extattr_delete_link "const char *path" "int attrnamespace" "const char *attrname" +.Fn extattr_set_fd "int fd" "int attrnamespace" "const char *attrname" "const void *data" "size_t nbytes" .Ft ssize_t -.Fn extattr_list_link "const char *path" "int attrnamespace" "void *data" "size_t nbytes" +.Fn extattr_set_file "const char *path" "int attrnamespace" "const char *attrname" "const void *data" "size_t nbytes" +.Ft ssize_t +.Fn extattr_set_link "const char *path" "int attrnamespace" "const char *attrname" "const void *data" "size_t nbytes" .Sh DESCRIPTION Named extended attributes are meta-data associated with vnodes representing files and directories. ___ 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: r368432 - head/lib/libc/sys
Author: ngie Date: Tue Dec 8 03:48:05 2020 New Revision: 368432 URL: https://svnweb.freebsd.org/changeset/base/368432 Log: lio_listio(2): fix manlint error The date with .Dd prior to this change isn't canonically spelled out: it should have been "December", not "Dec". MFC after:1 week Sponsored by: DellEMC Isilon Modified: head/lib/libc/sys/lio_listio.2 Modified: head/lib/libc/sys/lio_listio.2 == --- head/lib/libc/sys/lio_listio.2 Tue Dec 8 03:43:00 2020 (r368431) +++ head/lib/libc/sys/lio_listio.2 Tue Dec 8 03:48:05 2020 (r368432) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Dec 7, 2019 +.Dd December 7, 2019 .Dt LIO_LISTIO 2 .Os .Sh NAME ___ 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: r368431 - head/lib/libc/sys
Author: ngie Date: Tue Dec 8 03:43:00 2020 New Revision: 368431 URL: https://svnweb.freebsd.org/changeset/base/368431 Log: extattr_get_fd(2): fix manlint errors - The CAVEATS section was misspelled as "CAVEAT". - The CAVEATS section should come before the "BUGS" section and after other existing sections by convention. MFC after:1 week Reported by: make manlint Sponsored by: DellEMC Isilon Modified: head/lib/libc/sys/extattr_get_file.2 Modified: head/lib/libc/sys/extattr_get_file.2 == --- head/lib/libc/sys/extattr_get_file.2Tue Dec 8 01:47:59 2020 (r368430) +++ head/lib/libc/sys/extattr_get_file.2Tue Dec 8 03:43:00 2020 (r368431) @@ -167,10 +167,6 @@ is attribute-specific. .Pp For more information on named extended attributes, please see .Xr extattr 9 . -.Sh CAVEAT -This interface is under active development, and as such is subject to -change as applications are adapted to use it. -Developers are discouraged from relying on its stability. .Sh RETURN VALUES If successful, the .Fn extattr_get_file , @@ -264,6 +260,10 @@ Project, and introduced in .Fx 5.0 . It was developed to support security extensions requiring additional labels to be associated with each file or directory. +.Sh CAVEATS +This interface is under active development, and as such is subject to +change as applications are adapted to use it. +Developers are discouraged from relying on its stability. .Sh BUGS In earlier versions of this API, passing an empty string for the attribute name to ___ 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: r368425 - head/sys/fs/ext2fs
Author: mckusick Date: Tue Dec 8 00:49:31 2020 New Revision: 368425 URL: https://svnweb.freebsd.org/changeset/base/368425 Log: In ext2fs, BA_CLRBUF is used in ext2_balloc() not UFS_BALLOC(). Noted by: kib MFC after:3 days Sponsored by: Netflix Modified: head/sys/fs/ext2fs/ext2_extern.h Modified: head/sys/fs/ext2fs/ext2_extern.h == --- head/sys/fs/ext2fs/ext2_extern.hTue Dec 8 00:48:50 2020 (r368424) +++ head/sys/fs/ext2fs/ext2_extern.hTue Dec 8 00:49:31 2020 (r368425) @@ -141,7 +141,7 @@ voidext2_gd_csum_set(struct m_ext2fs *); * blocks must be cleared and buffers for existing blocks must be read. * When BA_CLRBUF is not set the buffer will be completely overwritten * and there is no reason to clear them or to spend I/O fetching existing - * data. The BA_CLRBUF flag is handled in the UFS_BALLOC() functions. + * data. The BA_CLRBUF flag is handled in the ext2_balloc() functions. */ #defineBA_CLRBUF 0x0001 /* Clear invalid areas of buffer. */ #defineBA_SEQMASK 0x7F00 /* Bits holding seq heuristic. */ ___ 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: r368424 - head/release
Author: mhorne Date: Tue Dec 8 00:48:50 2020 New Revision: 368424 URL: https://svnweb.freebsd.org/changeset/base/368424 Log: release: don't checksum images if there are none For platforms that don't have any of the memstick, cdrom, or dvdrom release images (i.e. riscv64), the release-install target will trip up when invoking md5(1) on the non-existent image files. Skipping this allows the install to complete successfully. Modified: head/release/Makefile Modified: head/release/Makefile == --- head/release/Makefile Tue Dec 8 00:42:03 2020(r368423) +++ head/release/Makefile Tue Dec 8 00:48:50 2020(r368424) @@ -317,6 +317,7 @@ release-install: mkdir -p ${DESTDIR} .endif cp -a ftp ${DESTDIR}/ +.if !empty(IMAGES) .for I in ${IMAGES} cp -p ${I} ${DESTDIR}/${OSRELEASE}-${I} . if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) @@ -325,6 +326,7 @@ release-install: .endfor cd ${DESTDIR} && sha512 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA512 cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 +.endif .include "${.CURDIR}/Makefile.inc1" .include "${.CURDIR}/Makefile.vm" ___ 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: r368423 - head/release/riscv
Author: mhorne Date: Tue Dec 8 00:42:03 2020 New Revision: 368423 URL: https://svnweb.freebsd.org/changeset/base/368423 Log: RISC-V release confs Add two release flavors for RISC-V. First, the traditional "big-iron" images, capable of generating distribution sets and VM images. Installer images won't be built yet, but can be trivially enabled in the future with the addition of riscv/make-memstick.sh. Second, a GENERICSD embedded image. I've opted for this instead of board-specific SD card images as it allows users to just dd the u-boot they want. The RISC-V hardware ecosystem is still young, so a configuration for e.g. the new PolarFire SoC Icicle Kit would likely see very few users. Reviewed by: gjb Relnotes: yes Differential Revision:https://reviews.freebsd.org/D27045 Added: head/release/riscv/ head/release/riscv/GENERICSD.conf (contents, props changed) head/release/riscv/riscv64.conf (contents, props changed) Added: head/release/riscv/GENERICSD.conf == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/riscv/GENERICSD.conf Tue Dec 8 00:42:03 2020 (r368423) @@ -0,0 +1,16 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +EMBEDDED_TARGET_ARCH="riscv64" +EMBEDDED_TARGET="riscv" +EMBEDDEDBUILD=1 +FAT_SIZE="54m -b 1m" +FAT_TYPE="16" +IMAGE_SIZE="3072M" +KERNEL="GENERIC" +MD_ARGS="-x 63 -y 255" +NODOC=1 +PART_SCHEME="GPT" +export BOARDNAME="GENERICSD" Added: head/release/riscv/riscv64.conf == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/riscv/riscv64.conf Tue Dec 8 00:42:03 2020 (r368423) @@ -0,0 +1,8 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +TARGET="riscv" +TARGET_ARCH="riscv64" +KERNEL="GENERIC" ___ 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: r368422 - in head: release/tools tools/boot
Author: mhorne Date: Tue Dec 8 00:37:11 2020 New Revision: 368422 URL: https://svnweb.freebsd.org/changeset/base/368422 Log: riscv: allow building virtual machine images RISC-V has the same booting requirements as arm64 (loader.efi, no legacy boot options), so generated images for both architectures have the same partition layout. Reviewed by: gjb Differential Revision:https://reviews.freebsd.org/D27044 Modified: head/release/tools/vmimage.subr head/tools/boot/install-boot.sh Modified: head/release/tools/vmimage.subr == --- head/release/tools/vmimage.subr Tue Dec 8 00:35:13 2020 (r368421) +++ head/release/tools/vmimage.subr Tue Dec 8 00:37:11 2020 (r368422) @@ -30,7 +30,7 @@ write_partition_layout() { -p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot" ROOTFSPART="-p freebsd-ufs/rootfs:=${VMBASE}" ;; - arm64:aarch64) + arm64:aarch64 | riscv:riscv64*) ESP=yes SCHEME=gpt BOOTPARTS= Modified: head/tools/boot/install-boot.sh == --- head/tools/boot/install-boot.sh Tue Dec 8 00:35:13 2020 (r368421) +++ head/tools/boot/install-boot.sh Tue Dec 8 00:37:11 2020 (r368422) @@ -38,6 +38,7 @@ get_uefi_bootname() { arm64) echo bootaa64 ;; i386) echo bootia32 ;; arm) echo bootarm ;; +riscv) echo bootriscv64 ;; *) die "machine type $(uname -m) doesn't support UEFI" ;; esac } ___ 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: r368421 - in head/release: . tools
Author: mhorne Date: Tue Dec 8 00:35:13 2020 New Revision: 368421 URL: https://svnweb.freebsd.org/changeset/base/368421 Log: release.sh: add support for RISC-V embedded builds Since the few existing RISC-V hardware platforms are single board computers, we can piggyback off of arm/arm64's embedded build support for generating SD card images. I don't see a pressing need to change the naming in this file at this time. Reviewed by: gjb, manu Differential Revision:https://reviews.freebsd.org/D27043 Modified: head/release/release.sh head/release/tools/arm.subr Modified: head/release/release.sh == --- head/release/release.sh Tue Dec 8 00:05:43 2020(r368420) +++ head/release/release.sh Tue Dec 8 00:35:13 2020(r368421) @@ -144,7 +144,7 @@ env_check() { WITH_COMPRESSED_IMAGES= NODOC=yes case ${EMBEDDED_TARGET}:${EMBEDDED_TARGET_ARCH} in - arm:arm*|arm64:aarch64) + arm:arm*|arm64:aarch64|riscv:riscv64*) chroot_build_release_cmd="chroot_arm_build_release" ;; *) @@ -400,6 +400,9 @@ efi_boot_name() amd64) echo "bootx64.efi" ;; + riscv) + echo "bootriscv64.efi" + ;; esac } @@ -407,7 +410,7 @@ efi_boot_name() chroot_arm_build_release() { load_target_env case ${EMBEDDED_TARGET} in - arm|arm64) + arm|arm64|riscv) if [ -e "${RELENGDIR}/tools/arm.subr" ]; then . "${RELENGDIR}/tools/arm.subr" fi Modified: head/release/tools/arm.subr == --- head/release/tools/arm.subr Tue Dec 8 00:05:43 2020(r368420) +++ head/release/tools/arm.subr Tue Dec 8 00:35:13 2020(r368421) @@ -27,7 +27,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# Common subroutines used to build arm SD card images. +# Common subroutines used to build arm, arm64, or RISC-V SD card images. # # $FreeBSD$ # @@ -265,11 +265,11 @@ arm_install_boot() { } arm_install_uboot() { - # Override in the arm/KERNEL.conf file. + # Override in the ${EMBEDDED_TARGET}/${BOARDNAME}.conf file. return 0 } arm_do_quirk() { - # Override in the arm{,64}/BOARD.conf file. + # Override in the ${EMBEDDED_TARGET}/${BOARDNAME}.conf file. } ___ 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"
You get my email
I've invited you to fill out the following form: Untitled form To fill it out, visit: https://docs.google.com/forms/d/e/1FAIpQLSfnEHD2_CNTJYIVH7sDpLJ-xXgrkXb-MenDNrMni0actgeXhQ/viewform?vc=0c=0w=1flr=0usp=mail_form_link Hello, I contacted you because I want to invest in your country,if you confirm your interest that you can handle the fund in a good investment. reply on this email only: reem.alhash...@kakao.com Regards, Ms. Reem Al-hashimi Google Forms: Create and analyze surveys. ___ 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: r368005 - in head: lib/libprocstat share/man/man4 sys/opencrypto sys/sys tools/tools/crypto usr.bin/procstat
On Mon, Dec 7, 2020 at 2:41 PM John Baldwin wrote: > > On 12/7/20 12:37 PM, Kyle Evans wrote: > > On Mon, Dec 7, 2020 at 2:36 PM John Baldwin wrote: > >> > >> qemu-user uses this flag? What on earth can it be using it for? > >> > > > > It was faithfully responding that it wasn't implemented to any > > target-application usage, apparently. :-) > > I mean, it is only a flag in the struct kinfo_file flags field. Even > if it is doing some kind of compat shim for kinfo_file it should just > copy the flags field across, not be checking any of the bits. Does it > try to log the type of a file descriptor in debug traces perhaps? > Apparently we were just that convinced we needed to enumerate the values we didn't have to touch, see: https://github.com/seanbruno/qemu-bsd-user/pull/150/files -> it was actually CRIOGET that we referenced for the sole purpose of declaring it unsupported. ___ 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: r368005 - in head: lib/libprocstat share/man/man4 sys/opencrypto sys/sys tools/tools/crypto usr.bin/procstat
On 12/7/20 12:37 PM, Kyle Evans wrote: > On Mon, Dec 7, 2020 at 2:36 PM John Baldwin wrote: >> >> qemu-user uses this flag? What on earth can it be using it for? >> > > It was faithfully responding that it wasn't implemented to any > target-application usage, apparently. :-) I mean, it is only a flag in the struct kinfo_file flags field. Even if it is doing some kind of compat shim for kinfo_file it should just copy the flags field across, not be checking any of the bits. Does it try to log the type of a file descriptor in debug traces perhaps? -- John Baldwin ___ 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: r368005 - in head: lib/libprocstat share/man/man4 sys/opencrypto sys/sys tools/tools/crypto usr.bin/procstat
On Mon, Dec 7, 2020 at 2:36 PM John Baldwin wrote: > > On 12/7/20 11:11 AM, Kyle Evans wrote: > > On Mon, Dec 7, 2020 at 12:58 PM John Baldwin wrote: > >> > >> On 12/6/20 8:51 PM, Steve Wills wrote: > >>> Hi, > >>> > >>> On 11/24/20 7:10 PM, John Baldwin wrote: > Author: jhb > Date: Wed Nov 25 00:10:54 2020 > New Revision: 368005 > URL: https://svnweb.freebsd.org/changeset/base/368005 > > Log: > Remove the cloned file descriptors for /dev/crypto. > > >>> > >>> Would this change warrant a bump of __FreeBSD_version? I only noticed > >>> because PR 251470 (radare2 not building due to KF_TYPE_CRYPTO). > >> > >> Hmm, perhaps so, though ports could also use #ifdef KF_TYPE_CRYPTO (and > >> that is probably preferred for anything using C). Looks like we haven't > >> yet had another bump of __FreeBSD_version so I can do that. > >> > > > > There's surely a better way, but this version bump would've actually > > been really handy for detecting the resulting qemu-user-static > > fallout. The build was broken for about ~9 days, neither the official > > builder or my local builder felt compelled to rebuild it absent the > > bump because I had just built it a couple revisions prior. =-( > > > > I'm kind of leaning towards trying to shoehorn a qemu-user-static > > build into ci.f.o somewhere, though, since it's used as a part of > > producing some of the weekly snapshot images and digs pretty deeply in > > other areas. I've got a Cirrus config for qemu-user-static and Cirrus > > builds it regularly for me, but that's not so helpful when the image > > it builds against is also tied to the weekly snapshot process. > > qemu-user uses this flag? What on earth can it be using it for? > It was faithfully responding that it wasn't implemented to any target-application usage, apparently. :-) ___ 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: r368005 - in head: lib/libprocstat share/man/man4 sys/opencrypto sys/sys tools/tools/crypto usr.bin/procstat
On 12/7/20 11:11 AM, Kyle Evans wrote: > On Mon, Dec 7, 2020 at 12:58 PM John Baldwin wrote: >> >> On 12/6/20 8:51 PM, Steve Wills wrote: >>> Hi, >>> >>> On 11/24/20 7:10 PM, John Baldwin wrote: Author: jhb Date: Wed Nov 25 00:10:54 2020 New Revision: 368005 URL: https://svnweb.freebsd.org/changeset/base/368005 Log: Remove the cloned file descriptors for /dev/crypto. >>> >>> Would this change warrant a bump of __FreeBSD_version? I only noticed >>> because PR 251470 (radare2 not building due to KF_TYPE_CRYPTO). >> >> Hmm, perhaps so, though ports could also use #ifdef KF_TYPE_CRYPTO (and >> that is probably preferred for anything using C). Looks like we haven't >> yet had another bump of __FreeBSD_version so I can do that. >> > > There's surely a better way, but this version bump would've actually > been really handy for detecting the resulting qemu-user-static > fallout. The build was broken for about ~9 days, neither the official > builder or my local builder felt compelled to rebuild it absent the > bump because I had just built it a couple revisions prior. =-( > > I'm kind of leaning towards trying to shoehorn a qemu-user-static > build into ci.f.o somewhere, though, since it's used as a part of > producing some of the weekly snapshot images and digs pretty deeply in > other areas. I've got a Cirrus config for qemu-user-static and Cirrus > builds it regularly for me, but that's not so helpful when the image > it builds against is also tied to the weekly snapshot process. qemu-user uses this flag? What on earth can it be using it for? -- John Baldwin ___ 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: r368005 - in head: lib/libprocstat share/man/man4 sys/opencrypto sys/sys tools/tools/crypto usr.bin/procstat
On Mon, Dec 7, 2020 at 12:58 PM John Baldwin wrote: > > On 12/6/20 8:51 PM, Steve Wills wrote: > > Hi, > > > > On 11/24/20 7:10 PM, John Baldwin wrote: > >> Author: jhb > >> Date: Wed Nov 25 00:10:54 2020 > >> New Revision: 368005 > >> URL: https://svnweb.freebsd.org/changeset/base/368005 > >> > >> Log: > >>Remove the cloned file descriptors for /dev/crypto. > >> > > > > Would this change warrant a bump of __FreeBSD_version? I only noticed > > because PR 251470 (radare2 not building due to KF_TYPE_CRYPTO). > > Hmm, perhaps so, though ports could also use #ifdef KF_TYPE_CRYPTO (and > that is probably preferred for anything using C). Looks like we haven't > yet had another bump of __FreeBSD_version so I can do that. > There's surely a better way, but this version bump would've actually been really handy for detecting the resulting qemu-user-static fallout. The build was broken for about ~9 days, neither the official builder or my local builder felt compelled to rebuild it absent the bump because I had just built it a couple revisions prior. =-( I'm kind of leaning towards trying to shoehorn a qemu-user-static build into ci.f.o somewhere, though, since it's used as a part of producing some of the weekly snapshot images and digs pretty deeply in other areas. I've got a Cirrus config for qemu-user-static and Cirrus builds it regularly for me, but that's not so helpful when the image it builds against is also tied to the weekly snapshot process. Thanks, Kyle Evans ___ 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: r368005 - in head: lib/libprocstat share/man/man4 sys/opencrypto sys/sys tools/tools/crypto usr.bin/procstat
On 12/6/20 8:51 PM, Steve Wills wrote: > Hi, > > On 11/24/20 7:10 PM, John Baldwin wrote: >> Author: jhb >> Date: Wed Nov 25 00:10:54 2020 >> New Revision: 368005 >> URL: https://svnweb.freebsd.org/changeset/base/368005 >> >> Log: >>Remove the cloned file descriptors for /dev/crypto. >> > > Would this change warrant a bump of __FreeBSD_version? I only noticed > because PR 251470 (radare2 not building due to KF_TYPE_CRYPTO). Hmm, perhaps so, though ports could also use #ifdef KF_TYPE_CRYPTO (and that is probably preferred for anything using C). Looks like we haven't yet had another bump of __FreeBSD_version so I can do that. -- John Baldwin ___ 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: r368417 - head/sys/sys
Author: jhb Date: Mon Dec 7 18:58:08 2020 New Revision: 368417 URL: https://svnweb.freebsd.org/changeset/base/368417 Log: Bump __FreeBSD_version for removal of crypto fd's in r368005. Requested by: swills Sponsored by: Chelsio Communications Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h == --- head/sys/sys/param.hMon Dec 7 17:54:49 2020(r368416) +++ head/sys/sys/param.hMon Dec 7 18:58:08 2020(r368417) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300130 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300131 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, ___ 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: r368416 - head/sys/arm64/arm64
Author: andrew Date: Mon Dec 7 17:54:49 2020 New Revision: 368416 URL: https://svnweb.freebsd.org/changeset/base/368416 Log: Ensure the boot CPU is CPU 0 on arm64 We assume the boot CPU is always CPU 0 on arm64. To allow for this reserve cpuid 0 for the boot CPU in the ACPI and FDT cases but otherwise start the CPU as normal. We then check for the boot CPU in start_cpu and return as if it was started. While here extract the FDT CPU init code into a new function to simplify cpu_mp_start and return FALSE from start_cpu when the CPU fails to start. Reviewed by: mmel Sponsored by: Innovate UK Differential Revision:https://reviews.freebsd.org/D27497 Modified: head/sys/arm64/arm64/mp_machdep.c Modified: head/sys/arm64/arm64/mp_machdep.c == --- head/sys/arm64/arm64/mp_machdep.c Mon Dec 7 16:08:31 2020 (r368415) +++ head/sys/arm64/arm64/mp_machdep.c Mon Dec 7 17:54:49 2020 (r368416) @@ -148,6 +148,13 @@ static volatile int aps_ready; /* Temporary variables for init_secondary() */ void *dpcpu[MAXCPU - 1]; +static bool +is_boot_cpu(uint64_t target_cpu) +{ + + return (__pcpu[0].pc_mpidr == (target_cpu & CPU_AFF_MASK)); +} + static void release_aps(void *dummy __unused) { @@ -428,6 +435,10 @@ cpu_mp_probe(void) return (1); } +/* + * Starts a given CPU. If the CPU is already running, i.e. it is the boot CPU, + * do nothing. Returns true if the CPU is present and running. + */ static bool start_cpu(u_int cpuid, uint64_t target_cpu) { @@ -439,9 +450,11 @@ start_cpu(u_int cpuid, uint64_t target_cpu) if (cpuid > mp_maxid) return (false); + /* Skip boot CPU */ + if (is_boot_cpu(target_cpu)) + return (true); + KASSERT(cpuid < MAXCPU, ("Too many CPUs")); - KASSERT(__pcpu[0].pc_mpidr != (target_cpu & CPU_AFF_MASK), - ("Start_cpu() was called on the boot CPU")); pcpup = &__pcpu[cpuid]; pcpu_init(pcpup, cpuid, sizeof(struct pcpu)); @@ -475,14 +488,14 @@ start_cpu(u_int cpuid, uint64_t target_cpu) kmem_free((vm_offset_t)bootstacks[cpuid], PAGE_SIZE); bootstacks[cpuid] = NULL; mp_ncpus--; - - } else { - /* Wait for the AP to switch to its boot stack. */ - while (atomic_load_int(_started) < naps + 1) - cpu_spinwait(); - CPU_SET(cpuid, _cpus); + return (false); } + /* Wait for the AP to switch to its boot stack. */ + while (atomic_load_int(_started) < naps + 1) + cpu_spinwait(); + CPU_SET(cpuid, _cpus); + return (true); } @@ -498,17 +511,22 @@ madt_handler(ACPI_SUBTABLE_HEADER *entry, void *arg) case ACPI_MADT_TYPE_GENERIC_INTERRUPT: intr = (ACPI_MADT_GENERIC_INTERRUPT *)entry; cpuid = arg; - id = *cpuid; - /* Skip the boot CPU, but save its ACPI id. */ - if (__pcpu[0].pc_mpidr == (intr->ArmMpidr & CPU_AFF_MASK)) { - __pcpu[0].pc_acpi_id = intr->Uid; - break; + if (is_boot_cpu(intr->ArmMpidr)) + id = 0; + else + id = *cpuid; + + if (start_cpu(id, intr->ArmMpidr)) { + __pcpu[id].pc_acpi_id = intr->Uid; + /* +* Don't increment for the boot CPU, its CPU ID is +* reserved. +*/ + if (!is_boot_cpu(intr->ArmMpidr)) + (*cpuid)++; } - start_cpu(id, intr->ArmMpidr); - __pcpu[id].pc_acpi_id = intr->Uid; - (*cpuid)++; break; default: break; @@ -546,10 +564,11 @@ cpu_init_acpi(void) #ifdef FDT static boolean_t -cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) +start_cpu_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) { uint64_t target_cpu; int domain; + int cpuid; target_cpu = reg[0]; if (addr_size == 2) { @@ -557,35 +576,51 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size target_cpu |= reg[1]; } - /* Skip boot CPU */ - if (__pcpu[0].pc_mpidr == (target_cpu & CPU_AFF_MASK)) - return (TRUE); + if (is_boot_cpu(target_cpu)) + cpuid = 0; + else + cpuid = fdt_cpuid; - if (!start_cpu(fdt_cpuid, target_cpu)) + if (!start_cpu(cpuid, target_cpu)) return (FALSE); - fdt_cpuid++; + /* +* Don't increment for the boot CPU, its CPU ID is reserved. +*/ + if (!is_boot_cpu(target_cpu)) +
svn commit: r368415 - head/stand/kshim
Author: hselasky Date: Mon Dec 7 16:08:31 2020 New Revision: 368415 URL: https://svnweb.freebsd.org/changeset/base/368415 Log: Properly define the bool type in the BSD kernel shim. MFC after:1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/stand/kshim/bsd_kernel.h Modified: head/stand/kshim/bsd_kernel.h == --- head/stand/kshim/bsd_kernel.h Mon Dec 7 15:09:28 2020 (r368414) +++ head/stand/kshim/bsd_kernel.h Mon Dec 7 16:08:31 2020 (r368415) @@ -274,7 +274,12 @@ typedef uint8_t *bus_space_handle_t; typedef int bus_dma_filter_t(void *, bus_addr_t); typedef void bus_dma_lock_t(void *, bus_dma_lock_op_t); -typedef uint32_t bool; +#ifndef __bool_true_false_are_defined +#define__bool_true_false_are_defined +typedef _Bool bool; +#definetrue 1 +#definefalse 0 +#endif /* SYSINIT API */ ___ 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: r368414 - in head/sys/arm: arm include
Author: markj Date: Mon Dec 7 15:09:28 2020 New Revision: 368414 URL: https://svnweb.freebsd.org/changeset/base/368414 Log: arm: Let the GDB stub write to SP, LR and GP registers This can be handy if gdb's stack unwinder fails, for example because of a bug in kgdb's trap frame unwinder. PR: 251463 Submitted by: Dmitry Salychev MFC after:1 week Modified: head/sys/arm/arm/gdb_machdep.c head/sys/arm/include/gdb_machdep.h Modified: head/sys/arm/arm/gdb_machdep.c == --- head/sys/arm/arm/gdb_machdep.c Mon Dec 7 14:53:34 2020 (r368413) +++ head/sys/arm/arm/gdb_machdep.c Mon Dec 7 15:09:28 2020 (r368414) @@ -97,11 +97,25 @@ gdb_cpu_getreg(int regnum, size_t *regsz) void gdb_cpu_setreg(int regnum, void *val) { + if (kdb_thread != curthread) + return; switch (regnum) { case GDB_REG_PC: - if (kdb_thread == curthread) - kdb_frame->tf_pc = *(register_t *)val; + kdb_frame->tf_pc = *(register_t *)val; + break; + case GDB_REG_SP: + kdb_frame->tf_svc_sp = *(register_t *)val; + break; + case GDB_REG_LR: + kdb_frame->tf_svc_lr = *(register_t *)val; + break; + default: + /* Write to the general purpose registers r0-r12. */ + if (regnum >= 0 && regnum <= 12) { + *(_frame->tf_r0 + regnum) = *(register_t *)val; + } + break; } } Modified: head/sys/arm/include/gdb_machdep.h == --- head/sys/arm/include/gdb_machdep.h Mon Dec 7 14:53:34 2020 (r368413) +++ head/sys/arm/include/gdb_machdep.h Mon Dec 7 15:09:28 2020 (r368414) @@ -33,6 +33,8 @@ #defineGDB_BUFSZ 400 #defineGDB_NREGS 26 +#defineGDB_REG_SP 13 +#defineGDB_REG_LR 14 #defineGDB_REG_PC 15 static __inline size_t ___ 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: r368413 - head/share/man/man9
Author: markj Date: Mon Dec 7 14:53:34 2020 New Revision: 368413 URL: https://svnweb.freebsd.org/changeset/base/368413 Log: Add missing refcount.9 MLINKS Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile == --- head/share/man/man9/MakefileMon Dec 7 14:53:14 2020 (r368412) +++ head/share/man/man9/MakefileMon Dec 7 14:53:34 2020 (r368413) @@ -1778,8 +1778,13 @@ MLINKS+=random_harvest.9 random_harvest_direct.9 \ random_harvest.9 random_harvest_queue.9 MLINKS+=ratecheck.9 ppsratecheck.9 MLINKS+=refcount.9 refcount_acquire.9 \ + refcount.9 refcount_acquire_checked.9 \ + refcount.9 refcount_acquire_if_not_zero.9 \ refcount.9 refcount_init.9 \ - refcount.9 refcount_release.9 + refcount.9 refcount_load.9 \ + refcount.9 refcount_release.9 \ + refcount.9 refcount_release_if_last.9 \ + refcount.9 refcount_release_if_not_last.9 MLINKS+=resource_int_value.9 resource_long_value.9 \ resource_int_value.9 resource_string_value.9 MLINKS+=rman.9 rman_activate_resource.9 \ ___ 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: r368412 - head/sys/net
Author: markj Date: Mon Dec 7 14:53:14 2020 New Revision: 368412 URL: https://svnweb.freebsd.org/changeset/base/368412 Log: iflib: Avoid leaking the freelist bitmaps upon driver detach Submitted by: Sai Rajesh Tallamraju MFC after:2 weeks Sponsored by: NetApp, Inc. Differential Revision:https://reviews.freebsd.org/D27342 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c == --- head/sys/net/iflib.cMon Dec 7 14:52:57 2020(r368411) +++ head/sys/net/iflib.cMon Dec 7 14:53:14 2020(r368412) @@ -2259,10 +2259,12 @@ iflib_rx_sds_free(iflib_rxq_t rxq) free(fl->ifl_sds.ifsd_cl, M_IFLIB); free(fl->ifl_sds.ifsd_ba, M_IFLIB); free(fl->ifl_sds.ifsd_map, M_IFLIB); + free(fl->ifl_rx_bitmap, M_IFLIB); fl->ifl_sds.ifsd_m = NULL; fl->ifl_sds.ifsd_cl = NULL; fl->ifl_sds.ifsd_ba = NULL; fl->ifl_sds.ifsd_map = NULL; + fl->ifl_rx_bitmap = NULL; } free(rxq->ifr_fl, M_IFLIB); rxq->ifr_fl = NULL; ___ 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: r368411 - head/sys/net
Author: markj Date: Mon Dec 7 14:52:57 2020 New Revision: 368411 URL: https://svnweb.freebsd.org/changeset/base/368411 Log: iflib: Detach tasks upon device registration failure In some error paths we would fail to detach from the iflib taskqueue groups. Also move the detach code into its own subroutine instead of duplicating it. Submitted by: Sai Rajesh Tallamraju MFC after:2 weeks Sponsored by: NetApp, Inc. Differential Revision:https://reviews.freebsd.org/D27342 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c == --- head/sys/net/iflib.cMon Dec 7 11:25:18 2020(r368410) +++ head/sys/net/iflib.cMon Dec 7 14:52:57 2020(r368411) @@ -142,6 +142,7 @@ struct iflib_ctx; static void iru_init(if_rxd_update_t iru, iflib_rxq_t rxq, uint8_t flid); static void iflib_timer(void *arg); +static void iflib_tqg_detach(if_ctx_t ctx); typedef struct iflib_filter_info { driver_filter_t *ifi_filter; @@ -4842,7 +4843,7 @@ fail_intr_free: fail_queues: iflib_tx_structures_free(ctx); iflib_rx_structures_free(ctx); - taskqgroup_detach(qgroup_if_config_tqg, >ifc_admin_task); + iflib_tqg_detach(ctx); IFDI_DETACH(ctx); fail_unlock: CTX_UNLOCK(ctx); @@ -5042,6 +5043,7 @@ fail_detach: fail_queues: iflib_tx_structures_free(ctx); iflib_rx_structures_free(ctx); + iflib_tqg_detach(ctx); fail_iflib_detach: IFDI_DETACH(ctx); fail_unlock: @@ -5058,11 +5060,6 @@ iflib_pseudo_deregister(if_ctx_t ctx) { if_t ifp = ctx->ifc_ifp; if_shared_ctx_t sctx = ctx->ifc_sctx; - iflib_txq_t txq; - iflib_rxq_t rxq; - int i, j; - struct taskqgroup *tqg; - iflib_fl_t fl; /* Unregister VLAN event handlers early */ iflib_unregister_vlan_handlers(ctx); @@ -5074,30 +5071,8 @@ iflib_pseudo_deregister(if_ctx_t ctx) } else { ether_ifdetach(ifp); } - /* XXX drain any dependent tasks */ - tqg = qgroup_if_io_tqg; - for (txq = ctx->ifc_txqs, i = 0; i < NTXQSETS(ctx); i++, txq++) { - callout_drain(>ift_timer); -#ifdef DEV_NETMAP - callout_drain(>ift_netmap_timer); -#endif /* DEV_NETMAP */ - if (txq->ift_task.gt_uniq != NULL) - taskqgroup_detach(tqg, >ift_task); - } - for (i = 0, rxq = ctx->ifc_rxqs; i < NRXQSETS(ctx); i++, rxq++) { - callout_drain(>ifr_watchdog); - if (rxq->ifr_task.gt_uniq != NULL) - taskqgroup_detach(tqg, >ifr_task); - for (j = 0, fl = rxq->ifr_fl; j < rxq->ifr_nfl; j++, fl++) - free(fl->ifl_rx_bitmap, M_IFLIB); - } - tqg = qgroup_if_config_tqg; - if (ctx->ifc_admin_task.gt_uniq != NULL) - taskqgroup_detach(tqg, >ifc_admin_task); - if (ctx->ifc_vflr_task.gt_uniq != NULL) - taskqgroup_detach(tqg, >ifc_vflr_task); - + iflib_tqg_detach(ctx); iflib_tx_structures_free(ctx); iflib_rx_structures_free(ctx); @@ -5127,12 +5102,7 @@ int iflib_device_deregister(if_ctx_t ctx) { if_t ifp = ctx->ifc_ifp; - iflib_txq_t txq; - iflib_rxq_t rxq; device_t dev = ctx->ifc_dev; - int i, j; - struct taskqgroup *tqg; - iflib_fl_t fl; /* Make sure VLANS are not using driver */ if (if_vlantrunkinuse(ifp)) { @@ -5163,28 +5133,8 @@ iflib_device_deregister(if_ctx_t ctx) iflib_rem_pfil(ctx); if (ctx->ifc_led_dev != NULL) led_destroy(ctx->ifc_led_dev); - /* XXX drain any dependent tasks */ - tqg = qgroup_if_io_tqg; - for (txq = ctx->ifc_txqs, i = 0; i < NTXQSETS(ctx); i++, txq++) { - callout_drain(>ift_timer); -#ifdef DEV_NETMAP - callout_drain(>ift_netmap_timer); -#endif /* DEV_NETMAP */ - if (txq->ift_task.gt_uniq != NULL) - taskqgroup_detach(tqg, >ift_task); - } - for (i = 0, rxq = ctx->ifc_rxqs; i < NRXQSETS(ctx); i++, rxq++) { - if (rxq->ifr_task.gt_uniq != NULL) - taskqgroup_detach(tqg, >ifr_task); - for (j = 0, fl = rxq->ifr_fl; j < rxq->ifr_nfl; j++, fl++) - free(fl->ifl_rx_bitmap, M_IFLIB); - } - tqg = qgroup_if_config_tqg; - if (ctx->ifc_admin_task.gt_uniq != NULL) - taskqgroup_detach(tqg, >ifc_admin_task); - if (ctx->ifc_vflr_task.gt_uniq != NULL) - taskqgroup_detach(tqg, >ifc_vflr_task); + iflib_tqg_detach(ctx); CTX_LOCK(ctx); IFDI_DETACH(ctx); CTX_UNLOCK(ctx); @@ -5205,6 +5155,35 @@ iflib_device_deregister(if_ctx_t ctx) unref_ctx_core_offset(ctx); free(ctx, M_IFLIB); return (0); +} + +static void
Re: svn commit: r368409 - head/sys/dev/mn
On Mon, 7 Dec 2020 at 06:19, Hans Petter Selasky wrote: > > Author: hselasky > Date: Mon Dec 7 11:18:51 2020 > New Revision: 368409 > URL: https://svnweb.freebsd.org/changeset/base/368409 > > Log: > Fix compilation after r368397. > > MFC after:3 days > Sponsored by: Mellanox Technologies // NVIDIA Networking Thanks. I will be sure to pick this up with the MFC. ___ 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: r368410 - head/stand/libsa/zfs
On 7 Dec 2020, at 11:25, Toomas Soome wrote: > @@ -183,28 +215,29 @@ xdr_u_int(xdr_t *xdr, unsigned *ip) > static bool > xdr_int64(xdr_t *xdr, int64_t *lp) > { > - int hi; > - unsigned lo; > bool rv = false; > > - if (xdr->xdr_idx + sizeof (int64_t) > xdr->xdr_buf + xdr->xdr_buf_size) > + if (xdr->xdr_idx + sizeof(int64_t) > xdr->xdr_buf + xdr->xdr_buf_size) > return (rv); > > switch (xdr->xdr_op) { > case XDR_OP_ENCODE: > /* Encode value *lp, store to buf */ > - hi = *lp >> 32; > - lo = *lp & UINT32_MAX; > - xdr->xdr_idx += xdr->xdr_putint(xdr, hi); > - xdr->xdr_idx += xdr->xdr_putint(xdr, lo); > + if (xdr->xdr_putint == _putint) > + *(int64_t *)xdr->xdr_idx = htobe64(*lp); > + else > + *(int64_t *)xdr->xdr_idx = *lp; I don't know the details here, but inspecting the callback function and comparing it against a known one to decide what to do is generally not good practice. Can this be pushed down into the function in question, up into the caller or additional information passed to be explicit about this behaviour rather than brittle magic behaviour? Jess Jess ___ 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: r368410 - head/stand/libsa/zfs
Author: tsoome Date: Mon Dec 7 11:25:18 2020 New Revision: 368410 URL: https://svnweb.freebsd.org/changeset/base/368410 Log: loader: xdr_array is missing count The integer arrays are encoded in nvlist as counted array , loader xdr_array() is missing the count. This will affect the pool import when there are hole devices in pool. Also fix the new data add and print functions. Modified: head/stand/libsa/zfs/nvlist.c Modified: head/stand/libsa/zfs/nvlist.c == --- head/stand/libsa/zfs/nvlist.c Mon Dec 7 11:18:51 2020 (r368409) +++ head/stand/libsa/zfs/nvlist.c Mon Dec 7 11:25:18 2020 (r368410) @@ -63,7 +63,7 @@ static int _getint(struct xdr *xdr, int *ip) { *ip = be32dec(xdr->xdr_idx); - return (sizeof (int)); + return (sizeof(int)); } static int @@ -72,14 +72,14 @@ _putint(struct xdr *xdr, int i) int *ip = (int *)xdr->xdr_idx; *ip = htobe32(i); - return (sizeof (int)); + return (sizeof(int)); } static int _getuint(struct xdr *xdr, unsigned *ip) { *ip = be32dec(xdr->xdr_idx); - return (sizeof (unsigned)); + return (sizeof(unsigned)); } static int @@ -88,9 +88,41 @@ _putuint(struct xdr *xdr, unsigned i) unsigned *up = (unsigned *)xdr->xdr_idx; *up = htobe32(i); - return (sizeof (int)); + return (sizeof(int)); } +static int +_getint_mem(struct xdr *xdr, int *ip) +{ + *ip = *(int *)xdr->xdr_idx; + return (sizeof(int)); +} + +static int +_putint_mem(struct xdr *xdr, int i) +{ + int *ip = (int *)xdr->xdr_idx; + + *ip = i; + return (sizeof(int)); +} + +static int +_getuint_mem(struct xdr *xdr, unsigned *ip) +{ + *ip = *(unsigned *)xdr->xdr_idx; + return (sizeof(unsigned)); +} + +static int +_putuint_mem(struct xdr *xdr, unsigned i) +{ + unsigned *up = (unsigned *)xdr->xdr_idx; + + *up = i; + return (sizeof(int)); +} + /* * XDR data translations. */ @@ -131,7 +163,7 @@ xdr_int(xdr_t *xdr, int *ip) bool rv = false; int *i = (int *)xdr->xdr_idx; - if (xdr->xdr_idx + sizeof (int) > xdr->xdr_buf + xdr->xdr_buf_size) + if (xdr->xdr_idx + sizeof(int) > xdr->xdr_buf + xdr->xdr_buf_size) return (rv); switch (xdr->xdr_op) { @@ -160,7 +192,7 @@ xdr_u_int(xdr_t *xdr, unsigned *ip) bool rv = false; unsigned *u = (unsigned *)xdr->xdr_idx; - if (xdr->xdr_idx + sizeof (unsigned) > xdr->xdr_buf + xdr->xdr_buf_size) + if (xdr->xdr_idx + sizeof(unsigned) > xdr->xdr_buf + xdr->xdr_buf_size) return (rv); switch (xdr->xdr_op) { @@ -183,28 +215,29 @@ xdr_u_int(xdr_t *xdr, unsigned *ip) static bool xdr_int64(xdr_t *xdr, int64_t *lp) { - int hi; - unsigned lo; bool rv = false; - if (xdr->xdr_idx + sizeof (int64_t) > xdr->xdr_buf + xdr->xdr_buf_size) + if (xdr->xdr_idx + sizeof(int64_t) > xdr->xdr_buf + xdr->xdr_buf_size) return (rv); switch (xdr->xdr_op) { case XDR_OP_ENCODE: /* Encode value *lp, store to buf */ - hi = *lp >> 32; - lo = *lp & UINT32_MAX; - xdr->xdr_idx += xdr->xdr_putint(xdr, hi); - xdr->xdr_idx += xdr->xdr_putint(xdr, lo); + if (xdr->xdr_putint == _putint) + *(int64_t *)xdr->xdr_idx = htobe64(*lp); + else + *(int64_t *)xdr->xdr_idx = *lp; + xdr->xdr_idx += sizeof(int64_t); rv = true; break; case XDR_OP_DECODE: /* Decode buf, return value to *ip */ - xdr->xdr_idx += xdr->xdr_getint(xdr, ); - xdr->xdr_idx += xdr->xdr_getuint(xdr, ); - *lp = (((int64_t)hi) << 32) | lo; + if (xdr->xdr_getint == _getint) + *lp = be64toh(*(int64_t *)xdr->xdr_idx); + else + *lp = *(int64_t *)xdr->xdr_idx; + xdr->xdr_idx += sizeof(int64_t); rv = true; } return (rv); @@ -213,27 +246,29 @@ xdr_int64(xdr_t *xdr, int64_t *lp) static bool xdr_uint64(xdr_t *xdr, uint64_t *lp) { - unsigned hi, lo; bool rv = false; - if (xdr->xdr_idx + sizeof (uint64_t) > xdr->xdr_buf + xdr->xdr_buf_size) + if (xdr->xdr_idx + sizeof(uint64_t) > xdr->xdr_buf + xdr->xdr_buf_size) return (rv); switch (xdr->xdr_op) { case XDR_OP_ENCODE: /* Encode value *ip, store to buf */ - hi = *lp >> 32; - lo = *lp & UINT32_MAX; - xdr->xdr_idx += xdr->xdr_putint(xdr, hi); - xdr->xdr_idx += xdr->xdr_putint(xdr, lo); + if (xdr->xdr_putint == _putint) + *(uint64_t
Re: svn commit: r368397 - in head: share/man/man4 sys/dev/mn
On 12/7/20 11:44 AM, Hans Petter Selasky wrote: On 12/6/20 10:34 PM, Ed Maste wrote: + gone_in_dev(dev, 13, "sync serial (T1/E1) driver"); Should be "self" instead of "dev" . Ed: I just fixed it. Don't forget to include this when MFC'ing. --HPS ___ 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: r368409 - head/sys/dev/mn
Author: hselasky Date: Mon Dec 7 11:18:51 2020 New Revision: 368409 URL: https://svnweb.freebsd.org/changeset/base/368409 Log: Fix compilation after r368397. MFC after:3 days Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/sys/dev/mn/if_mn.c Modified: head/sys/dev/mn/if_mn.c == --- head/sys/dev/mn/if_mn.c Mon Dec 7 10:51:19 2020(r368408) +++ head/sys/dev/mn/if_mn.c Mon Dec 7 11:18:51 2020(r368409) @@ -1392,7 +1392,7 @@ mn_attach (device_t self) default: printf(" Rev 0x%x\n", sc->f54r->vstr); } - gone_in_dev(dev, 13, "sync serial (T1/E1) driver"); + gone_in_dev(self, 13, "sync serial (T1/E1) driver"); if (ng_make_node_common(, >node) != 0) { printf("ng_make_node_common failed\n"); ___ 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: r368408 - head/stand/kshim
Author: hselasky Date: Mon Dec 7 10:51:19 2020 New Revision: 368408 URL: https://svnweb.freebsd.org/changeset/base/368408 Log: Add missing busdma prototypes for load and unload and implement dummy sync function for kernel bootloader shim code. MFC after:1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/stand/kshim/bsd_kernel.c head/stand/kshim/bsd_kernel.h Modified: head/stand/kshim/bsd_kernel.c == --- head/stand/kshim/bsd_kernel.c Mon Dec 7 10:21:01 2020 (r368407) +++ head/stand/kshim/bsd_kernel.c Mon Dec 7 10:51:19 2020 (r368408) @@ -92,6 +92,13 @@ bus_dmamap_load(bus_dma_tag_t dmat, bus_dmamap_t map, } void +bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, int flags) +{ + /* Assuming coherent memory */ + __asm__ __volatile__("": : :"memory"); +} + +void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map) { Modified: head/stand/kshim/bsd_kernel.h == --- head/stand/kshim/bsd_kernel.h Mon Dec 7 10:21:01 2020 (r368407) +++ head/stand/kshim/bsd_kernel.h Mon Dec 7 10:51:19 2020 (r368408) @@ -669,6 +669,11 @@ extern int delay(unsigned int); #defineBUS_DMA_BUS30x40 #defineBUS_DMA_BUS40x80 +#defineBUS_DMASYNC_PREREAD 0x01 +#defineBUS_DMASYNC_POSTREAD0x02 +#defineBUS_DMASYNC_PREWRITE0x04 +#defineBUS_DMASYNC_POSTWRITE 0x08 + typedef void bus_dmamap_callback_t(void *, bus_dma_segment_t *, int, int); int @@ -679,9 +684,14 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t al bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc, void *lockfuncarg, bus_dma_tag_t *dmat); -int bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, -bus_dmamap_t *mapp); -void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map); -int bus_dma_tag_destroy(bus_dma_tag_t dmat); +int bus_dmamem_alloc(bus_dma_tag_t, void** vaddr, int flags, bus_dmamap_t *); +void bus_dmamem_free(bus_dma_tag_t, void *vaddr, bus_dmamap_t); +int bus_dma_tag_destroy(bus_dma_tag_t); + +int bus_dmamap_load(bus_dma_tag_t, bus_dmamap_t, void *buf, +bus_size_t buflen, bus_dmamap_callback_t *, +void *callback_arg, int flags); +void bus_dmamap_unload(bus_dma_tag_t, bus_dmamap_t); +void bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, int flags); #endif /* _BSD_KERNEL_H_ */ ___ 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: r368397 - in head: share/man/man4 sys/dev/mn
On 12/6/20 10:34 PM, Ed Maste wrote: + gone_in_dev(dev, 13, "sync serial (T1/E1) driver"); Should be "self" instead of "dev" . --HPS ___ 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: r368407 - head/stand/kshim
Author: hselasky Date: Mon Dec 7 10:21:01 2020 New Revision: 368407 URL: https://svnweb.freebsd.org/changeset/base/368407 Log: Tidy up code a bit. Add missing section comments. No functional change. MFC after:1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/stand/kshim/bsd_kernel.c Modified: head/stand/kshim/bsd_kernel.c == --- head/stand/kshim/bsd_kernel.c Mon Dec 7 09:48:06 2020 (r368406) +++ head/stand/kshim/bsd_kernel.c Mon Dec 7 10:21:01 2020 (r368407) @@ -30,23 +30,14 @@ struct usb_process usb_process[USB_PROC_MAX]; static device_t usb_pci_root; -/** - * Implementation of mutex API - **/ - -struct mtx Giant; int (*bus_alloc_resource_any_cb)(struct resource *res, device_t dev, int type, int *rid, unsigned int flags); int (*ofw_bus_status_ok_cb)(device_t dev); int (*ofw_bus_is_compatible_cb)(device_t dev, char *name); -static void -mtx_system_init(void *arg) -{ - mtx_init(, "Giant", NULL, MTX_DEF | MTX_RECURSE); -} -SYSINIT(mtx_system_init, SI_SUB_LOCK, SI_ORDER_MIDDLE, mtx_system_init, NULL); - +/** + * Implementation of busdma API + **/ int bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, bus_size_t boundary, bus_addr_t lowaddr, @@ -115,6 +106,10 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) return (0); } +/** + * Implementation of resource management API + **/ + struct resource * bus_alloc_resource_any(device_t dev, int type, int *rid, unsigned int flags) { @@ -254,6 +249,19 @@ ofw_bus_is_compatible(device_t dev, char *name) return ((*ofw_bus_is_compatible_cb)(dev, name)); } + +/** + * Implementation of mutex API + **/ + +struct mtx Giant; + +static void +mtx_system_init(void *arg) +{ + mtx_init(, "Giant", NULL, MTX_DEF | MTX_RECURSE); +} +SYSINIT(mtx_system_init, SI_SUB_LOCK, SI_ORDER_MIDDLE, mtx_system_init, NULL); void mtx_init(struct mtx *mtx, const char *name, const char *type, int opt) ___ 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: r368406 - head/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Mon Dec 7 09:48:06 2020 New Revision: 368406 URL: https://svnweb.freebsd.org/changeset/base/368406 Log: Prefer using the MIN() function macro over the min() inline function in the LinuxKPI. Linux defines min() to be a macro, while in FreeBSD min() is a static inline function clamping its arguments to "unsigned int". MFC after:1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h == --- head/sys/compat/linuxkpi/common/include/linux/bitops.h Mon Dec 7 09:21:06 2020(r368405) +++ head/sys/compat/linuxkpi/common/include/linux/bitops.h Mon Dec 7 09:48:06 2020(r368406) @@ -360,7 +360,7 @@ linux_reg_op(unsigned long *bitmap, int pos, int order index = pos / BITS_PER_LONG; offset = pos - (index * BITS_PER_LONG); nlongs_reg = BITS_TO_LONGS(nbits_reg); -nbitsinlong = min(nbits_reg, BITS_PER_LONG); +nbitsinlong = MIN(nbits_reg, BITS_PER_LONG); mask = (1UL << (nbitsinlong - 1)); mask += mask - 1; Modified: head/sys/compat/linuxkpi/common/include/linux/scatterlist.h == --- head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Mon Dec 7 09:21:06 2020(r368405) +++ head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Mon Dec 7 09:48:06 2020(r368406) @@ -343,7 +343,7 @@ __sg_alloc_table_from_pages(struct sg_table *sgt, } seg_size = ((j - cur) << PAGE_SHIFT) - off; - sg_set_page(s, pages[cur], min(size, seg_size), off); + sg_set_page(s, pages[cur], MIN(size, seg_size), off); size -= seg_size; off = 0; cur = j; ___ 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: r368405 - head/sys/sys
Author: hselasky Date: Mon Dec 7 09:21:06 2020 New Revision: 368405 URL: https://svnweb.freebsd.org/changeset/base/368405 Log: Allow sys/refcount.h to be used by standalone builds. No functional change. MFC after:1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/sys/sys/refcount.h Modified: head/sys/sys/refcount.h == --- head/sys/sys/refcount.h Mon Dec 7 04:45:29 2020(r368404) +++ head/sys/sys/refcount.h Mon Dec 7 09:21:06 2020(r368405) @@ -32,7 +32,7 @@ #include -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_STANDALONE) #include #else #include ___ 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"