Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1531807

Re: [RFC 1/1] LSM ptags: Add tagging of processes

From José Bollo <jobol@nonadev.net>
Newsgroups linux.kernel
Subject Re: [RFC 1/1] LSM ptags: Add tagging of processes
Date 2016-11-29 00:50 +0100
Message-ID <sIDQl-jV-1@gated-at.bofh.it> (permalink)
References <sGClH-36I-15@gated-at.bofh.it> <sGClH-36I-13@gated-at.bofh.it> <sHCMG-1Hh-1@gated-at.bofh.it> <sIqgp-c4-5@gated-at.bofh.it> <sIutH-2IY-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Le lundi 28 novembre 2016 à 22:41 +0900, Tetsuo Handa a écrit :
> Jose Bollo wrote:
> > The fact is that ptags is seat behind the implementation of the
> > special
> > files in /proc/PID/attr/.. Thus, it has to return an allocated
> > buffer.
> > I'm not aware of what kind of allocation is possible to use for
> > this
> > subsystem. Is it possible to use vmalloc? I dont know.
> 
> If you replace kfree() with kvfree() in proc_pid_attr_read() in
> fs/proc/base.c ,
> you will be able to use vmalloc(). However, proc_pid_attr_write()
> accepts only
> PAGE_SIZE bytes from the beginning. If you want to use attributes
> longer than
> PAGE_SIZE bytes, I think that you will need to use a different
> interface because
> implementing I/O protocol for ptags which reads/writes PAGE_SIZE
> bytes chunk
> at a time using /proc/PID/attr/ interface is not userspace friendly.

Limiting a line of write to the length of PAGE_SIZE is ok for me.

Limiting the space of tags for a thread to 32700 is also ok for me.

It is safe, careful and sensible.

These limits will allow to advance in the use of ptags without
modifying much things.

Best regards
José

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [RFC 1/1] LSM ptags: Add tagging of processes Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-11-26 05:30 +0100
  Re: [RFC 1/1] LSM ptags: Add tagging of processes José Bollo <jobol@nonadev.net> - 2016-11-28 10:20 +0100
    Re: [RFC 1/1] LSM ptags: Add tagging of processes Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-11-28 14:50 +0100
      Re: [RFC 1/1] LSM ptags: Add tagging of processes José Bollo <jobol@nonadev.net> - 2016-11-29 00:50 +0100

csiph-web