All of lore.kernel.org
 help / color / mirror / Atom feed
From: "José Bollo" <jobol@nonadev.net>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC 1/1] LSM ptags: Add tagging of processes
Date: Tue, 29 Nov 2016 00:41:13 +0100	[thread overview]
Message-ID: <1480376473.2089.3.camel@nonadev.net> (raw)
In-Reply-To: <201611282241.FCF69778.FFMOFQLJtSVOOH@I-love.SAKURA.ne.jp>

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é

      reply	other threads:[~2016-11-28 23:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23  9:33 [RFC 0/1] LSM ptags: Secure tagging of processes jobol
2016-11-23  9:33 ` [RFC 1/1] LSM ptags: Add " jobol
2016-11-26  4:25   ` Tetsuo Handa
2016-11-28  9:11     ` José Bollo
2016-11-28 13:41       ` Tetsuo Handa
2016-11-28 23:41         ` José Bollo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1480376473.2089.3.camel@nonadev.net \
    --to=jobol@nonadev.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.