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: <YbOlLawFDdS0hkpd@slm.duckdns.org>
Date:   Fri, 10 Dec 2021 09:06:21 -1000
From:   Tejun Heo <tj@...nel.org>
To:     Linus Torvalds <torvalds@...uxfoundation.org>
Cc:     "Eric W. Biederman" <ebiederm@...ssion.com>,
        Michal Koutny <mkoutny@...e.com>, Jens Axboe <axboe@...nel.dk>,
        Kees Cook <keescook@...omium.org>,
        Oleg Nesterov <oleg@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Jim Newsome <jnewsome@...project.org>,
        Alexey Gladkov <legion@...nel.org>,
        Andy Lutomirski <luto@...capital.net>,
        Jann Horn <jannh@...gle.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Security Officers <security@...nel.org>,
        Kernel Team <kernel-team@...com>
Subject: Re: [PATCH 2/6] cgroup: Allocate cgroup_file_ctx for
 kernfs_open_file->priv

On Fri, Dec 10, 2021 at 10:45:33AM -0800, Linus Torvalds wrote:
> But if it then ever becomes a possible source of confusion and it's
> not obvious from the context who uses what, I'd rather use the extra 8
> bytes in the allocation.
> 
> Ok?

Just so that I'm understanding you correctly. The following is what I was
suggesting. ie. just dropping the union and making the iterator embedded:

  struct cgroup_file_ctx {
          struct cgroup_namespace         ns;

          struct {
                  struct css_task_iter    it;
          } procs;

          struct {
                  void                    *trigger;
          } psi;
  };

and I was wondering whether you wanted something like the following:

  struct cgroup_file_ctx {
          struct cgroup_namespace         ns;
          struct css_task_iter            it;
          void                            *trigger;
  };

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ