diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2017-02-16 16:04:04 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-02-16 16:07:27 +0100 |
commit | 3af85ffd7278b4d6cf670f2cedb0906c6f424c03 (patch) | |
tree | a7ff12538211c1121cc4e3f6b1896fbc92572846 /main/zfs-grsec | |
parent | bdabbd50e8ed4b1c1d1431b4177dce88d9f16dda (diff) | |
download | aports-3af85ffd7278b4d6cf670f2cedb0906c6f424c03.tar.bz2 aports-3af85ffd7278b4d6cf670f2cedb0906c6f424c03.tar.xz |
main/zfs-grsec: more RAP fixes
Diffstat (limited to 'main/zfs-grsec')
-rw-r--r-- | main/zfs-grsec/APKBUILD | 4 | ||||
-rw-r--r-- | main/zfs-grsec/pax-rap-fixes.patch | 166 |
2 files changed, 97 insertions, 73 deletions
diff --git a/main/zfs-grsec/APKBUILD b/main/zfs-grsec/APKBUILD index 21e80888ad..206387c814 100644 --- a/main/zfs-grsec/APKBUILD +++ b/main/zfs-grsec/APKBUILD @@ -10,7 +10,7 @@ _kver=4.9.10 _kpkgrel=0 _realver=0.6.5.9 -_mypkgrel=1 +_mypkgrel=2 _kernelver=$_kver-r$_kpkgrel _abi_release=${_kver}-${_kpkgrel}-${_flavor} @@ -102,4 +102,4 @@ e20fb3004af9e6454513d7df09292465e5bc4101a558538cf794ef41b56a30713e1868dcda251e6b 9843aca713021772435cfa68fde5d9aa2de0387de0da6c48045db0348f2a24d2c2e968d3eb1921923170c9e2fd6514e31c5f0a7bacbf8510b53c2c625c4737d1 0007-Remove-complicated-libspl-assert-wrappers.patch fa752b3ed04f05ec4fac257cbd2c581a57a792e12165d8f135a77b894445cdefb0da1753922e3e59c9fbaed20ca1dc6d19b5436745c8fa588a42304f6561f1a2 0008-Add-support-for-libtirpc.patch d2efb627f493bab06f8049dc4bcb7c39269ff9dcd66879a0f96fa5040e1c7468f9e684277ec3e54841b3a5f8734d9470f2c6a1af470e3f1a71f759f9155b7ede 0009-Add-support-for-alpine-linux.patch -da6367891d8f92d1f2972225cca36e83296fb4b8a4f19964149f39c4b2900de6daf1b1085bc0deb973528fd115a4b404462fdbe7f861e0227483d3e35273d04a pax-rap-fixes.patch" +85e545418fbf47b867e95d58f2c1fe810be5f280c66ac3f583e30f47737d752b40191a313accaac62537181c86ba0fc5485e8d4f50d6c561c317b7eb1db3c163 pax-rap-fixes.patch" diff --git a/main/zfs-grsec/pax-rap-fixes.patch b/main/zfs-grsec/pax-rap-fixes.patch index 575d816398..462ef57e48 100644 --- a/main/zfs-grsec/pax-rap-fixes.patch +++ b/main/zfs-grsec/pax-rap-fixes.patch @@ -252,77 +252,6 @@ index 1d5ee97..6469c8b 100644 tx_state_t *tx = &dp->dp_tx; callb_cpr_t cpr; -diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c -index 384a37f..76d02a4 100644 ---- a/module/zfs/zfs_vnops.c -+++ b/module/zfs/zfs_vnops.c -@@ -919,6 +919,13 @@ zfs_write(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr) - } - EXPORT_SYMBOL(zfs_write); - -+static void -+iput_wrapper(void *_i) -+{ -+ struct inode *i = _i; -+ iput(i); -+} -+ - void - zfs_iput_async(struct inode *ip) - { -@@ -929,7 +936,7 @@ zfs_iput_async(struct inode *ip) - - if (atomic_read(&ip->i_count) == 1) - taskq_dispatch(dsl_pool_iput_taskq(dmu_objset_pool(os)), -- (task_func_t *)iput, ip, TQ_SLEEP); -+ iput_wrapper, ip, TQ_SLEEP); - else - iput(ip); - } -diff --git a/module/zfs/zio.c b/module/zfs/zio.c -index 2bc88c5..df44e39 100644 ---- a/module/zfs/zio.c -+++ b/module/zfs/zio.c -@@ -1345,7 +1345,7 @@ zio_taskq_dispatch(zio_t *zio, zio_taskq_type_t q, boolean_t cutinline) - * to dispatch the zio to another taskq at the same time. - */ - ASSERT(taskq_empty_ent(&zio->io_tqent)); -- spa_taskq_dispatch_ent(spa, t, q, (task_func_t *)zio_execute, zio, -+ spa_taskq_dispatch_ent(spa, t, q, zio_execute, zio, - flags, &zio->io_tqent); - } - -@@ -1406,8 +1406,9 @@ static zio_pipe_stage_t *zio_pipeline[]; - * it is externally visible. - */ - void --zio_execute(zio_t *zio) -+zio_execute(void *_zio) - { -+ zio_t *zio = _zio; - fstrans_cookie_t cookie; - - cookie = spl_fstrans_mark(); -@@ -1560,8 +1561,9 @@ zio_nowait(zio_t *zio) - */ - - static void --zio_reexecute(zio_t *pio) -+zio_reexecute(void *_pio) - { -+ zio_t *pio = _pio; - zio_t *cio, *cio_next; - int c, w; - -@@ -3362,7 +3364,7 @@ zio_done(zio_t *zio) - ASSERT(taskq_empty_ent(&zio->io_tqent)); - spa_taskq_dispatch_ent(zio->io_spa, - ZIO_TYPE_CLAIM, ZIO_TASKQ_ISSUE, -- (task_func_t *)zio_reexecute, zio, 0, -+ zio_reexecute, zio, 0, - &zio->io_tqent); - } - return (ZIO_PIPELINE_STOP); diff --git a/module/zfs/zfs_replay.c b/module/zfs/zfs_replay.c index 0ca1e03..66a2d96 100644 --- a/module/zfs/zfs_replay.c @@ -515,6 +444,101 @@ index 0ca1e03..66a2d96 100644 + zfs_replay_create_acl, /* TX_MKDIR_ACL_ATTR */ + zfs_replay_write2, /* TX_WRITE2 */ }; +diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c +index 384a37f..76d02a4 100644 +--- a/module/zfs/zfs_vnops.c ++++ b/module/zfs/zfs_vnops.c +@@ -919,6 +919,13 @@ zfs_write(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr) + } + EXPORT_SYMBOL(zfs_write); + ++static void ++iput_wrapper(void *_i) ++{ ++ struct inode *i = _i; ++ iput(i); ++} ++ + void + zfs_iput_async(struct inode *ip) + { +@@ -929,7 +936,7 @@ zfs_iput_async(struct inode *ip) + + if (atomic_read(&ip->i_count) == 1) + taskq_dispatch(dsl_pool_iput_taskq(dmu_objset_pool(os)), +- (task_func_t *)iput, ip, TQ_SLEEP); ++ iput_wrapper, ip, TQ_SLEEP); + else + iput(ip); + } +diff --git a/module/zfs/zil.c b/module/zfs/zil.c +index 289b23c..f909e99 100644 +--- a/module/zfs/zil.c ++++ b/module/zfs/zil.c +@@ -1217,8 +1217,9 @@ zil_itx_destroy(itx_t *itx) + * so no locks are needed. + */ + static void +-zil_itxg_clean(itxs_t *itxs) ++zil_itxg_clean(void *data) + { ++ itxs_t *itxs = data; + itx_t *itx; + list_t *list; + avl_tree_t *t; +@@ -1431,7 +1432,7 @@ zil_clean(zilog_t *zilog, uint64_t synced_txg) + * created a bad performance problem. + */ + if (taskq_dispatch(zilog->zl_clean_taskq, +- (void (*)(void *))zil_itxg_clean, clean_me, TQ_NOSLEEP) == 0) ++ zil_itxg_clean, clean_me, TQ_NOSLEEP) == 0) + zil_itxg_clean(clean_me); + } + +diff --git a/module/zfs/zio.c b/module/zfs/zio.c +index 2bc88c5..df44e39 100644 +--- a/module/zfs/zio.c ++++ b/module/zfs/zio.c +@@ -1345,7 +1345,7 @@ zio_taskq_dispatch(zio_t *zio, zio_taskq_type_t q, boolean_t cutinline) + * to dispatch the zio to another taskq at the same time. + */ + ASSERT(taskq_empty_ent(&zio->io_tqent)); +- spa_taskq_dispatch_ent(spa, t, q, (task_func_t *)zio_execute, zio, ++ spa_taskq_dispatch_ent(spa, t, q, zio_execute, zio, + flags, &zio->io_tqent); + } + +@@ -1406,8 +1406,9 @@ static zio_pipe_stage_t *zio_pipeline[]; + * it is externally visible. + */ + void +-zio_execute(zio_t *zio) ++zio_execute(void *_zio) + { ++ zio_t *zio = _zio; + fstrans_cookie_t cookie; + + cookie = spl_fstrans_mark(); +@@ -1560,8 +1561,9 @@ zio_nowait(zio_t *zio) + */ + + static void +-zio_reexecute(zio_t *pio) ++zio_reexecute(void *_pio) + { ++ zio_t *pio = _pio; + zio_t *cio, *cio_next; + int c, w; + +@@ -3362,7 +3364,7 @@ zio_done(zio_t *zio) + ASSERT(taskq_empty_ent(&zio->io_tqent)); + spa_taskq_dispatch_ent(zio->io_spa, + ZIO_TYPE_CLAIM, ZIO_TASKQ_ISSUE, +- (task_func_t *)zio_reexecute, zio, 0, ++ zio_reexecute, zio, 0, + &zio->io_tqent); + } + return (ZIO_PIPELINE_STOP); diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c index 0bb68f9..9f4b11a 100644 --- a/module/zfs/zvol.c |