lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 24 Sep 2012 20:49:42 +0400
From:	Cyrill Gorcunov <gorcunov@...nvz.org>
To:	Mark Salter <msalter@...hat.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Russell King <rmk@....linux.org.uk>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Kees Cook <keescook@...omium.org>,
	linux-kernel@...r.kernel.org,
	Linux-Arch <linux-arch@...r.kernel.org>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>
Subject: Re: sys_kcmp (was: Re: [PATCH 1/2] ARM: add finit_module syscall to
 ARM)

On Mon, Sep 24, 2012 at 12:21:46PM -0400, Mark Salter wrote:
> diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h
> index 991ef01..3748ec9 100644
> --- a/include/asm-generic/unistd.h
> +++ b/include/asm-generic/unistd.h
> @@ -691,9 +691,11 @@ __SC_COMP(__NR_process_vm_readv, sys_process_vm_readv, \
>  #define __NR_process_vm_writev 271
>  __SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \
>            compat_sys_process_vm_writev)
> +#define __NR_kcmp 272
> +__SYSCALL(__NR_kcmp, sys_kcmp)
>  
>  #undef __NR_syscalls
> -#define __NR_syscalls 272
> +#define __NR_syscalls 273
> 
> > 
> > I have that queued for 3.7.  There is of course a little risk here.  We
> > do have a test in tools/testing/selftests/kcmp/ - I suggest that arch
> > people run it!  In fact all the tools/testing/selftests should execute
> > successfully on all architectures - if not, please let's fix things
> > up.
> 
> I ran into a build error on C6X (no-MMU) when I enabled CHECKPOINT_RESTORE:
> 
>   linux-next/kernel/sys.c: In function 'prctl_set_mm':
>   linux-next/kernel/sys.c:1869:34: error: 'mmap_min_addr' undeclared (first use in this function)
> 
> I got past that with:
> 
> diff --git a/include/linux/security.h b/include/linux/security.h
> index 01ef030..14e394d 100644
> --- a/include/linux/security.h
> +++ b/include/linux/security.h
> @@ -118,6 +118,7 @@ void reset_security_ops(void);
>  extern unsigned long mmap_min_addr;
>  extern unsigned long dac_mmap_min_addr;
>  #else
> +#define mmap_min_addr          0UL
>  #define dac_mmap_min_addr      0UL
>  #endif
> 
> Looking at kcmp_test.c, it uses fork, so won't work without MMU. Is
> the kcmp syscall even meaningful for no-MMU? I suppose some of the
> tests in kcmp_test.c could be accomplished using clone directly
> rather than fork.

Hi Mark, good catch! I think it should be two patches then. As to kcmp_test.c,
I've been using fork there simply because it was simplier. The clone could
be used as well. (kcmp should work even with mmu emulated i think).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ