Re: CVS commit: src/sys/compat/freebsd
Date:Sat, 6 Apr 2019 10:48:32 -0700 From:Jason Thorpe Message-ID: | The only situation I know of where it's wacky is sparc64-built-as-ILP32 | and mips64-built-as-ILP32, where register_t is 64-bit and long is 32-bit. But that is kind of the point - from qhat I can see from a (very) quick scan, register_t is used almost exclusively for syscall args/results (for which it makes sense) - and those are objects which are likely being copied to/from user space. Just like ufetch_ptr() exists, even though a pointer is almost always the same as an int or a long in terms of number of bits, etc, register_t will essentially always be one or the other - but we never really know which. Unlike most of the other contrived types (size_t, intmax_t, ptrdiff_t) which aren't all that frequently shunted around, register_t is, which is why (just like ptr_t) I believe it would be one which should have its own access functions. But I will leave it for you to decide what is really needed there. kre
Re: CVS commit: src/sys/compat/freebsd
> On Apr 6, 2019, at 10:45 AM, Robert Elz wrote: > > Actually, fetching & storing registers (register_t) is a common enough > thing that it might be worth having ufetch_reg (and ustore_reg), probably > as MD #defines that map into one of the other calls. The only situation I know of where it's wacky is sparc64-built-as-ILP32 and mips64-built-as-ILP32, where register_t is 64-bit and long is 32-bit. -- thorpej
Re: CVS commit: src/sys/compat/freebsd
Actually, fetching & storing registers (register_t) is a common enough thing that it might be worth having ufetch_reg (and ustore_reg), probably as MD #defines that map into one of the other calls. kre
Re: CVS commit: src/sys/compat/freebsd
Date:Sat, 6 Apr 2019 10:30:39 -0700 From:Jason Thorpe Message-ID: <047ba730-614e-46fd-85e2-f501d18f4...@me.com> | This is wrong -- register_t is 64-bit on amd64 ... so u_long | is the better choice of cast. It was wrong anyway, it needs to be an unsigned type (even though code is signed) ... but yes, I will switch it back to the previous version, and we can just hope that this stuff never gets used on a system where long is 64 bits and register_t is 32. kre
Re: CVS commit: src/sys
Thanks! christos > On Apr 6, 2019, at 8:28 AM, Kamil Rytarowski wrote: > > > Done. I'm still working on adding more test scenarios for fork-related > events. I've just covered basic clone(2) scenarios and undisclosed > another bug in the code sitting since 2012.
Re: CVS commit: src/sys
On 04.04.2019 21:32, Christos Zoulas wrote: > In article <86734bad-b0e6-57dc-3e0f-5d7c124fa...@gmx.com>, > Kamil Rytarowski wrote: >> -=-=-=-=-=- >> -=-=-=-=-=- >> >> On 04.04.2019 02:42, Christos Zoulas wrote: >>> Intermediate or not quality counts It would have been simple >> enough to write the function once and call it from 13 places, perhaps >> even less work! >>> >> >> It does. I'm waiting now on releng test results (the service seems to be >> returning 503) and I will switch to a centralized form. >> >> Quality matters so I will also fixup in one go vfork(2) KTR reports in a >> child. It was handled accordingly only in the MD version for sparc and >> sparc64 and shall be centralized. > > Thanks! I was oversensitized because I had to gc 13 slightly different MD > copies of setdisklabel(9). > > christos > Done. I'm still working on adding more test scenarios for fork-related events. I've just covered basic clone(2) scenarios and undisclosed another bug in the code sitting since 2012. signature.asc Description: OpenPGP digital signature
Re: CVS commit: src/external/bsd/pkg_install/dist/create
Date:Sat, 6 Apr 2019 08:29:02 + From:"Robert Elz" Message-ID: <20190406082902.1da38f...@cvs.netbsd.org> | Module Name:src | Committed By: kre | Date: Sat Apr 6 08:29:02 UTC 2019 | | Modified Files: | src/external/bsd/pkg_install/dist/create: util.c | | Log Message: | Use __UNCONST() rather than a simple cast to free a const char * | while avoiding gcc noise. Note that a better fix for this would probably be to remove the const from the fields in the struct definition (in create.h) As far as I can see, nothing needs (even conceptually) that they be there - the data is always assigned as ptr->owner = xstrdup(whatever); where xstrdup() is just strdup() + error check, and strdup() is the canonical way to correctly (if slowly) convert a const char * into a char * ... making it be const char * again just seems wrong. However, I will leave it for someone else to determine if that really is a preferred solution. kre
Re: CVS commit: src
On 06.04.2019 05:06, Jason R Thorpe wrote: > Module Name: src > Committed By: thorpej > Date: Sat Apr 6 03:06:29 UTC 2019 > > Modified Files: > src/distrib/sets/lists/comp: mi > src/distrib/sets/lists/tests: module.mi > src/share/man/man9: Makefile ipi.9 ucas.9 > src/sys/arch/aarch64/aarch64: TODO fault.c fusu.S trap.c > src/sys/arch/aarch64/include: machdep.h > src/sys/arch/alpha/alpha: genassym.cf locore.s trap.c > src/sys/arch/alpha/include: alpha.h pcb.h types.h > src/sys/arch/amd64/amd64: copy.S trap.c > src/sys/arch/amd64/include: types.h > src/sys/arch/amiga/amiga: trap.c > src/sys/arch/arm/arm: arm_machdep.c fusu.S lock_cas.S undefined.c > src/sys/arch/arm/arm32: fault.c > src/sys/arch/arm/include: locore.h types.h > src/sys/arch/atari/atari: trap.c > src/sys/arch/cesfic/cesfic: machdep.c trap.c > src/sys/arch/hp300/hp300: trap.c > src/sys/arch/hppa/hppa: copy.S machdep.c trap.c > src/sys/arch/i386/i386: copy.S trap.c > src/sys/arch/i386/include: types.h > src/sys/arch/ia64/ia64: machdep.c support.S > src/sys/arch/luna68k/luna68k: trap.c > src/sys/arch/luna68k/stand/boot: machdep.c > src/sys/arch/m68k/fpe: fpu_calcea.c fpu_emulate.c > src/sys/arch/m68k/include: m68k.h > src/sys/arch/m68k/m68k: compat_16_machdep.c copy.s m68k_machdep.c > m68k_syscall.c m68k_trap.c regdump.c sunos_syscall.c > src/sys/arch/mac68k/mac68k: trap.c > src/sys/arch/mips/include: locore.h types.h > src/sys/arch/mips/mips: bds_emul.S copy.S db_disasm.c db_interface.c > fp.S lock_stubs_llsc.S lock_stubs_ras.S mips_emul.c mips_fixup.c > trap.c > src/sys/arch/mvme68k/mvme68k: trap.c > src/sys/arch/news68k/news68k: trap.c > src/sys/arch/next68k/next68k: trap.c > src/sys/arch/powerpc/conf: files.powerpc > src/sys/arch/powerpc/include: types.h > src/sys/arch/powerpc/powerpc: locore_subr.S trap.c > src/sys/arch/riscv/riscv: trap.c > src/sys/arch/sh3/include: pcb.h > src/sys/arch/sh3/sh3: db_disasm.c exception.c genassym.cf locore_subr.S > sh3_machdep.c syscall.c vm_machdep.c > src/sys/arch/sparc/sparc: compat_16_machdep.c db_trace.c locore.s > machdep.c sunos_machdep.c trap.c > src/sys/arch/sparc64/include: types.h > src/sys/arch/sparc64/sparc64: copy.S > src/sys/arch/sun2/sun2: trap.c > src/sys/arch/sun3/sun3: trap.c > src/sys/arch/usermode/include: types.h > src/sys/arch/usermode/usermode: copy.c > src/sys/arch/vax/vax: subr.S > src/sys/arch/x68k/x68k: trap.c > src/sys/compat/freebsd: freebsd_syscall.c > src/sys/compat/linux/arch/alpha: linux_osf1.c > src/sys/external/bsd/drm/dist/bsd-core: drmP.h > src/sys/kern: subr_copy.c subr_prof.c > src/sys/rump/librump/rumpkern: rumpcopy.c > src/sys/sys: param.h systm.h > src/sys/uvm: uvm_mmap.c > src/tests/modules: Makefile > Added Files: > src/share/man/man9: ufetch.9 ustore.9 > src/tests/modules/ufetchstore: Makefile.inc t_ufetchstore.c > src/tests/modules/ufetchstore/module: Makefile common.h > ufetchstore_tester.c > Removed Files: > src/share/man/man9: fetch.9 store.9 > src/sys/arch/powerpc/powerpc: fubyte.c fuswintr.c subyte.c suswintr.c > suword.c > > Log Message: > Overhaul the API used to fetch and store individual memory cells in > userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(), > subyte(), suword(), etc.) are retired and replaced with new ufetch(9) > and ustore(9) APIs that can return proper error codes, etc. and are > implemented consistently across all platforms. The interrupt-safe > variants are no longer supported (and several of the existing attempts > at fuswintr(), etc. were buggy and not actually interrupt-safe). > > Also augmement the ucas(9) API, making it consistently available on > all plaforms, supporting uniprocessor and multiprocessor systems, even > those that do not have CAS or LL/SC primitives. > > Welcome to NetBSD 8.99.37. > > Thanks for this work! This commit contains unintended changes. I've reverted llvmcmd part in the distrib files. It removed also my recent changes to child_return() code. I will work on this on my side now. Please double check if there is anything else unintended. signature.asc Description: OpenPGP digital signature