aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/iscsitarget-grsec/APKBUILD59
-rw-r--r--main/iscsitarget-grsec/iscsitarget-2.6.36.patch11
-rw-r--r--main/iscsitarget-grsec/iscsitarget-2.6.37.patch283
-rw-r--r--main/iscsitarget-grsec/iscsitarget-2.6.38.patch32
-rw-r--r--main/iscsitarget/APKBUILD46
-rw-r--r--main/iscsitarget/ietd.confd30
-rw-r--r--main/iscsitarget/ietd.initd107
7 files changed, 0 insertions, 568 deletions
diff --git a/main/iscsitarget-grsec/APKBUILD b/main/iscsitarget-grsec/APKBUILD
deleted file mode 100644
index 882f81735b..0000000000
--- a/main/iscsitarget-grsec/APKBUILD
+++ /dev/null
@@ -1,59 +0,0 @@
-# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
-
-_flavor=${FLAVOR:-grsec}
-_realname=iscsitarget
-# source the kernel version
-if [ -f ../linux-$_flavor/APKBUILD ]; then
- . ../linux-$_flavor/APKBUILD
-fi
-_kver=$pkgver
-_kernelver=$pkgver-r$pkgrel
-_abi_release=$pkgver-${_flavor}
-_kpkgrel=$pkgrel
-
-_iscsiver=1.4.20.2
-
-pkgname=${_realname}-${_flavor}
-pkgver=$_kver
-_mypkgrel=0
-pkgrel=$(($_kpkgrel + $_mypkgrel))
-pkgdesc="$_flavor kernel modules for iscsitarget $_iscsiver"
-url="http://iscsitarget.sourceforge.net/"
-arch=""
-license="GPL-2"
-depends="linux-${_flavor}=${_kernelver}"
-install=
-makedepends="linux-${_flavor}-dev=${_kernelver}"
-subpackages=
-source="http://downloads.sourceforge.net/$_realname/$_realname-$_iscsiver.tar.gz
- iscsitarget-2.6.36.patch
- iscsitarget-2.6.37.patch
- iscsitarget-2.6.38.patch
- "
-_ksrc=/usr/src/linux-headers-${_abi_release}
-
-prepare() {
- cd "$srcdir"/$_realname-$_iscsiver
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
-
-build() {
- cd "$srcdir"/$_realname-$_iscsiver
- unset ARCH
- export GCC_SPECS=/usr/share/gcc/hardenednopie.specs
- make -j1 KSRC="$_ksrc" kernel || return 1
-}
-
-package() {
- cd "$srcdir"/$_realname-$_iscsiver
- make KSRC="$_ksrc" DESTDIR="$pkgdir" install-kernel || return 1
-}
-
-md5sums="2f23c0bfe124d79f5c20e34ef2aaff82 iscsitarget-1.4.20.2.tar.gz
-19f311cf41aff5f13b371ff38aa543df iscsitarget-2.6.36.patch
-f29a9701fd2ba3e6e3c0c411ff0e6327 iscsitarget-2.6.37.patch
-26c42eeb23f5afd5f62dcd5aa3a639bd iscsitarget-2.6.38.patch"
diff --git a/main/iscsitarget-grsec/iscsitarget-2.6.36.patch b/main/iscsitarget-grsec/iscsitarget-2.6.36.patch
deleted file mode 100644
index 43feb89975..0000000000
--- a/main/iscsitarget-grsec/iscsitarget-2.6.36.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- iscsitarget-1.4.20.2/kernel/conn.c
-+++ iscsitarget-1.4.20.2.mod/kernel/conn.c
-@@ -44,7 +44,7 @@
- switch (sk->sk_family) {
- case AF_INET:
- snprintf(buf, sizeof(buf),
-- "%u.%u.%u.%u", NIPQUAD(inet_sk(sk)->inet_daddr));
-+ "%pI4",inet_sk(sk)->inet_daddr);
- break;
- case AF_INET6:
- snprintf(buf, sizeof(buf), "[%pI6]",
diff --git a/main/iscsitarget-grsec/iscsitarget-2.6.37.patch b/main/iscsitarget-grsec/iscsitarget-2.6.37.patch
deleted file mode 100644
index 42c2e7ec43..0000000000
--- a/main/iscsitarget-grsec/iscsitarget-2.6.37.patch
+++ /dev/null
@@ -1,283 +0,0 @@
-diff --git a/kernel/config.c b/kernel/config.c
-index 87fa44b..672a1e3 100644
---- a/kernel/config.c
-+++ b/kernel/config.c
-@@ -9,7 +9,7 @@
- #include "iscsi.h"
- #include "iscsi_dbg.h"
-
--static DECLARE_MUTEX(ioctl_sem);
-+static DEFINE_MUTEX(ioctl_mutex);
-
- struct proc_entries {
- const char *name;
-@@ -258,7 +258,7 @@ static long ioctl(struct file *file, unsigned int cmd, unsigned long arg)
- long err;
- u32 id;
-
-- err = down_interruptible(&ioctl_sem);
-+ err = mutex_lock_interruptible(&ioctl_mutex);
- if (err < 0)
- return err;
-
-@@ -339,7 +339,7 @@ static long ioctl(struct file *file, unsigned int cmd, unsigned long arg)
-
- target_unlock(target);
- done:
-- up(&ioctl_sem);
-+ mutex_unlock(&ioctl_mutex);
-
- return err;
- }
-@@ -347,9 +347,9 @@ done:
- static int release(struct inode *i __attribute__((unused)),
- struct file *f __attribute__((unused)))
- {
-- down(&ioctl_sem);
-+ mutex_lock(&ioctl_mutex);
- target_del_all();
-- up(&ioctl_sem);
-+ mutex_unlock(&ioctl_mutex);
-
- return 0;
- }
-diff --git a/kernel/iscsi.h b/kernel/iscsi.h
-index 9ded23a..f9076f2 100644
---- a/kernel/iscsi.h
-+++ b/kernel/iscsi.h
-@@ -8,7 +8,6 @@
- #ifndef __ISCSI_H__
- #define __ISCSI_H__
-
--#include <linux/blkdev.h>
- #include <linux/completion.h>
- #include <linux/pagemap.h>
- #include <linux/seq_file.h>
-@@ -94,8 +93,6 @@ struct worker_thread_info {
- struct list_head work_queue;
-
- wait_queue_head_t wthread_sleep;
--
-- struct io_context *wthread_ioc;
- };
-
- struct iscsi_cmnd;
-@@ -130,7 +127,7 @@ struct iscsi_target {
- /* Points either to own list or global pool */
- struct worker_thread_info * wthread_info;
-
-- struct semaphore target_sem;
-+ struct mutex target_mutex;
- };
-
- struct iscsi_queue {
-diff --git a/kernel/target.c b/kernel/target.c
-index 43326dc..2df633b 100644
---- a/kernel/target.c
-+++ b/kernel/target.c
-@@ -4,6 +4,8 @@
- * Released under the terms of the GNU GPL v2.0.
- */
-
-+#include <linux/mutex.h>
-+
- #include "iscsi.h"
- #include "digest.h"
- #include "iscsi_dbg.h"
-@@ -11,7 +13,7 @@
- #define MAX_NR_TARGETS (1UL << 30)
-
- static LIST_HEAD(target_list);
--static DECLARE_MUTEX(target_list_sem);
-+static DEFINE_MUTEX(target_list_mutex);
- static u32 next_target_id;
- static u32 nr_targets;
-
-@@ -48,16 +50,16 @@ inline int target_lock(struct iscsi_target *target, int interruptible)
- int err = 0;
-
- if (interruptible)
-- err = down_interruptible(&target->target_sem);
-+ err = mutex_lock_interruptible(&target->target_mutex);
- else
-- down(&target->target_sem);
-+ mutex_lock(&target->target_mutex);
-
- return err;
- }
-
- inline void target_unlock(struct iscsi_target *target)
- {
-- up(&target->target_sem);
-+ mutex_unlock(&target->target_mutex);
- }
-
- static struct iscsi_target *__target_lookup_by_id(u32 id)
-@@ -86,9 +88,9 @@ struct iscsi_target *target_lookup_by_id(u32 id)
- {
- struct iscsi_target *target;
-
-- down(&target_list_sem);
-+ mutex_lock(&target_list_mutex);
- target = __target_lookup_by_id(id);
-- up(&target_list_sem);
-+ mutex_unlock(&target_list_mutex);
-
- return target;
- }
-@@ -157,7 +159,7 @@ static int iscsi_target_create(struct target_info *info, u32 tid)
-
- strncpy(target->name, name, sizeof(target->name) - 1);
-
-- init_MUTEX(&target->target_sem);
-+ mutex_init(&target->target_mutex);
- spin_lock_init(&target->session_list_lock);
-
- INIT_LIST_HEAD(&target->session_list);
-@@ -195,7 +197,7 @@ int target_add(struct target_info *info)
- u32 tid = info->tid;
- int err;
-
-- err = down_interruptible(&target_list_sem);
-+ err = mutex_lock_interruptible(&target_list_mutex);
- if (err < 0)
- return err;
-
-@@ -204,7 +206,7 @@ int target_add(struct target_info *info)
- goto out;
- }
-
-- if (__target_lookup_by_name(info->name) ||
-+ if (__target_lookup_by_name(info->name) ||
- (tid && __target_lookup_by_id(tid))) {
- err = -EEXIST;
- goto out;
-@@ -223,7 +225,7 @@ int target_add(struct target_info *info)
- if (!err)
- nr_targets++;
- out:
-- up(&target_list_sem);
-+ mutex_unlock(&target_list_mutex);
-
- return err;
- }
-@@ -248,7 +250,7 @@ static void target_destroy(struct iscsi_target *target)
- module_put(THIS_MODULE);
- }
-
--/* @locking: target_list_sem must be locked */
-+/* @locking: target_list_mutex must be locked */
- static int __target_del(struct iscsi_target *target)
- {
- int err;
-@@ -283,7 +285,7 @@ int target_del(u32 id)
- struct iscsi_target *target;
- int err;
-
-- err = down_interruptible(&target_list_sem);
-+ err = mutex_lock_interruptible(&target_list_mutex);
- if (err < 0)
- return err;
-
-@@ -295,7 +297,7 @@ int target_del(u32 id)
-
- err = __target_del(target);
- out:
-- up(&target_list_sem);
-+ mutex_unlock(&target_list_mutex);
-
- return err;
- }
-@@ -305,7 +307,7 @@ void target_del_all(void)
- struct iscsi_target *target, *tmp;
- int err;
-
-- down(&target_list_sem);
-+ mutex_lock(&target_list_mutex);
-
- if (!list_empty(&target_list))
- iprintk("Removing all connections, sessions and targets\n");
-@@ -319,7 +321,7 @@ void target_del_all(void)
-
- next_target_id = 0;
-
-- up(&target_list_sem);
-+ mutex_unlock(&target_list_mutex);
- }
-
- static void *iet_seq_start(struct seq_file *m, loff_t *pos)
-@@ -327,7 +329,7 @@ static void *iet_seq_start(struct seq_file *m, loff_t *pos)
- int err;
-
- /* are you sure this is to be interruptible? */
-- err = down_interruptible(&target_list_sem);
-+ err = mutex_lock_interruptible(&target_list_mutex);
- if (err < 0)
- return ERR_PTR(err);
-
-@@ -341,7 +343,7 @@ static void *iet_seq_next(struct seq_file *m, void *v, loff_t *pos)
-
- static void iet_seq_stop(struct seq_file *m, void *v)
- {
-- up(&target_list_sem);
-+ mutex_unlock(&target_list_mutex);
- }
-
- static int iet_seq_show(struct seq_file *m, void *p)
-diff --git a/kernel/volume.c b/kernel/volume.c
-index 2c9a698..ecffa21 100644
---- a/kernel/volume.c
-+++ b/kernel/volume.c
-@@ -6,6 +6,7 @@
-
- #include <linux/types.h>
- #include <linux/parser.h>
-+#include <linux/blkdev.h>
-
- #include "iscsi.h"
- #include "iscsi_dbg.h"
-diff --git a/kernel/wthread.c b/kernel/wthread.c
-index 997a3d6..884c03a 100644
---- a/kernel/wthread.c
-+++ b/kernel/wthread.c
-@@ -67,15 +67,6 @@ static int worker_thread(void *arg)
- struct iscsi_conn *conn;
- DECLARE_WAITQUEUE(wait, current);
-
-- get_io_context(GFP_KERNEL, -1);
--
-- if (!current->io_context)
-- eprintk("%s\n", "Failed to get IO context");
-- else if (info->wthread_ioc)
-- copy_io_context(&current->io_context, &info->wthread_ioc);
-- else
-- info->wthread_ioc = current->io_context;
--
- add_wait_queue(&info->wthread_sleep, &wait);
-
- __set_current_state(TASK_RUNNING);
-@@ -100,16 +91,6 @@ static int worker_thread(void *arg)
-
- remove_wait_queue(&info->wthread_sleep, &wait);
-
-- if (current->io_context) {
-- struct io_context *ioc = current->io_context;
--
-- task_lock(current);
-- current->io_context = NULL;
-- task_unlock(current);
--
-- put_io_context(ioc);
-- }
--
- return 0;
- }
-
-@@ -160,7 +141,6 @@ int wthread_init(struct worker_thread_info *info)
- spin_lock_init(&info->wthread_lock);
-
- info->nr_running_wthreads = 0;
-- info->wthread_ioc = NULL;
-
- INIT_LIST_HEAD(&info->work_queue);
- INIT_LIST_HEAD(&info->wthread_list);
diff --git a/main/iscsitarget-grsec/iscsitarget-2.6.38.patch b/main/iscsitarget-grsec/iscsitarget-2.6.38.patch
deleted file mode 100644
index 90a5e56449..0000000000
--- a/main/iscsitarget-grsec/iscsitarget-2.6.38.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- ./kernel/block-io.c.orig
-+++ ./kernel/block-io.c
-@@ -155,14 +155,14 @@
- {
- struct blockio_data *bio_data = volume->private;
- struct block_device *bdev;
-- int flags = FMODE_READ | (LUReadonly(volume) ? 0 : FMODE_WRITE);
-+ int flags = FMODE_EXCL | FMODE_READ | (LUReadonly(volume) ? 0 : FMODE_WRITE);
- int err = 0;
-
- bio_data->path = kstrdup(path, GFP_KERNEL);
- if (!bio_data->path)
- return -ENOMEM;
-
-- bdev = open_bdev_exclusive(path, flags, THIS_MODULE);
-+ bdev = blkdev_get_by_path(path, flags, THIS_MODULE);
- if (IS_ERR(bdev)) {
- err = PTR_ERR(bdev);
- eprintk("Can't open device %s, error %d\n", path, err);
-@@ -250,10 +250,10 @@
- blockio_detach(struct iet_volume *volume)
- {
- struct blockio_data *bio_data = volume->private;
-- int flags = FMODE_READ | (LUReadonly(volume) ? 0 : FMODE_WRITE);
-+ int flags = FMODE_EXCL | FMODE_READ | (LUReadonly(volume) ? 0 : FMODE_WRITE);
-
- if (bio_data->bdev)
-- close_bdev_exclusive(bio_data->bdev, flags);
-+ blkdev_put(bio_data->bdev, flags);
- kfree(bio_data->path);
-
- kfree(volume->private);
diff --git a/main/iscsitarget/APKBUILD b/main/iscsitarget/APKBUILD
deleted file mode 100644
index 99528f3f56..0000000000
--- a/main/iscsitarget/APKBUILD
+++ /dev/null
@@ -1,46 +0,0 @@
-# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
-
-pkgname=iscsitarget
-pkgver=1.4.20.2
-pkgrel=3
-pkgdesc="Open Source iSCSI target with professional features - userspace utils"
-url="http://iscsitarget.sourceforge.net/"
-arch="all"
-license="GPL-2"
-depends=
-makedepends="openssl-dev"
-subpackages="$pkgname-doc"
-source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
- ietd.initd
- ietd.confd
- "
-
-_builddir="$srcdir"/$pkgname-$pkgver
-prepare() {
- cd "$_builddir"
- for i in ../*.patch; do
- [ -r "$i" ] || continue
- msg "Applying $i"
- patch -p1 < $i || return 1
- done
-}
-
-build() {
- cd "$_builddir"
- make usr || return 1
-}
-
-package() {
- cd "$_builddir"
- make DESTDIR="$pkgdir" install-usr install-doc
-
- for i in etc/ietd.conf etc/initiators.*; do
- install -Dm640 $i "$pkgdir"/$i || return 1
- done
- install -Dm755 ../ietd.initd "$pkgdir"/etc/init.d/ietd
- install -Dm755 ../ietd.confd "$pkgdir"/etc/conf.d/ietd
-}
-
-md5sums="2f23c0bfe124d79f5c20e34ef2aaff82 iscsitarget-1.4.20.2.tar.gz
-840621ee01a5736474ef343b4eb0fa9d ietd.initd
-06ba479d3533d557b8582abe6f182410 ietd.confd"
diff --git a/main/iscsitarget/ietd.confd b/main/iscsitarget/ietd.confd
deleted file mode 100644
index 3621326b1a..0000000000
--- a/main/iscsitarget/ietd.confd
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 1999-2006 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/files/ietd-conf.d,v 1.1 2006/02/20 08:33:40 robbat2 Exp $
-
-# Address and port to listen on for connections.
-#ADDRESS="" # set this to non-empty to listen somewhere specific
-PORT=3260
-
-# Address of your SNS server
-# if available
-#ISNS=""
-
-# User and group to run as
-# You must ensure that the UID/GID have access to the files/devices you
-# have provided in your configuration.
-USER="root"
-GROUP="root"
-
-# Debug level - see ietd(8) for the levels
-#DEBUGLEVEL=
-
-# This setting disables the memory configuration warnings.
-# Upstream takes the general policy of forcing all of the memory settings that
-# they want, but that doesn't mesh with users that have it set higher.
-# Gentoo by default ignores the settings that are higher, but issues warnings
-# on those that are lower.
-# Uncomment the next line to disable those warnings.
-#DISABLE_MEMORY_WARNINGS=1
-
-# vim: filetype=gentoo-conf-d tw=72:
diff --git a/main/iscsitarget/ietd.initd b/main/iscsitarget/ietd.initd
deleted file mode 100644
index ac315609e6..0000000000
--- a/main/iscsitarget/ietd.initd
+++ /dev/null
@@ -1,107 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2008 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/files/ietd-init.d-2,v 1.1 2008/07/18 16:03:38 flameeyes Exp $
-
-MEM_SIZE=1048576
-DAEMON=/usr/sbin/ietd
-CONFIG_FILE=/etc/ietd.conf
-PID_FILE=/var/run/iscsi_trgt.pid
-NAME="iSCSI Enterprise Target"
-
-ARGS=""
-[ -n "$USER" ] && ARGS="${ARGS} --uid=${USER}"
-[ -n "$GROUP" ] && ARGS="${ARGS} --gid=${GROUP}"
-[ -n "$ISNS" ] && ARGS="${ARGS} --isns=${ISNS}"
-[ -n "$PORT" ] && ARGS="${ARGS} --port=${PORT}"
-[ -n "$ADDRESS" ] && ARGS="${ARGS} --address=${ADDRESS}"
-[ -n "$DEBUGLEVEL" ] && ARGS="${ARGS} --debug=${DEBUGLEVEL}"
-
-depend() {
- use net
- after firewall modules
-}
-
-checkconfig() {
- if [ ! -f $CONFIG_FILE ]; then
- eerror "Config file $CONFIG_FILE does not exist!"
- return 1
- fi
- if [ -z "$DISABLE_MEMORY_WARNINGS" ]; then
- check_memsize
- fi
-}
-
-check_memsize() {
- local wr md sysctl_key v k
- for wr in r w; do
- for md in max default; do
- sysctl_key="net.core.${wr}mem_${md}"
- v="$(sysctl -n ${sysctl_key})"
- if [ "${v}" -lt "${MEM_SIZE}" ]; then
- ewarn "$sysctl_key ($v) is lower than recommended ${MEM_SIZE}"
- fi
- done
- done
- for wr in "" r w; do
- sysctl_key="net.ipv4.tcp_${wr}mem"
- set -- $(sysctl -n ${sysctl_key})
- for k in min default max ; do
- if [ "${1}" -lt "${MEM_SIZE}" ]; then
- ewarn "$sysctl_key:$k (${1}) is lower than recommended ${MEM_SIZE}"
- fi
- shift
- done
- done
-}
-
-do_modules() {
- msg="$1"
- shift
- modules="$1"
- shift
- opts="$@"
- for m in ${modules}; do
- ebegin "${msg} - ${m}"
- modprobe ${opts} $m
- ret=$?
- eend $ret
- [ $ret -ne 0 ] && return $ret
- done
- return 0
-}
-
-start() {
- checkconfig || return 1
- do_modules 'Loading iSCSI-Target modules' 'iscsi_trgt'
- ebegin "Starting ${NAME}"
- start-stop-daemon --start --exec $DAEMON --quiet -- ${ARGS}
- eend $?
-}
-
-stop() {
- ebegin "Removing ${NAME} devices"
- # ugly, but ietadm does not allways provides correct exit values
- RETURN="$(ietadm --op delete 2>&1)"
- RETVAL=$?
- if [ $RETVAL -eq 0 ] && [ "$RETURN" != "something wrong" ] ; then
- eend 0
- else
- eend 1
- eerror "ietadm failed - $RETURN"
- return 1
- fi
-
- ebegin "Stopping ${NAME}"
- start-stop-daemon --stop --quiet --exec $DAEMON --pidfile $PID_FILE
- ret=$?
- eend $ret
- [ $ret -ne 0 ] && return 1
-
- # ugly, but pid file is not removed by ietd
- rm -f $PID_FILE
- # do_modules 'Removing iSCSI-Target modules' 'iscsi_trgt' '-r'
- return $?
-}
-
-# vim: tw=72: