svn commit: r315957 - in head/sys: amd64/linux amd64/linux32 compat/linux i386/linux

Konstantin Belousov kostikbel at gmail.com
Sat Mar 25 23:36:38 UTC 2017


On Sat, Mar 25, 2017 at 03:47:30PM +0000, Dmitry Chagin wrote:
> Author: dchagin
> Date: Sat Mar 25 15:47:29 2017
> New Revision: 315957
> URL: https://svnweb.freebsd.org/changeset/base/315957
> 
> Log:
>   Implement Linux mincore() system call.
>   This is necessary for the upcoming drm-next.
> +int
> +linux_mincore(struct thread *td, struct linux_mincore_args *args)
> +{
> +	struct mincore_args bsd_args;
> +
> +	/* Needs to be page-aligned */
> +	if (args->start & PAGE_MASK)
> +		return (EINVAL);
> +	bsd_args.addr = PTRIN(args->start);
> +	bsd_args.len = args->len;
> +	bsd_args.vec = args->vec;
> +	return (sys_mincore(td, &bsd_args));
> +}

Almost all syscalls implementations in vm/vm_mmap.c got the kern_*
helpers, sys_mincore() did not because it was not called outside the
file.  Please add kern_mincore() and use it, instead of abusing syscall
entry.


More information about the svn-src-head mailing list