lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1341940989.2605.17.camel@bwh-desktop.uk.solarflarecom.com>
Date:	Tue, 10 Jul 2012 18:23:09 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Haiyang Zhang <haiyangz@...rosoft.com>
CC:	"davem@...emloft.net" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	KY Srinivasan <kys@...rosoft.com>,
	"olaf@...fle.de" <olaf@...fle.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>
Subject: RE: [PATCH net,1/1] hyperv: Add support for setting MAC from within
 guests

On Tue, 2012-07-10 at 17:03 +0000, Haiyang Zhang wrote:
> 
> > -----Original Message-----
> > From: Ben Hutchings [mailto:bhutchings@...arflare.com]
> > Sent: Friday, July 06, 2012 8:19 PM
> > To: Haiyang Zhang
> > Cc: davem@...emloft.net; netdev@...r.kernel.org; KY Srinivasan;
> > olaf@...fle.de; linux-kernel@...r.kernel.org;
> > devel@...uxdriverproject.org
> > Subject: Re: [PATCH net,1/1] hyperv: Add support for setting MAC from
> > within guests
> > 
> > On Fri, 2012-07-06 at 14:25 -0700, Haiyang Zhang wrote:
> > > This adds support for setting synthetic NIC MAC address from within
> > Linux
> > > guests. Before using this feature, the option "spoofing of MAC
> > address"
> > > should be enabled at the Hyper-V manager / Settings of the synthetic
> > > NIC.
> > [...]
> > > +int rndis_filter_set_device_mac(struct hv_device *hdev, char *mac)
> > > +{
> > [...]
> > > +	t = wait_for_completion_timeout(&request->wait_event, 5*HZ);
> > > +	if (t == 0) {
> > > +		netdev_err(ndev, "timeout before we got a set
> > response...\n");
> > > +		/*
> > > +		 * can't put_rndis_request, since we may still receive a
> > > +		 * send-completion.
> > > +		 */
> > > +		return -EBUSY;
> > > +	} else {
> > > +		set_complete = &request->response_msg.msg.set_complete;
> > > +		if (set_complete->status != RNDIS_STATUS_SUCCESS)
> > > +			ret = -EINVAL;
> > [...]
> > 
> > Is there a specific error code that indicates the hypervisor is
> > configured not to allow MAC address changes?  If so, shouldn't that be
> > translated to return EPERM rather than EINVAL?
> 
> I have check the return code, 0xc000000d, which is returned both when MAC
> spoofing is not enabled or the parameter contains other errors. So we can't
> tell if it permission error or not. I will re-submit this patch still
> using EINVAL.

Oh well, thanks for trying!

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ