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]
Message-ID: <CAK8P3a2s2YsttKSjZfc8xW+kjv8M1hFDCg1E9nHPjq_KRvik2Q@mail.gmail.com>
Date:   Thu, 15 Mar 2018 21:44:24 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Dominik Brodowski <linux@...inikbrodowski.net>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        Andy Lutomirski <luto@...nel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v2 17/36] fs: add ksys_chroot() helper; remove-in kernel
 calls to sys_chroot()

On Thu, Mar 15, 2018 at 8:05 PM, Dominik Brodowski
<linux@...inikbrodowski.net> wrote:
> Using this helper allows us to avoid the in-kernel calls to the sys_chroot()
> syscall.
>
> Cc: Alexander Viro <viro@...iv.linux.org.uk>
> Signed-off-by: Dominik Brodowski <linux@...inikbrodowski.net>
> ---
>  drivers/base/devtmpfs.c  | 2 +-
>  fs/open.c                | 7 ++++++-
>  include/linux/syscalls.h | 1 +
>  init/do_mounts.c         | 2 +-
>  init/do_mounts_initrd.c  | 4 ++--
>  5 files changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
> index 4afb04686c8e..5743f04014ca 100644
> --- a/drivers/base/devtmpfs.c
> +++ b/drivers/base/devtmpfs.c
> @@ -387,7 +387,7 @@ static int devtmpfsd(void *p)
>         if (*err)
>                 goto out;
>         sys_chdir("/.."); /* will traverse into overmounted root */
> -       sys_chroot(".");
> +       ksys_chroot(".");
>         complete(&setup_done);
>         while (1) {
>                 spin_lock(&req_lock);

Could this be done using kern_path()/set_fs_root() instead so we
avoid the __user pointer?

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ