History log of /netbsd/sys/arch/i386/i386/copy.S (Results 1 – 25 of 32)
Revision Date Author Comments
# d71e829b 30-Jun-2020 maxv <maxv@NetBSD.org>

Make copystr() a MI C function, part of libkern and shared on all
architectures.

Notes:

- On alpha and ia64 the function is kept but gets renamed locally to avoid
symbol collision. This is beca

Make copystr() a MI C function, part of libkern and shared on all
architectures.

Notes:

- On alpha and ia64 the function is kept but gets renamed locally to avoid
symbol collision. This is because on these two arches, I am not sure
whether the ASM callers do not rely on fixed registers, so I prefer to
keep the ASM body for now.
- On Vax, only the symbol is removed, because the body is used from other
functions.
- On RISC-V, this change fixes a bug: copystr() was just a wrapper around
strlcpy(), but strlcpy() makes the operation less safe (strlen on the
source beyond its size).
- The kASan, kCSan and kMSan wrappers are removed, because now that
copystr() is in C, the compiler transformations are applied to it,
without the need for manual wrappers.

Could test on amd64 only, but should be fine.

show more ...


# 8f3bea6e 04-May-2019 maxv <maxv@NetBSD.org>

Hum. Fix a potentially catastrophic bug: kcopy() sets DF=1 if the areas
overlap, but doesn't clear it if the copy faults. If this happens, we
return to the caller with DF=1, and each future memory co

Hum. Fix a potentially catastrophic bug: kcopy() sets DF=1 if the areas
overlap, but doesn't clear it if the copy faults. If this happens, we
return to the caller with DF=1, and each future memory copy will be
backwards.

I wonder if there really are places where kcopy() is called with
overlapping areas.

show more ...


# 15ef08df 06-Apr-2019 thorpej <thorpej@NetBSD.org>

Fix a think-o / paste-o in the max user address check, pointed out
by maxv@.


# e3f92458 06-Apr-2019 thorpej <thorpej@NetBSD.org>

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 ufe

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.

show more ...


# 0c52a5de 14-Jul-2018 maxv <maxv@NetBSD.org>

Drop NENTRY() from the x86 kernels, use ENTRY(). With PMCs (and other hardware
tracing facilities) we have a much better ways of monitoring the CPU activity
than GPROF, without software modification.

Drop NENTRY() from the x86 kernels, use ENTRY(). With PMCs (and other hardware
tracing facilities) we have a much better ways of monitoring the CPU activity
than GPROF, without software modification.

Also I think GPROF has never worked, because the 'start' functions of both
i386 and amd64 use ENTRY(), and it would have caused a function call while the
kernel was not yet relocated.

show more ...


# ce18565b 27-Jan-2018 maxv <maxv@NetBSD.org>

Add SMAP support for i386.


# f42d24b1 27-Jan-2018 maxv <maxv@NetBSD.org>

Sync with amd64, in particular, add END() markers, don't fall through
functions, narrow the copy windows, and remove suword.


# 548506e1 16-Sep-2016 maxv <maxv@NetBSD.org>

x86_copyargs takes as third argument a size, but still copies two chunks of
16 and 24 bytes, without checking the userland<->kernel limit accordingly.
Fix it by just checking the maximum size direcly

x86_copyargs takes as third argument a size, but still copies two chunks of
16 and 24 bytes, without checking the userland<->kernel limit accordingly.
Fix it by just checking the maximum size direcly.

It means that even if 16 bytes are copied, the kernel now makes sure 40
bytes are in userland. We could make it more fine-grained, but it would
probably unoptimize the function, and we don't care enough.

show more ...


# 19a4bead 13-May-2016 maxv <maxv@NetBSD.org>

KNF a little, use C-style comments, and remove susword/fusword. No
functional changes.


# 38c2e45c 10-Jan-2014 pedro <pedro@NetBSD.org>

Fix a comment describing the check performed by copyin(); the value
checked against VM_MAXUSER_ADDRESS is derived from the source address,
not the destination address. OK rmind@.


# dd80381c 07-Jul-2010 chs <chs@NetBSD.org>

return the error from fault handler in ucas_fault
rather than forcing EFAULT.


# 3f18fe81 27-Nov-2009 rmind <rmind@NetBSD.org>

- Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it acce

- Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places. Reduce sys/user.h inclusions.

show more ...


# 5df4a900 06-Nov-2009 dyoung <dyoung@NetBSD.org>

return_address(9) can be called from interrupt context; handle its
page faults appropriately.


# 3d5b001d 03-Nov-2009 dyoung <dyoung@NetBSD.org>

Add return_address(9) for reading the Nth return address from the call
stack.


# 614719fd 28-Mar-2009 rmind <rmind@NetBSD.org>

Add few comments.


# f7d3fa20 23-Feb-2009 rmind <rmind@NetBSD.org>

Add ucas (CAS for user-space address) support for i386 and amd64.
API provides ucas_int() and ucas_ptr() for now.

Reviewed by <ad>.


# ce099b40 28-Apr-2008 martin <martin@NetBSD.org>

Remove clause 3 and 4 from TNF licenses


# 64bcc9bd 28-Apr-2008 ad <ad@NetBSD.org>

Make this preemption safe.


# 52b171ca 25-Apr-2008 ad <ad@NetBSD.org>

fillw() is no longer used.


# a4914dc7 11-Dec-2007 lukem <lukem@NetBSD.org>

Use __KERNEL_RCSID(). For these .S files, the following style was
adopted, a la .C files and <sys/cdefs.h>:
* move <machine/asm.h> to the top
* use __KERNEL_RCSID() immediately after it


# d0f12a6a 29-Nov-2007 yamt <yamt@NetBSD.org>

instead of setting pcb_onfault on every calls of copyin and friends,
make the fault handler investigate program counter of faulting code.
inspired from linux.


# aa21c280 21-Nov-2007 dsl <dsl@NetBSD.org>

When copying system call arguments into kernel space, either copy 4
arguments (enough for the majority of calls) or the maximum of 10 (8 plus
2 for sys__syscall).
Avoids all the unlikely-to-be-predic

When copying system call arguments into kernel space, either copy 4
arguments (enough for the majority of calls) or the maximum of 10 (8 plus
2 for sys__syscall).
Avoids all the unlikely-to-be-predicted-correctly in the unrolled loop.
This might be a problem if a thread's stack doesn't have the extra args
mapped - but that is extremely unlikely.

show more ...


# 33e2fcd0 16-Nov-2007 ad <ad@NetBSD.org>

Avoid doing rep; movsl with %ecx == 0, since it's expensive. Suggested
by dsl@.


# deae4f32 15-Nov-2007 ad <ad@NetBSD.org>

Remove support for 80386 level CPUs. PR port-i386/36163.


# 90143628 14-Nov-2007 ad <ad@NetBSD.org>

- Remove I486_CPU, I586_CPU, I686_CPU options. They buy us nothing and
clutter the code significantly.
- Remove pccons.


12