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: <CA+55aFz+cijJuUTs6xs6SdGnasmR7uYXKkr7=0YTuPQ+xgjFEA@mail.gmail.com>
Date:	Mon, 2 Jun 2014 18:15:36 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Andy Lutomirski <luto@...capital.net>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Tejun Heo <tj@...nel.org>, Li Zefan <lizefan@...wei.com>,
	Linux FS Devel <linux-fsdevel@...r.kernel.org>
Subject: Re: 3.15 regression: wrong cgroup magic

On Mon, Jun 2, 2014 at 5:56 PM, Andy Lutomirski <luto@...capital.net> wrote:
>
> In particular, this piece:
>
> -       sb->s_magic = CGROUP_SUPER_MAGIC;
>
> The result is that cgroup shows up with the wrong magic number, so my
> code goes "oh crap, cgroupfs isn't mounted" and fails.
>
> I can change my code to hack around this, but I can imagine other
> things getting tripped up.  Is there still time to fix this?

Sure. Send me a tested patch. I'm assuming it's going to look something like

  --- a/kernel/cgroup.c
  +++ b/kernel/cgroup.c
  @@ -54,6 +54,7 @@
   #include <linux/vmalloc.h> /* TODO: replace with more sophisticated array */
   #include <linux/kthread.h>
   #include <linux/delay.h>
  +#include <linux/magic.h>

   #include <linux/atomic.h>

  @@ -1607,6 +1608,8 @@ out_unlock:
          dentry = kernfs_mount(fs_type, flags, root->kf_root, &new_sb);
          if (IS_ERR(dentry) || !new_sb)
                  cgroup_put(&root->cgrp);
  +       else
  +               dentry->d_sb->s_magic = CGROUP_SUPER_MAGIC;
          return dentry;
   }

but somebody definitely needs to test it.

               Linus
--
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