diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 16:14:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 16:14:57 -0400 |
commit | 6da6dc2380c3cfe8d6b59d7c3c55fdd7a521fe6c (patch) | |
tree | 152566bea1fc5593ef58deec450e0a499776d8c4 /drivers/target/iscsi/iscsi_target_auth.c | |
parent | 8c55f1463c1fd318d5e785f02b80bcc32176d342 (diff) | |
parent | b8d26b3be8b33682cf163274ed07479a70554633 (diff) |
Merge branch 'for-next-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull SCSI target update from Nicholas Bellinger:
"The highlights this round include:
- Add fileio support for WRITE_SAME w/ UNMAP=1 discard (asias)
- Add fileio support for UNMAP discard (asias)
- Add tcm_vhost hotplug support to work with upstream QEMU
vhost-scsi-pci code (asias + mst)
- Check for aborted sequence in tcm_fc response path (mdr)
- Add initial iscsit_transport support into iscsi-target code (nab)
- Refactor iscsi-target RX PDU logic + export request PDU handling
(nab)
- Refactor iscsi-target TX queue logic + export response PDU creation
(nab)
- Add new iSCSI Extentions for RDMA (ISER) target driver (Or + nab)
The biggest changes revolve around iscsi-target refactoring in order
to support the iser-target driver. This includes the conversion of
the iscsi-target data-path to use modern se_cmd->cmd_kref counting,
and allowing transport independent aspects of RX/TX PDU
request/response handling be shared across existing traditional
iscsi-target code, and the new iser-target code.
Thanks to Or Gerlitz + Mellanox for supporting the iser-target
development effort!"
* 'for-next-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (25 commits)
iser-target: Add iSCSI Extensions for RDMA (iSER) target driver
tcm_vhost: Enable VIRTIO_SCSI_F_HOTPLUG
tcm_vhost: Add ioctl to get and set events missed flag
tcm_vhost: Add hotplug/hotunplug support
tcm_vhost: Refactor the lock nesting rule
tcm_fc: Check for aborted sequence
iscsi-target: Add iser network portal attribute
iscsi-target: Refactor TX queue logic + export response PDU creation
iscsi-target: Refactor RX PDU logic + export request PDU handling
iscsi-target: Add per transport iscsi_cmd alloc/free
iscsi-target: Add iser-target parameter keys + setup during login
iscsi-target: Initial traditional TCP conversion to iscsit_transport
iscsi-target: Add iscsit_transport API template
target: Add export of target_get_sess_cmd symbol
target: Change default sense key of NOT_READY
target/file: Set is_nonrot attribute
target: Add sbc_execute_unmap() helper
target/iblock: Add iblock_do_unmap() helper
target/file: Add fd_do_unmap() helper
target/file: Add UNMAP emulation support
...
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_auth.c')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_auth.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/drivers/target/iscsi/iscsi_target_auth.c b/drivers/target/iscsi/iscsi_target_auth.c index a0fc7b9eea65..cee17543278c 100644 --- a/drivers/target/iscsi/iscsi_target_auth.c +++ b/drivers/target/iscsi/iscsi_target_auth.c | |||
@@ -49,32 +49,6 @@ static void chap_binaryhex_to_asciihex(char *dst, char *src, int src_len) | |||
49 | } | 49 | } |
50 | } | 50 | } |
51 | 51 | ||
52 | static void chap_set_random(char *data, int length) | ||
53 | { | ||
54 | long r; | ||
55 | unsigned n; | ||
56 | |||
57 | while (length > 0) { | ||
58 | get_random_bytes(&r, sizeof(long)); | ||
59 | r = r ^ (r >> 8); | ||
60 | r = r ^ (r >> 4); | ||
61 | n = r & 0x7; | ||
62 | |||
63 | get_random_bytes(&r, sizeof(long)); | ||
64 | r = r ^ (r >> 8); | ||
65 | r = r ^ (r >> 5); | ||
66 | n = (n << 3) | (r & 0x7); | ||
67 | |||
68 | get_random_bytes(&r, sizeof(long)); | ||
69 | r = r ^ (r >> 8); | ||
70 | r = r ^ (r >> 5); | ||
71 | n = (n << 2) | (r & 0x3); | ||
72 | |||
73 | *data++ = n; | ||
74 | length--; | ||
75 | } | ||
76 | } | ||
77 | |||
78 | static void chap_gen_challenge( | 52 | static void chap_gen_challenge( |
79 | struct iscsi_conn *conn, | 53 | struct iscsi_conn *conn, |
80 | int caller, | 54 | int caller, |
@@ -86,7 +60,7 @@ static void chap_gen_challenge( | |||
86 | 60 | ||
87 | memset(challenge_asciihex, 0, CHAP_CHALLENGE_LENGTH * 2 + 1); | 61 | memset(challenge_asciihex, 0, CHAP_CHALLENGE_LENGTH * 2 + 1); |
88 | 62 | ||
89 | chap_set_random(chap->challenge, CHAP_CHALLENGE_LENGTH); | 63 | get_random_bytes(chap->challenge, CHAP_CHALLENGE_LENGTH); |
90 | chap_binaryhex_to_asciihex(challenge_asciihex, chap->challenge, | 64 | chap_binaryhex_to_asciihex(challenge_asciihex, chap->challenge, |
91 | CHAP_CHALLENGE_LENGTH); | 65 | CHAP_CHALLENGE_LENGTH); |
92 | /* | 66 | /* |