linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Netes <alexne-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: Jim Foraker <foraker1-i2BcT+NCU+M@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	weiny2-i2BcT+NCU+M@public.gmane.org
Subject: Re: [PATCH 8/8] opensm: Ensure sweep interval/mkey lease are sensibly set
Date: Tue, 24 Jul 2012 12:01:30 +0300	[thread overview]
Message-ID: <20120724090130.GA2413@calypso> (raw)
In-Reply-To: <1340672104-18039-8-git-send-email-foraker1-i2BcT+NCU+M@public.gmane.org>

Hi Jim,

On 17:55 Mon 25 Jun     , Jim Foraker wrote:
> If mkeys are protected, sweep should always be enabled and
> set to an interval < the lease timeout, to ensure a missed trap
> doesn't lead to mkey exposure.

This is a minimal requirement, but it might not be enough to avoid mkey
exposure completely. In noisy fabrics, sweep duration may take more
time than sweep interval (and lease timeout), so theoretically we can still
get mkey exposure. However, I don't know how can we completely avoid this.

> 
> Signed-off-by: Jim Foraker <foraker1-i2BcT+NCU+M@public.gmane.org>
> ---
>  opensm/osm_subnet.c |   20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/opensm/osm_subnet.c b/opensm/osm_subnet.c
> index ddee955..3f336d8 100644
> --- a/opensm/osm_subnet.c
> +++ b/opensm/osm_subnet.c
> @@ -1502,6 +1502,26 @@ int osm_subn_verify_config(IN osm_subn_opt_t * p_opts)
>  			   "instead\n", p_opts->m_key_protect_bits, 2);
>  		p_opts->m_key_protect_bits = 2;
>  	}
> +	if (p_opts->m_key_protect_bits && p_opts->m_key_lease_period) {
> +		if (!p_opts->sweep_interval) {
> +			log_report(" Sweep disabled with protected mkey "
> +				   "leases in effect; re-enabling sweeping "
> +				   "with interval %u\n",
> +				   cl_ntoh16(p_opts->m_key_lease_period) - 1);
> +			p_opts->sweep_interval =
> +				cl_ntoh16(p_opts->m_key_lease_period) - 1;
> +		}
> +		if (p_opts->sweep_interval >=
> +			cl_ntoh16(p_opts->m_key_lease_period)) {
> +			log_report(" Sweep interval %u >= mkey lease period "
> +				   "%u. Setting lease period to %u\n",
> +				   p_opts->sweep_interval,
> +				   cl_ntoh16(p_opts->m_key_lease_period),
> +				   p_opts->sweep_interval + 1);
> +			p_opts->m_key_lease_period =
> +				cl_hton16(p_opts->sweep_interval + 1);
> +		}
> +	}
>  
>  	if (p_opts->root_guid_file != NULL) {
>  		FILE *root_file = fopen(p_opts->root_guid_file, "r");
> -- 
> 1.7.9.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2012-07-24  9:01 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-26  0:54 [PATCH 0/8] opensm: Improved mkey support Jim Foraker
     [not found] ` <1340672058.5218.97.camel-mxTxeWJot8FliZ7u+bvwcg@public.gmane.org>
2012-06-26  0:54   ` [PATCH 1/8] opensm: Add guid2mkey cache file support Jim Foraker
     [not found]     ` <1340672104-18039-1-git-send-email-foraker1-i2BcT+NCU+M@public.gmane.org>
2012-06-26  0:54       ` [PATCH 2/8] opensm: Allow recovery of subnets with misset mkeys Jim Foraker
2012-06-26  0:54       ` [PATCH 3/8] Add locking where necessary around osm_req_* Jim Foraker
2012-06-26  0:55       ` [PATCH 4/8] Add support for setting mkey protection levels Jim Foraker
2012-06-26  0:55       ` [PATCH 5/8] opensm: Signal subnet init errors on SubnGet timeouts Jim Foraker
     [not found]         ` <1340672104-18039-5-git-send-email-foraker1-i2BcT+NCU+M@public.gmane.org>
2012-07-23 15:43           ` Alex Netes
2012-07-23 22:19             ` Jim Foraker
     [not found]               ` <1343081989.29792.12.camel-mxTxeWJot8FliZ7u+bvwcg@public.gmane.org>
2012-07-29 16:29                 ` Alex Netes
2012-07-30 17:19                   ` Foraker, Jim
2012-06-26  0:55       ` [PATCH 6/8] opensm: Add neighboring link cache file Jim Foraker
2012-06-26  0:55       ` [PATCH 7/8] opensm: Check for valid mkey protection level in config file Jim Foraker
2012-06-26  0:55       ` [PATCH 8/8] opensm: Ensure sweep interval/mkey lease are sensibly set Jim Foraker
     [not found]         ` <1340672104-18039-8-git-send-email-foraker1-i2BcT+NCU+M@public.gmane.org>
2012-07-24  9:01           ` Alex Netes [this message]
2012-07-24 17:40             ` Jim Foraker
2012-07-04  0:25   ` [PATCH 0/8] opensm: Improved mkey support Jim Foraker
     [not found]     ` <1341361508.5218.148.camel-mxTxeWJot8FliZ7u+bvwcg@public.gmane.org>
2012-07-04  0:25       ` [PATCH V1.1 1/8] opensm: Add guid2mkey cache file support Jim Foraker
     [not found]         ` <1341361548-30229-1-git-send-email-foraker1-i2BcT+NCU+M@public.gmane.org>
2012-07-04  0:25           ` [PATCH V1.1 3/8] Add locking where necessary around osm_req_* Jim Foraker
2012-07-23 15:55           ` [PATCH V1.1 1/8] opensm: Add guid2mkey cache file support Alex Netes
2012-07-23 22:37             ` Jim Foraker
2012-07-23 15:59       ` [PATCH 0/8] opensm: Improved mkey support Alex Netes
2012-07-23 22:28         ` Jim Foraker
2012-08-01 14:48   ` Jim Foraker
     [not found]     ` <1343832537.26423.8.camel-mxTxeWJot8FliZ7u+bvwcg@public.gmane.org>
2012-08-01 14:52       ` [PATCH 1/9 v2] opensm: Add guid2mkey cache file support Jim Foraker
     [not found]         ` <1343832755-26753-1-git-send-email-foraker1-i2BcT+NCU+M@public.gmane.org>
2012-08-01 14:52           ` [PATCH 2/9 v2] opensm: Allow recovery of subnets with misset mkeys Jim Foraker
2012-08-01 14:52           ` [PATCH 3/9 v2] opensm: Add locking where necessary around osm_req_* Jim Foraker
2012-08-01 14:52           ` [PATCH 4/9 v2] opensm: Add support for setting mkey protection levels Jim Foraker
2012-08-01 14:52           ` [PATCH 5/9 v2] opensm: Log errors on SubnGet timeouts Jim Foraker
2012-08-01 14:52           ` [PATCH 6/9 v2] opensm: Add neighboring link cache file Jim Foraker
2012-08-01 14:52           ` [PATCH 7/9 v2] opensm: Check for valid mkey protection level in config file Jim Foraker
2012-08-01 14:52           ` [PATCH 8/9 v2] opensm: Ensure sweep interval/mkey lease are sensibly set Jim Foraker
2012-08-01 14:52           ` [PATCH 9/9 v2] opensm/scripts/sldd.sh: Update to support guid2mkey/neighbors Jim Foraker
2012-08-01 20:19       ` [PATCH 0/8] opensm: Improved mkey support Alex Netes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120724090130.GA2413@calypso \
    --to=alexne-vpraknaxozvwk0htik3j/w@public.gmane.org \
    --cc=foraker1-i2BcT+NCU+M@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=weiny2-i2BcT+NCU+M@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).