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] [thread-next>] [day] [month] [year] [list]
Message-ID: <MW2PR2101MB1113456E92B548A3405A0E5AA0080@MW2PR2101MB1113.namprd21.prod.outlook.com>
Date:   Thu, 30 Aug 2018 17:31:58 +0000
From:   KY Srinivasan <kys@...rosoft.com>
To:     Dexuan Cui <decui@...rosoft.com>,
        "'gregkh@...uxfoundation.org'" <gregkh@...uxfoundation.org>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>
CC:     "'linux-kernel@...r.kernel.org'" <linux-kernel@...r.kernel.org>,
        "'driverdev-devel@...uxdriverproject.org'" 
        <driverdev-devel@...uxdriverproject.org>,
        "'olaf@...fle.de'" <olaf@...fle.de>,
        "'apw@...onical.com'" <apw@...onical.com>,
        "'jasowang@...hat.com'" <jasowang@...hat.com>,
        vkuznets <vkuznets@...hat.com>,
        "'marcelo.cerri@...onical.com'" <marcelo.cerri@...onical.com>
Subject: RE: [PATCH] Drivers: hv: vmbus: Use raw_smp_processor_id() in
 vmbus_connect()



> -----Original Message-----
> From: Dexuan Cui
> Sent: Thursday, August 30, 2018 12:27 PM
> To: KY Srinivasan <kys@...rosoft.com>; 'gregkh@...uxfoundation.org'
> <gregkh@...uxfoundation.org>; Stephen Hemminger
> <sthemmin@...rosoft.com>; Haiyang Zhang <haiyangz@...rosoft.com>
> Cc: 'linux-kernel@...r.kernel.org' <linux-kernel@...r.kernel.org>;
> 'driverdev-devel@...uxdriverproject.org' <driverdev-
> devel@...uxdriverproject.org>; 'olaf@...fle.de' <olaf@...fle.de>;
> 'apw@...onical.com' <apw@...onical.com>; 'jasowang@...hat.com'
> <jasowang@...hat.com>; vkuznets <vkuznets@...hat.com>;
> 'marcelo.cerri@...onical.com' <marcelo.cerri@...onical.com>
> Subject: RE: [PATCH] Drivers: hv: vmbus: Use raw_smp_processor_id() in
> vmbus_connect()
> 
> > From: KY Srinivasan
> > Sent: Thursday, August 30, 2018 09:28
> > ...
> > diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
> > @@ -119,8 +119,9 @@ static int vmbus_negotiate_version(struct
> > vmbus_channel_msginfo *msginfo,
> >          */
> >    if (version >= VERSION_WIN8_1) {
> >        msg->target_vcpu =
> > -            hv_cpu_number_to_vp_number(smp_processor_id());
> > -       vmbus_connection.connect_cpu = smp_processor_id();
> 
> > +       hv_cpu_number_to_vp_number(get_cpu());
> > +       vmbus_connection.connect_cpu = msg->target_vcpu;
> > +       put_cpu();
> 
> While the warning " BUG: using smp_processor_id() in preemptible" can also
> be avoided, the line
> +	vmbus_connection.connect_cpu = msg->target_vcpu;
> seems incorrect, as the "connect_cpu" should reflect Linux CPU numbering
> rather than Hyper-V's vCPU numbering.

Yes of course!  Can you send me a patch with the fix.

K. Y
> 
> -- Dexuan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ