Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-9] src/sys



Module Name:    src
Committed By:   martin
Date:           Fri Sep 13 06:25:26 UTC 2019

Modified Files:
        src/sys/compat/linux/arch/amd64 [netbsd-9]: linux_machdep.c
        src/sys/compat/linux/common [netbsd-9]: linux_fcntl.h linux_file64.c
            linux_ipc.c linux_misc.c linux_signal.c linux_socket.c
            linux_socket.h linux_statfs.h linux_termios.c linux_termios.h
        src/sys/compat/linux32/common [netbsd-9]: linux32_dirent.c
            linux32_ioctl.c linux32_misc.c linux32_signal.c linux32_sysinfo.c
            linux32_termios.c linux32_utsname.c
        src/sys/compat/netbsd32 [netbsd-9]: netbsd32_compat_43.c
        src/sys/compat/ossaudio [netbsd-9]: ossaudio.c
        src/sys/kern [netbsd-9]: sysv_shm.c
        src/sys/miscfs/procfs [netbsd-9]: procfs_linux.c
        src/sys/sys [netbsd-9]: shm.h

Log Message:
Pull up following revision(s) (requested by maxv in ticket #194):

        sys/compat/linux/common/linux_socket.c: revision 1.146
        sys/compat/linux/common/linux_socket.c: revision 1.147
        sys/compat/linux/common/linux_socket.c: revision 1.148
        sys/compat/linux/common/linux_socket.c: revision 1.149
        sys/compat/linux/arch/amd64/linux_machdep.c: revision 1.59
        sys/compat/linux32/common/linux32_sysinfo.c: revision 1.8
        sys/kern/sysv_shm.c: revision 1.138
        sys/compat/linux/common/linux_file64.c: revision 1.61
        sys/compat/linux/common/linux_file64.c: revision 1.62
        sys/compat/netbsd32/netbsd32_compat_43.c: revision 1.58
        sys/compat/linux32/common/linux32_dirent.c: revision 1.20
        sys/compat/linux32/common/linux32_utsname.c: revision 1.10
        sys/compat/linux/common/linux_termios.h: revision 1.22
        sys/compat/linux32/common/linux32_termios.c: revision 1.15
        sys/compat/linux32/common/linux32_misc.c: revision 1.27
        sys/compat/linux32/common/linux32_ioctl.c: revision 1.14
        sys/compat/linux/common/linux_statfs.h: revision 1.7
        sys/compat/linux/common/linux_ipc.c: revision 1.57
        sys/compat/linux/common/linux_fcntl.h: revision 1.18
        sys/compat/linux/common/linux_socket.h: revision 1.24
        sys/sys/shm.h: revision 1.54
        sys/compat/ossaudio/ossaudio.c: revision 1.75
        sys/compat/linux32/common/linux32_signal.c: revision 1.20
        sys/miscfs/procfs/procfs_linux.c: revision 1.75
        sys/compat/linux/common/linux_signal.c: revision 1.81
        sys/compat/linux/common/linux_termios.c: revision 1.38
        sys/compat/linux/common/linux_misc.c: revision 1.241
        sys/compat/linux/common/linux_misc.c: revision 1.242
        sys/compat/linux/common/linux_misc.c: revision 1.243
        sys/compat/linux/common/linux_misc.c: revision 1.244

Fix info leaks.

Fix stupid bugs in linux_sys_shmctl(): the index could be out of bound
(page fault) and there was no proper locking.
Maybe we should just remove LINUX_SHM_STAT, like compat_linux32.

Remove printf.

When dealing with an unknown value, set -1, to prevent (harmless)
uninitialized accesses later.

Add a default case, don't call sys_ioctl() with an uninitialized 'com'
argument.

Fix error handling, returns an errno, not -1.

Put the printf under DEBUG_LINUX.

Hum, don't forget the 'pid' argument, otherwise we're not gonna go very
far.

Don't read data from userland directly. This simply does not work on any
recent x86 CPU (thanks to SMAP) and all architectures that forbid direct
access to userland from the kernel. But I guess no one noticed because no
one ever uses compat_linux, right?

Hum, don't pass an mbuf to realloc(). Inspired from copyin32_msg_control().

Fix memory leak.

I don't see the point in having this useless printf, but add a '\n' to it,
so that it at least displays useless stuff correctly.

Hum, remove incorrect assignment. Userland could have passed a smaller
namelen, and the uninitialized bytes from sb_data were being used later in
the network stack.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.58.2.1 \
    src/sys/compat/linux/arch/amd64/linux_machdep.c
cvs rdiff -u -r1.17 -r1.17.22.1 src/sys/compat/linux/common/linux_fcntl.h
cvs rdiff -u -r1.60 -r1.60.4.1 src/sys/compat/linux/common/linux_file64.c
cvs rdiff -u -r1.56 -r1.56.4.1 src/sys/compat/linux/common/linux_ipc.c
cvs rdiff -u -r1.240 -r1.240.4.1 src/sys/compat/linux/common/linux_misc.c
cvs rdiff -u -r1.80 -r1.80.8.1 src/sys/compat/linux/common/linux_signal.c
cvs rdiff -u -r1.145 -r1.145.4.1 src/sys/compat/linux/common/linux_socket.c
cvs rdiff -u -r1.23 -r1.23.18.1 src/sys/compat/linux/common/linux_socket.h
cvs rdiff -u -r1.6 -r1.6.42.1 src/sys/compat/linux/common/linux_statfs.h
cvs rdiff -u -r1.37 -r1.37.34.1 src/sys/compat/linux/common/linux_termios.c
cvs rdiff -u -r1.21 -r1.21.58.1 src/sys/compat/linux/common/linux_termios.h
cvs rdiff -u -r1.19 -r1.19.4.1 src/sys/compat/linux32/common/linux32_dirent.c
cvs rdiff -u -r1.13 -r1.13.68.1 src/sys/compat/linux32/common/linux32_ioctl.c
cvs rdiff -u -r1.26 -r1.26.18.1 src/sys/compat/linux32/common/linux32_misc.c
cvs rdiff -u -r1.19 -r1.19.8.1 src/sys/compat/linux32/common/linux32_signal.c
cvs rdiff -u -r1.7 -r1.7.72.1 src/sys/compat/linux32/common/linux32_sysinfo.c
cvs rdiff -u -r1.14 -r1.14.72.1 \
    src/sys/compat/linux32/common/linux32_termios.c
cvs rdiff -u -r1.9 -r1.9.72.1 src/sys/compat/linux32/common/linux32_utsname.c
cvs rdiff -u -r1.57 -r1.57.4.1 src/sys/compat/netbsd32/netbsd32_compat_43.c
cvs rdiff -u -r1.74 -r1.74.4.1 src/sys/compat/ossaudio/ossaudio.c
cvs rdiff -u -r1.135.2.1 -r1.135.2.2 src/sys/kern/sysv_shm.c
cvs rdiff -u -r1.74.4.1 -r1.74.4.2 src/sys/miscfs/procfs/procfs_linux.c
cvs rdiff -u -r1.52 -r1.52.4.1 src/sys/sys/shm.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index