Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

libceph: deprecate [no]cephx_require_signatures options

These options were introduced in 3.19 with support for message signing
and are rather useless, as explained in commit a51983e4dd2d ("libceph:
add nocephx_sign_messages option"). Deprecate them.

In case there is someone out there with a cluster that lacks support
for MSG_AUTH feature (very unlikely but has to be considered since we
haven't formally raised the bar from argonaut to bobtail yet), make
nocephx_sign_messages also waive MSG_AUTH requirement. This is probably
how it should have been done in the first place -- if we aren't going
to sign, requiring the signing feature makes no sense.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>

+8 -10
+3 -4
include/linux/ceph/libceph.h
··· 32 32 #define CEPH_OPT_NOSHARE (1<<1) /* don't share client with other sbs */ 33 33 #define CEPH_OPT_MYIP (1<<2) /* specified my ip */ 34 34 #define CEPH_OPT_NOCRC (1<<3) /* no data crc on writes (msgr1) */ 35 - #define CEPH_OPT_NOMSGAUTH (1<<4) /* don't require msg signing feat */ 36 - #define CEPH_OPT_TCP_NODELAY (1<<5) /* TCP_NODELAY on TCP sockets */ 37 - #define CEPH_OPT_NOMSGSIGN (1<<6) /* don't sign msgs (msgr1) */ 38 - #define CEPH_OPT_ABORT_ON_FULL (1<<7) /* abort w/ ENOSPC when full */ 35 + #define CEPH_OPT_TCP_NODELAY (1<<4) /* TCP_NODELAY on TCP sockets */ 36 + #define CEPH_OPT_NOMSGSIGN (1<<5) /* don't sign msgs (msgr1) */ 37 + #define CEPH_OPT_ABORT_ON_FULL (1<<6) /* abort w/ ENOSPC when full */ 39 38 40 39 #define CEPH_OPT_DEFAULT (CEPH_OPT_TCP_NODELAY) 41 40
+5 -6
net/ceph/ceph_common.c
··· 307 307 308 308 static const struct fs_parameter_spec ceph_parameters[] = { 309 309 fsparam_flag ("abort_on_full", Opt_abort_on_full), 310 - fsparam_flag_no ("cephx_require_signatures", Opt_cephx_require_signatures), 310 + __fsparam (NULL, "cephx_require_signatures", Opt_cephx_require_signatures, 311 + fs_param_neg_with_no|fs_param_deprecated, NULL), 311 312 fsparam_flag_no ("cephx_sign_messages", Opt_cephx_sign_messages), 312 313 fsparam_flag_no ("crc", Opt_crc), 313 314 fsparam_string ("crush_location", Opt_crush_location), ··· 597 596 break; 598 597 case Opt_cephx_require_signatures: 599 598 if (!result.negated) 600 - opt->flags &= ~CEPH_OPT_NOMSGAUTH; 599 + warn_plog(&log, "Ignoring cephx_require_signatures"); 601 600 else 602 - opt->flags |= CEPH_OPT_NOMSGAUTH; 601 + warn_plog(&log, "Ignoring nocephx_require_signatures, use nocephx_sign_messages"); 603 602 break; 604 603 case Opt_cephx_sign_messages: 605 604 if (!result.negated) ··· 687 686 seq_puts(m, "noshare,"); 688 687 if (opt->flags & CEPH_OPT_NOCRC) 689 688 seq_puts(m, "nocrc,"); 690 - if (opt->flags & CEPH_OPT_NOMSGAUTH) 691 - seq_puts(m, "nocephx_require_signatures,"); 692 689 if (opt->flags & CEPH_OPT_NOMSGSIGN) 693 690 seq_puts(m, "nocephx_sign_messages,"); 694 691 if ((opt->flags & CEPH_OPT_TCP_NODELAY) == 0) ··· 755 756 client->supported_features = CEPH_FEATURES_SUPPORTED_DEFAULT; 756 757 client->required_features = CEPH_FEATURES_REQUIRED_DEFAULT; 757 758 758 - if (!ceph_test_opt(client, NOMSGAUTH)) 759 + if (!ceph_test_opt(client, NOMSGSIGN)) 759 760 client->required_features |= CEPH_FEATURE_MSG_AUTH; 760 761 761 762 /* msgr */