-
5da15a3...
by
Thadeu Lima de Souza Cascardo
on 2017-12-13
-
UBUNTU: Ubuntu-4.4.0-105.128
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
-
58ccc1a...
by
Al Viro <email address hidden>
on 2017-12-08
-
more bio_map_user_iov() leak fixes
we need to take care of failure exit as well - pages already
in bio should be dropped by analogue of bio_unmap_pages(),
since their refcounts had been bumped only once per reference
in bio.
Cc: <email address hidden>
Signed-off-by: Al Viro <email address hidden>
CVE-CVE-2017-12190
(backported from commit 2b04e8f6bbb196cab4b232af0f8d48ff2c7a8058)
[klebers: page_cache_release() is defined as put_page(), but keep it as
page_cache_release() for consistency with the rest of the code.]
Signed-off-by: Kleber Sacilotto de Souza <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Acked-by: Thadeu Lima de Souza Cascardo <email address hidden>
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
-
a4e868b...
by
Andreas Gruenbacher <email address hidden>
on 2017-11-16
-
mbcache: add reusable flag to cache entries
To reduce amount of damage caused by single bad block, we limit number
of inodes sharing an xattr block to 1024. Thus there can be more xattr
blocks with the same contents when there are lots of files with the same
extended attributes. These xattr blocks naturally result in hash
collisions and can form long hash chains and we unnecessarily check each
such block only to find out we cannot use it because it is already
shared by too many inodes.
Add a reusable flag to cache entries which is cleared when a cache entry
has reached its maximum refcount. Cache entries which are not marked
reusable are skipped by mb_cache_entry_find_{first,next}. This
significantly speeds up mbcache when there are many same xattr blocks.
For example for xattr-bench with 5 values and each process handling
20000 files, the run for 64 processes is 25x faster with this patch.
Even for 8 processes the speedup is almost 3x. We have also verified
that for situations where there is only one xattr block of each kind,
the patch doesn't have a measurable cost.
[JK: Remove handling of setting the same value since it is not needed
anymore, check for races in e_reusable setting, improve changelog,
add measurements]
Signed-off-by: Andreas Gruenbacher <email address hidden>
Signed-off-by: Jan Kara <email address hidden>
Signed-off-by: Theodore Ts'o <email address hidden>
(cherry picked from commit 6048c64b26097a0ffbd966866b599f990e674e9b)
CVE-2015-8952
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Acked-by: Kleber Sacilotto de Souza <email address hidden>
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
-
51e4dc3...
by
Andreas Gruenbacher <email address hidden>
on 2017-11-16
-
mbcache: get rid of _e_hash_list_head
Get rid of field _e_hash_list_head in cache entries and add bit field
e_referenced instead.
Signed-off-by: Andreas Gruenbacher <email address hidden>
Signed-off-by: Jan Kara <email address hidden>
Signed-off-by: Theodore Ts'o <email address hidden>
(cherry picked from commit dc8d5e565f00c9442fa1cbf9acc115475628527c)
CVE-2015-8952
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Acked-by: Kleber Sacilotto de Souza <email address hidden>
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
-
2f2f00c...
by
Jan Kara <email address hidden>
on 2017-11-16
-
mbcache2: rename to mbcache
Since old mbcache code is gone, let's rename new code to mbcache since
number 2 is now meaningless. This is just a mechanical replacement.
Signed-off-by: Jan Kara <email address hidden>
Signed-off-by: Theodore Ts'o <email address hidden>
(cherry picked from commit 7a2508e1b657cfc7e1371550f88c7a7bc4288f32)
CVE-2015-8952
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Acked-by: Kleber Sacilotto de Souza <email address hidden>
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
-
1961750...
by
Jan Kara <email address hidden>
on 2017-11-16
-
mbcache: remove mbcache
Both ext2 and ext4 are now converted to mbcache2. Remove the old mbcache
code.
Signed-off-by: Jan Kara <email address hidden>
Signed-off-by: Theodore Ts'o <email address hidden>
(cherry picked from commit ecd1e64412d5242b8afdef58a714bab3c5464f79)
CVE-2015-8952
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Acked-by: Kleber Sacilotto de Souza <email address hidden>
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
-
3cafb06...
by
Jan Kara <email address hidden>
on 2017-11-16
-
ext4: shortcut setting of xattr to the same value
When someone tried to set xattr to the same value (i.e., not changing
anything) we did all the work of removing original xattr, possibly
breaking references to shared xattr block, inserting new xattr, and
merging xattr blocks again. Since this is not so rare operation and it
is relatively cheap for us to detect this case, check for this and
shortcut xattr setting in that case.
Signed-off-by: Jan Kara <email address hidden>
Signed-off-by: Theodore Ts'o <email address hidden>
(cherry picked from commit 3fd164629d25b04f291a79a013dcc7ce1a301269)
CVE-2015-8952
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Acked-by: Kleber Sacilotto de Souza <email address hidden>
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
-
d85489e...
by
Andreas Gruenbacher <email address hidden>
on 2017-11-16
-
ext4: kill ext4_mballoc_ready
This variable, introduced in commit 9c191f70, is unnecessary: it is set
once the module has been initialized correctly, and ext4_fill_super
cannot run unless the module has been initialized correctly.
Signed-off-by: Andreas Gruenbacher <email address hidden>
Signed-off-by: Jan Kara <email address hidden>
Signed-off-by: Theodore Ts'o <email address hidden>
(cherry picked from commit 2335d05f3a83f5290ec28c1ed30c1c742a37edc9)
CVE-2015-8952
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Acked-by: Kleber Sacilotto de Souza <email address hidden>
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
-
7349b02...
by
Jan Kara <email address hidden>
on 2017-11-16
-
mbcache2: Use referenced bit instead of LRU
Currently we maintain perfect LRU list by moving entry to the tail of
the list when it gets used. However these operations on cache-global
list are relatively expensive.
In this patch we switch to lazy updates of LRU list. Whenever entry gets
used, we set a referenced bit in it. When reclaiming entries, we give
referenced entries another round in the LRU. Since the list is not a
real LRU anymore, rename it to just 'list'.
In my testing this logic gives about 30% boost to workloads with mostly
unique xattr blocks (e.g. xattr-bench with 10 files and 10000 unique
xattr values).
Signed-off-by: Jan Kara <email address hidden>
Signed-off-by: Theodore Ts'o <email address hidden>
(cherry picked from commit f0c8b46238db9d51ef9ea0858259958d0c601cec)
CVE-2015-8952
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Acked-by: Kleber Sacilotto de Souza <email address hidden>
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
-
6a5caf1...
by
Jan Kara <email address hidden>
on 2017-11-16
-
mbcache2: limit cache size
So far number of entries in mbcache is limited only by the pressure from
the shrinker. Since too many entries degrade the hash table and
generally we expect that caching more entries has diminishing returns,
limit number of entries the same way as in the old mbcache to 16 * hash
table size.
Once we exceed the desired maximum number of entries, we schedule a
backround work to reclaim entries. If the background work cannot keep up
and the number of entries exceeds two times the desired maximum, we
reclaim some entries directly when allocating a new entry.
Signed-off-by: Jan Kara <email address hidden>
Signed-off-by: Theodore Ts'o <email address hidden>
(cherry picked from commit c2f3140fe2eceb3a6c1615b2648b9471544881c6)
CVE-2015-8952
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Acked-by: Kleber Sacilotto de Souza <email address hidden>
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>