9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Devon H. O'Dell" <devon.odell@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] security questions
Date: Thu, 16 Apr 2009 19:36:40 -0400	[thread overview]
Message-ID: <9ab217670904161636p62f77a18ufe0c14ac6245f078@mail.gmail.com> (raw)
In-Reply-To: <018fd7d22990276158c51cac837d041b@quanstro.net>

2009/4/16 erik quanstrom <quanstro@quanstro.net>:
> On Thu Apr 16 17:51:42 EDT 2009, devon.odell@gmail.com wrote:
>> 2009/4/16 erik quanstrom <quanstro@quanstro.net>:
>> > have you taken a look at the protection measures already
>> > built into the kernel like smalloc?
>>
>> At least in FreeBSD, you can't sleep in an interrupt thread. I suppose
>> that's probably also the case in Plan 9 interrupt handlers, and this
>> would mitigate that situation.
>
> plan 9 doesn't have interrupt threads, but that's beside the point.
>
> interrupts are driven by the hardware, not users.  so smalloc, which
> is used to allow user space to wait for memory if it is not currently
> available doesn't make any sense.

My misunderstanding then, as smalloc is available in port/alloc.c,
which is also compiled into the kernel. I'm not concerned about oom
conditions in userland.

> having the potential for running out of memory in an interrupt
> handler might be a sign that a little code reorg is in order, if you
> are worried about this sort of thing.  (and even if you're not.)

The potential for running out of memory in an interrupt handler exists
if a user has found a way to consume kernel resources from userland
and the interrupt needs to allocate that extra 1 byte.

> in any event, i think there is more code to deal with these problems
> in the kernel that first meets the eye.  much of it is small and, if you're
> not looking for it, easy to miss.

I don't think so. You can get very specific about the problem or you
can get very generic. This is a generic implementation that would
allow for dealing with such problems as they arise, and actually
dealing with them in an easy, extensible fashion, without having to
add huge support code diffs for calculation of every resource you're
tracking (as is the case with rlimits, which require you to add
functions for each limit, hooks everywhere you want to track them,
shell support, and sysctls).

>From a codebase perspective, it's not a lot more code than you'd
think. It's very little code so far, and I'm about halfway finished
with the support part. Initial implementation will probably be
suboptimal, but I think useful for proof of concept.

Identifying the areas that need attention is the difficult part, but
I'll address that further down.

>> Depends again on the application. If you're talking about a terminal,
>> yes. If you're talking about a CPU server where someone is working on
>> code, someone else is writing a presentation, and yet another person
>> is in the middle of a video transcode, you're talking about a lot of
>> wasted time, potentially.
>
> and potentially, i could win the lottery.  ☺.

And potentially, this code would go into Plan 9. ☺ ☺ ☺.

I think those chances are a little smaller. Fileservers and terminal
servers, I don't think this is a big issue. CPU servers, I think it
is. I'm considering setting up a public Plan 9 cluster, though however
useless/useful it is to be remains to be seen. Part of the purpose of
this endeavor is to find exactly these kind of conditions. Whether
anybody is interested remains to be seen, but perhaps some incentives
can be provided. I don't know.

> i have had exactly 1 out-of-resource reboot in the last 18 months.
> without real data on what and where the problems are, i would
> think this would become a difficult issue.

I don't know what your use case is, though I know that you probably
use the system more heavily than I. I think with people trying to find
issues, it could be a much easier endeavor, and I think it's a fun one
to address.

The fact that there was one proves that these issues can occur
theoretically. All it needs is identification and reproduction.

We're shielded in part by our small userbase and relative lack of
interest in examining code and auditing. But that's not security.

> - erik

--dho



  reply	other threads:[~2009-04-16 23:36 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-16 17:47 Devon H. O'Dell
2009-04-16 18:30 ` erik quanstrom
2009-04-16 19:14   ` Venkatesh Srinivas
2009-04-16 20:10     ` Devon H. O'Dell
2009-04-16 20:19       ` Devon H. O'Dell
2009-04-17  4:48         ` lucio
2009-04-17  5:03           ` Eris Discordia
2009-04-17  9:47             ` lucio
2009-04-17 10:24               ` Eris Discordia
2009-04-17 11:55                 ` lucio
2009-04-17 13:08                   ` Eris Discordia
2009-04-17 14:15                     ` gdiaz
2009-04-17 16:39                     ` lucio
     [not found]                   ` <6FD675BC714D323BF959A53B@192.168.1.2>
2009-04-17 16:15                     ` Robert Raschke
2009-04-17 20:12                       ` John Barham
2009-04-17 21:40                         ` blstuart
2009-04-17 16:32               ` [9fans] VMs, etc. (was: Re: security questions) blstuart
2009-04-17 17:11                 ` tlaronde
2009-04-17 17:29                   ` erik quanstrom
2009-04-17 18:18                     ` tlaronde
2009-04-17 19:00                       ` erik quanstrom
2009-04-17 18:50                     ` blstuart
2009-04-17 18:31                   ` blstuart
2009-04-17 18:45                     ` erik quanstrom
2009-04-17 18:59                       ` blstuart
2009-04-17 19:05                         ` erik quanstrom
2009-04-17 20:21                           ` blstuart
2009-04-18 14:54                             ` erik quanstrom
2009-04-18 16:06                               ` Mechiel Lukkien
2009-04-19 20:52                               ` blstuart
2009-04-20 17:30                                 ` [9fans] VMs, etc maht
2009-04-20 17:44                                   ` erik quanstrom
2009-04-20 17:47                                     ` Devon H. O'Dell
2009-04-20 17:49                                     ` maht
2009-04-17 19:39                     ` [9fans] VMs, etc. (was: Re: security questions) tlaronde
2009-04-17 21:25                       ` blstuart
2009-04-17 21:59                         ` tlaronde
2009-04-17 23:41                         ` Mechiel Lukkien
2009-04-17 18:59                   ` Eris Discordia
2009-04-17 21:38                     ` blstuart
     [not found]                   ` <1322FA0842063D3D53C712DC@192.168.1.2>
2009-04-17 20:07                     ` J.R. Mauro
2009-04-17 19:02                 ` lucio
2009-04-17 21:01                   ` blstuart
2009-04-18  5:25                     ` lucio
2009-04-19 20:19                       ` blstuart
2009-04-17 19:16                 ` [9fans] Plan9 - the next 20 years Steve Simon
2009-04-17 19:39                   ` J.R. Mauro
2009-04-17 19:43                   ` tlaronde
2009-04-17 19:56                     ` J.R. Mauro
2009-04-17 20:14                     ` Eric Van Hensbergen
2009-04-17 20:18                       ` Benjamin Huntsman
2009-04-18  4:26                         ` erik quanstrom
2009-04-17 20:29                       ` J.R. Mauro
2009-04-18  3:56                         ` erik quanstrom
2009-04-18  4:12                           ` J.R. Mauro
2009-04-18  4:16                             ` erik quanstrom
2009-04-18  5:51                               ` J.R. Mauro
2009-04-18 12:52                       ` Steve Simon
2009-04-17 20:20                   ` John Barham
2009-04-16 20:51       ` [9fans] security questions erik quanstrom
2009-04-16 21:49         ` Devon H. O'Dell
2009-04-16 22:19           ` erik quanstrom
2009-04-16 23:36             ` Devon H. O'Dell [this message]
2009-04-17  0:00               ` erik quanstrom
2009-04-17  1:25                 ` Devon H. O'Dell
2009-04-17  1:54                   ` erik quanstrom
2009-04-17  2:17                     ` Devon H. O'Dell
2009-04-17  2:23                       ` erik quanstrom
2009-04-17  2:33                         ` Devon H. O'Dell
2009-04-17  2:43                           ` J.R. Mauro
2009-04-17  5:48                             ` john
2009-04-17  5:52                               ` Bruce Ellis
2009-04-17  5:52                               ` andrey mirtchovski
2009-04-17  5:57                                 ` Bruce Ellis
2009-04-17  9:26                           ` Charles Forsyth
2009-04-17 10:29                             ` Steve Simon
2009-04-17 11:04                               ` Mechiel Lukkien
2009-04-17 11:36                               ` lucio
2009-04-17 11:40                               ` lucio
2009-04-17 11:51                                 ` erik quanstrom
2009-04-17 12:06                               ` erik quanstrom
2009-04-17 13:52                                 ` Steve Simon
2009-04-17  1:59                   ` Russ Cox
2009-04-17 12:07                     ` maht
2009-04-17  2:07                   ` Bakul Shah
2009-04-17  2:19                     ` Devon H. O'Dell
2009-04-17  6:33                       ` Bakul Shah
2009-04-17  9:51                         ` lucio
2009-04-17 11:34                         ` erik quanstrom
2009-04-17 12:14                           ` Devon H. O'Dell
2009-04-17 18:29                             ` Bakul Shah
2009-04-17 11:59                         ` Devon H. O'Dell
2009-04-17  5:06                     ` Eris Discordia
2009-04-17  8:36             ` Richard Miller

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=9ab217670904161636p62f77a18ufe0c14ac6245f078@mail.gmail.com \
    --to=devon.odell@gmail.com \
    --cc=9fans@9fans.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).