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]
Date:	Tue, 16 Dec 2008 10:12:07 +0900 (JST)
From:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To:	Eric Paris <eparis@...hat.com>
Cc:	kosaki.motohiro@...fujitsu.com, linux-kernel@...r.kernel.org,
	hch@...radead.org, akpm@...ux-foundation.org
Subject: Re: [PATCH 3/3] fsnotify: use the new open-exec hook for inotify and dnotify

> diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h
> index 88265dd..a7122c6 100644
> --- a/include/linux/fsnotify.h
> +++ b/include/linux/fsnotify.h
> @@ -170,6 +170,12 @@ static inline void fsnotify_modify(struct dentry *dentry)
>   */
>  static inline void fsnotify_open_exec(struct file *file)
>  {
> +	struct dentry *dentry = file->f_path.dentry;
> +	struct inode *inode = dentry->d_inode;
> +
> +	dnotify_parent(dentry, DN_ACCESS);
> +	inotify_dentry_parent_queue_event(dentry, IN_ACCESS, 0, dentry->d_name.name);
> +	inotify_inode_queue_event(inode, IN_ACCESS, 0, NULL, NULL);
>  }

Current fsnotify_open() has following code

	static inline void fsnotify_open(struct dentry *dentry)
	{
	        struct inode *inode = dentry->d_inode;
	        u32 mask = IN_OPEN;
	
	        if (S_ISDIR(inode->i_mode))
	                mask |= IN_ISDIR;
	
	        inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name);
	        inotify_inode_queue_event(inode, mask, 0, NULL, NULL);
	}

they are two different.

1) Call dnotify_parent() or not
2) Use IN_OPEN or IN_ACCESS

The patch description doesn't explain any reason.


IOW, IN_ACCESS is usually used by read(). but linux has demand paging
mechanism. then exec() only do open and mmap.
actual reading is processed by page fault.

I guess you have the reason of this design choice.
but it isn't described.




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ