On Sun, Aug 21, 2022 at 02:03:54AM -0400, Daniel Dickman wrote:
> locore.s rev 1.113 from 2007 removed support for 80386 processors from 
> copyin and copyout. However, the note about 386 CPUs in the comment for 
> copyout was missed. Patch below updates the comment to match the code.
> 
> While here s/destination/source/ for the description of copyin. Taken from 
> NetBSD sys/arch/i386/i386/copy.S rev 1.23.
> 
> ok?
> 
> Index: locore.s
> ===================================================================
> RCS file: /cvs/src/sys/arch/i386/i386/locore.s,v
> retrieving revision 1.195
> diff -u -p -u -r1.195 locore.s
> --- locore.s  15 Aug 2022 04:17:50 -0000      1.195
> +++ locore.s  21 Aug 2022 05:55:46 -0000
> @@ -472,9 +472,7 @@ ENTRY(copyout)
>       /*
>        * We check that the end of the destination buffer is not past the end
>        * of the user's address space.  If it's not, then we only need to
> -      * check that each page is writable.  The 486 will do this for us; the
> -      * 386 will not.  (We assume that pages in user space that are not
> -      * writable by the user are not writable by the kernel either.)
> +      * check that each page is readable, and the CPU will do that for us.

did you purposefully change writable to readable?
and remove the "(We assume.. )" part?

>        */
>       movl    %edi,%edx
>       addl    %eax,%edx
> @@ -527,7 +525,7 @@ ENTRY(copyin)
>       movl    24+FPADD(%esp),%eax
>  
>       /*
> -      * We check that the end of the destination buffer is not past the end
> +      * We check that the end of the source buffer is not past the end
>        * of the user's address space.  If it's not, then we only need to
>        * check that each page is readable, and the CPU will do that for us.
>        */
> 
> 

Reply via email to