<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/patch.git/src, branch testing</title>
<subtitle>git.savannah.gnu.org: git/patch.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/'/>
<entry>
<title>Describe better how the dirfd cache works</title>
<updated>2015-03-05T22:14:57+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2015-03-05T21:55:27+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/commit/?id=274c66c77583be2eb5b0a61a2efc671e1d041314'/>
<id>274c66c77583be2eb5b0a61a2efc671e1d041314</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use overflow safe arithmetic for counting cache misses</title>
<updated>2015-03-05T22:14:25+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2015-03-05T22:12:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/commit/?id=99d3b514e9421799b4496dda7a95c4eb099e7a43'/>
<id>99d3b514e9421799b4496dda7a95c4eb099e7a43</id>
<content type='text'>
* src/safe.c: We don't need a long counter if we use overflow-safe arithmetic
here.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/safe.c: We don't need a long counter if we use overflow-safe arithmetic
here.
</pre>
</div>
</content>
</entry>
<entry>
<title>Also cache resolved symlinks</title>
<updated>2015-03-05T21:57:44+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2015-03-01T18:08:43+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/commit/?id=a6615bcb83b673082025db15ec323707f8305fa3'/>
<id>a6615bcb83b673082025db15ec323707f8305fa3</id>
<content type='text'>
When resolving a symlink in a pathname, we traverse each path component in the
symlink and cache all of them.  At the end, add an additional cache entry for
the symlink itself so that we don't have to resolve the symlink again (even
though this will usually be cached).  Skip that if the symlink's parent isn't
in the cache anymore, though.
* src/safe.c (free_cached_dirfd): Remove from parent here instead of in
callers. Move close() to remove_cached_dirfd() instead.
(insert_cached_dirfd): Only insert if the entry's parent still exists; entries
without parent are invalid (see compare_cached_dirfds()); "top-level" entries
have cwd as their parent.
(new_cached_dirfd): New function split off from openat_cached().
(openat_cached): Use new_cached_dirfd() here.
(traverse_another_path): When starting to resolve a symlink, create an unhashed
dirfd cache entry for the symlink lookup result. When the symlink is completely
resolved, add that entry to the cache.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When resolving a symlink in a pathname, we traverse each path component in the
symlink and cache all of them.  At the end, add an additional cache entry for
the symlink itself so that we don't have to resolve the symlink again (even
though this will usually be cached).  Skip that if the symlink's parent isn't
in the cache anymore, though.
* src/safe.c (free_cached_dirfd): Remove from parent here instead of in
callers. Move close() to remove_cached_dirfd() instead.
(insert_cached_dirfd): Only insert if the entry's parent still exists; entries
without parent are invalid (see compare_cached_dirfds()); "top-level" entries
have cwd as their parent.
(new_cached_dirfd): New function split off from openat_cached().
(openat_cached): Use new_cached_dirfd() here.
(traverse_another_path): When starting to resolve a symlink, create an unhashed
dirfd cache entry for the symlink lookup result. When the symlink is completely
resolved, add that entry to the cache.
</pre>
</div>
</content>
</entry>
<entry>
<title>Invalidate child dirfd cache entries when their parent goes away</title>
<updated>2015-03-05T21:57:44+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2015-03-01T00:08:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/commit/?id=914d06b7c3cc613df7617fae5903dbcaee601d5d'/>
<id>914d06b7c3cc613df7617fae5903dbcaee601d5d</id>
<content type='text'>
If we don't do that, a directory could be removed from the cache, a new
directory with the same dirfd could be created, and the entries from the old
directory would appear in the new directory.
* src/safe.c (struct cached_dirfd): Keep track of the children of each dirfd
cache entry.
(remove_cached_dirfd): Remove all the entry's children from the lookup hash,
take them off the list of children, and initialize the children's
children_link.  Then, remove the entry itself from its parent. This has no
effect if the entry doesn't have a parent because then, children_link is empty.
(openat_cached): Add new dirfd cache entries to their parent's list of children
and initialize the entry's list of children.
(traverse_another_path): Also initialize cwd's list of children.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If we don't do that, a directory could be removed from the cache, a new
directory with the same dirfd could be created, and the entries from the old
directory would appear in the new directory.
* src/safe.c (struct cached_dirfd): Keep track of the children of each dirfd
cache entry.
(remove_cached_dirfd): Remove all the entry's children from the lookup hash,
take them off the list of children, and initialize the children's
children_link.  Then, remove the entry itself from its parent. This has no
effect if the entry doesn't have a parent because then, children_link is empty.
(openat_cached): Add new dirfd cache entries to their parent's list of children
and initialize the entry's list of children.
(traverse_another_path): Also initialize cwd's list of children.
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert lru list into a list_head list</title>
<updated>2015-03-05T21:57:42+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2015-03-01T00:11:16+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/commit/?id=c5705fd476957f0854bc0d7dbd05e444f8f73760'/>
<id>c5705fd476957f0854bc0d7dbd05e444f8f73760</id>
<content type='text'>
* src/safe.c (struct cached_dirfd): Replace prev and next with a lru_link
list_head.
(lru_list): Turn into a list_head.
(lru_list_add, lru_list_del, lru_list_del_init): Replace by list_add(),
list_del(), list_del_init().
(insert_cached_dirfd): Get to the list entry from the embedded list_head with
the list_entry() macro.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/safe.c (struct cached_dirfd): Replace prev and next with a lru_link
list_head.
(lru_list): Turn into a list_head.
(lru_list_add, lru_list_del, lru_list_del_init): Replace by list_add(),
list_del(), list_del_init().
(insert_cached_dirfd): Get to the list entry from the embedded list_head with
the list_entry() macro.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add list_head based double linked list</title>
<updated>2015-03-05T21:57:07+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2015-03-01T00:10:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/commit/?id=ca9df22fe61c7e3b76ded1543ba083e51d0319ce'/>
<id>ca9df22fe61c7e3b76ded1543ba083e51d0319ce</id>
<content type='text'>
* src/list.h: New data structure.
src/Makefile.am (patch_SOURCES): Add list.h.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/list.h: New data structure.
src/Makefile.am (patch_SOURCES): Add list.h.
</pre>
</div>
</content>
</entry>
<entry>
<title>Invalidate dirfd less aggressively</title>
<updated>2015-03-05T21:57:07+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2015-02-28T23:08:40+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/commit/?id=0d3df382d616f37efb5191548a22656f8494ca76'/>
<id>0d3df382d616f37efb5191548a22656f8494ca76</id>
<content type='text'>
src/safe.c (safe_rename, safe_rmdir): Only invalidate cache entries when the
underlying sycall succeeds and the entry actually goes away.  This keeps the
cache filled upon speculative rmdir when the directory may not be empty, for
example.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
src/safe.c (safe_rename, safe_rmdir): Only invalidate cache entries when the
underlying sycall succeeds and the entry actually goes away.  This keeps the
cache filled upon speculative rmdir when the directory may not be empty, for
example.
</pre>
</div>
</content>
</entry>
<entry>
<title>Move path traversal error reporting into main()</title>
<updated>2015-03-05T21:57:07+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2015-02-28T12:28:49+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/commit/?id=6fbdcefe7d099731a18a5a82cfea6ee87e332556'/>
<id>6fbdcefe7d099731a18a5a82cfea6ee87e332556</id>
<content type='text'>
* src/safe.c (traverse_another_path): Don't report errors here.
* src/patch.c (main): Instead, recognize and report them here. Detect when an
output file name is invalid; it doesn't make sense to try creating a
reject file based on the same outbut file name in that case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/safe.c (traverse_another_path): Don't report errors here.
* src/patch.c (main): Instead, recognize and report them here. Detect when an
output file name is invalid; it doesn't make sense to try creating a
reject file based on the same outbut file name in that case.
</pre>
</div>
</content>
</entry>
<entry>
<title>Limit the number of path components</title>
<updated>2015-03-05T21:57:07+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2015-02-28T05:12:34+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/commit/?id=a025a51ca5c173c958ad446d9ba5718019867ba8'/>
<id>a025a51ca5c173c958ad446d9ba5718019867ba8</id>
<content type='text'>
src/safe.c (MAX_PATH_COMPONENTS): The maximum number of path components
allowed.
(count_path_components): New function.
(traverse_another_path): Fail if the number of path components gets too high.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
src/safe.c (MAX_PATH_COMPONENTS): The maximum number of path components
allowed.
(count_path_components): New function.
(traverse_another_path): Fail if the number of path components gets too high.
</pre>
</div>
</content>
</entry>
<entry>
<title>Follow directory symlinks within the working directory</title>
<updated>2015-03-05T21:57:04+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2015-02-21T19:13:04+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/commit/?id=ef609c26b22e5d6ea3c891e4c87ab1c679146f5f'/>
<id>ef609c26b22e5d6ea3c891e4c87ab1c679146f5f</id>
<content type='text'>
* src/safe.c (struct symlink): A symlink to resolve.
(push_symlink, pop_symlink): New functions.
(read_symlink): Create a new symlink stack entry.
(traverse_next): Follow ".." components within the working directory. When
hitting symlinks, "follow" them by reading and returning them.
(traverse_another_path): Recursively traverse symlinks.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/safe.c (struct symlink): A symlink to resolve.
(push_symlink, pop_symlink): New functions.
(read_symlink): Create a new symlink stack entry.
(traverse_next): Follow ".." components within the working directory. When
hitting symlinks, "follow" them by reading and returning them.
(traverse_another_path): Recursively traverse symlinks.
</pre>
</div>
</content>
</entry>
</feed>
