On Fri, 2012-03-09 at 05:00 -0800, Hal Rosenstock wrote: > On 3/6/2012 5:18 PM, Jim Foraker wrote: > > > > Support for "m_key=" parameter, > > Shouldn't mkey be on a per port basis rather than a single mkey for all > ports ? In the long run, I agree. However, adding this support brings the diags up to speed with the "one mkey per subnet" model that OpenSM currently (sort of) supports. We should do better down the road, but I don't think this patch gets in the way of that.
> > plus config file now installs user-read-only. > > This part is best as a separate patch. I agree. I was worried that applying the config change without the permissions change may open a potential vulnerability, but the answer there is just to have the permissions change earlier in the tree than the new parameter. Jim > > -- Hal > > > Signed-off-by: Jim Foraker <forak...@llnl.gov> > > --- > > Makefile.am | 2 +- > > etc/ibdiag.conf | 2 ++ > > src/ibdiag_common.c | 2 ++ > > 3 files changed, 5 insertions(+), 1 deletions(-) > > > > diff --git a/Makefile.am b/Makefile.am > > index 950f95b..ef59bd2 100644 > > --- a/Makefile.am > > +++ b/Makefile.am > > @@ -112,4 +112,4 @@ install-data-hook: > > fi > > $(top_srcdir)/config/install-sh -c -m 444 > > $(top_srcdir)/scripts/IBswcountlimits.pm > > $(DESTDIR)/$(PERL_INSTALLDIR)/IBswcountlimits.pm > > $(top_srcdir)/config/install-sh -c -m 444 > > $(top_srcdir)/etc/error_thresholds $(DESTDIR)/$(sysconfdir)/infiniband-diags > > - $(top_srcdir)/config/install-sh -c -m 444 $(top_srcdir)/etc/ibdiag.conf > > $(DESTDIR)/$(sysconfdir)/infiniband-diags > > + $(top_srcdir)/config/install-sh -c -m 400 $(top_srcdir)/etc/ibdiag.conf > > $(DESTDIR)/$(sysconfdir)/infiniband-diags > > diff --git a/etc/ibdiag.conf b/etc/ibdiag.conf > > index 77f3ce9..2a2334f 100644 > > --- a/etc/ibdiag.conf > > +++ b/etc/ibdiag.conf > > @@ -15,3 +15,5 @@ > > # Default = true > > #MLX_EPI=false > > > > +# define a default m_key > > +#m_key=0x00 > > diff --git a/src/ibdiag_common.c b/src/ibdiag_common.c > > index 0901231..2089847 100644 > > --- a/src/ibdiag_common.c > > +++ b/src/ibdiag_common.c > > @@ -155,6 +155,8 @@ void read_ibdiag_config(const char *file) > > } else { > > ibd_ibnetdisc_flags &= ~IBND_CONFIG_MLX_EPI; > > } > > + } else if (strncmp(name, "m_key", strlen("m_key")) == 0) { > > + ibd_mkey = strtoull(val_str, 0, 0); > > } > > } > > > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html