git: pc64: Fix std_copyinstr() to correctly return ENAMETOOLONG

Aaron LI aly at crater.dragonflybsd.org
Tue Nov 17 01:30:55 PST 2026


commit 4895257648de5f9bbc5a0c68fd3d8c7e6b2615fb
Author: Aaron LI <aly at aaronly.me>
Date:   Sat Nov 7 09:17:33 2026 +0800

    pc64: Fix std_copyinstr() to correctly return ENAMETOOLONG
    
    The too-long branch previously compared the destination pointer (%rsi)
    against VM_MAX_USER_ADDRESS instead of the source pointer (%rdi). The
    destination is kernel memory, so it would always take the EFAULT path
    instead of returning the correct ENAMETOOLONG.
    
    Found-by: pjdfstest (https://github.com/pjd/pjdfstest)
    Assisted-by: DeepSeek-v4.1-flash (with Pi Coding Agent)

Summary of changes:
 sys/platform/pc64/x86_64/support.s | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4895257648de5f9bbc5a0c68fd3d8c7e6b2615fb


-- 
DragonFly BSD source repository


More information about the Commits mailing list