linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: douglas.leeder@sophos.com
To: Eric Paris <eparis@redhat.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Arjan van de Ven <arjan@infradead.org>,
	Adrian Bunk <bunk@kernel.org>,
	Casey Schaufler <casey@schaufler-ca.com>,
	davecb@sun.com, david@lang.hm, Jan Harkes <jaharkes@cs.cmu.edu>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	malware-list@lists.printk.net,
	malware-list-bounces@dmesg.printk.net
Subject: Re: [malware-list] scanner interface proposal was: [TALPA]	Intro	linux interface for access scanning
Date: Thu, 21 Aug 2008 15:35:27 +0100	[thread overview]
Message-ID: <20080821143525.27F9F37655B@pmx1.sophos.com> (raw)
In-Reply-To: <1219245321.3389.82.camel@localhost.localdomain>

Eric Paris wrote on 2008-08-20 16:15:21:

> At the moment I'm leaning towards a separate async notification system
> for open/mtime change/close which will be a fire and forget notification
> system with no access control mechanism.
> 
> A second, although very similar, mechanism will block on read/mmap
> (although I'm not so sure how to handle O_NONBLOCK without a kernel
> fastpath/inode marking that actually gets used, this is really a serious
> design issue with putting this at read/mmap.  I don't think we are ready
> to give up on O_NONBLOCK for S_ISREG altogether just yet are we?) and
> provide access control.  I also plan to include open() in the
> blocking/access control based on a /proc tunable.  If applications can't
> handle EPERM at read/mmap they can get it at open and suffer the
> perf/blocking hit needlessly on open/stat sequences.

I think these are excellent ideas. 

The kernel really does have to keep some record if it's going to do any 
scanning from read() calls, it can't go to userspace each time to check
if a file is cached.
(It might be the single open file descriptor that's marked though)

O_NONBLOCK is then handled nicely, and we can avoid ever blocking that 
client process (which given they're trying non-blocking IO is probably 
a good thing).

-- 
Douglas Leeder



Sophos Plc, The Pentagon, Abingdon Science Park, Abingdon,
OX14 3YP, United Kingdom.

Company Reg No 2096520. VAT Reg No GB 348 3873 20.


  parent reply	other threads:[~2008-08-21 14:35 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.DEB.1.10.0808180444390.12859@asgard.lang.hm>
     [not found] ` <20080818131628.1C2A22FE82F@pmx1.sophos.com>
2008-08-18 14:25   ` [malware-list] scanner interface proposal was: [TALPA] Intro to a linux interface for on access scanning Theodore Tso
2008-08-18 15:31     ` tvrtko.ursulin
2008-08-18 15:31       ` Alan Cox
2008-08-18 13:42         ` David Collier-Brown
2008-08-18 17:53           ` Alan Cox
2008-08-18 18:13           ` david
2008-08-18 15:58         ` tvrtko.ursulin
2008-08-18 17:13           ` david
2008-08-18 16:15       ` Eric Paris
2008-08-18 16:15         ` Alan Cox
2008-08-18 16:54           ` douglas.leeder
2008-08-18 16:40             ` Alan Cox
2008-08-18 17:28           ` Eric Paris
2008-08-18 17:25             ` Alan Cox
2008-08-18 17:54               ` Eric Paris
2008-08-18 18:30                 ` Eric Paris
2008-08-18 18:51                   ` Alan Cox
2008-08-18 18:35                 ` Jan Harkes
2008-08-18 18:46                   ` Eric Paris
2008-08-18 19:04                     ` david
2008-08-20  2:44                       ` [malware-list] scanner interface proposal was: [TALPA] Intro linux interface for for " david
2008-08-20 15:15                         ` Eric Paris
2008-08-20 17:33                           ` david
2008-08-20 19:26                             ` Eric Paris
2008-08-21  0:42                               ` david
2008-08-20 17:50                           ` david
2008-08-21 14:35                           ` douglas.leeder [this message]
2008-08-21 21:19                             ` [malware-list] scanner interface proposal was: [TALPA] Intro linux interface " david
2008-08-22 15:09                         ` [malware-list] scanner interface proposal was: [TALPA] Intro linux interface for " Pavel Machek
2008-08-23  7:28                           ` david
2008-08-18 19:32                     ` [malware-list] scanner interface proposal was: [TALPA] Intro to a linux interface for on " Jan Harkes
2008-08-18 17:38             ` david
2008-08-18 17:29         ` david
2008-08-18 17:39           ` Eric Paris
2008-08-18 18:09             ` david
2008-08-18 18:34               ` Eric Paris
2008-08-18 17:07       ` david
2008-08-19  8:40         ` tvrtko.ursulin
2008-08-18 22:40       ` Pavel Machek
2008-08-18 23:07         ` Eric Paris
2008-08-19  1:15           ` Peter Dolding
2008-08-19  8:09             ` douglas.leeder
2008-08-19 11:08               ` Peter Dolding
     [not found]                 ` <20080819114040.2FD1B336880@pmx1.sophos.com>
2008-08-20  3:03                   ` Peter Dolding
2008-08-18 16:28     ` douglas.leeder

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=20080821143525.27F9F37655B@pmx1.sophos.com \
    --to=douglas.leeder@sophos.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arjan@infradead.org \
    --cc=bunk@kernel.org \
    --cc=casey@schaufler-ca.com \
    --cc=davecb@sun.com \
    --cc=david@lang.hm \
    --cc=eparis@redhat.com \
    --cc=jaharkes@cs.cmu.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=malware-list-bounces@dmesg.printk.net \
    --cc=malware-list@lists.printk.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).