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: <SA1PR21MB1335435701EBB35A9DD35892BFA19@SA1PR21MB1335.namprd21.prod.outlook.com>
Date:   Fri, 17 Feb 2023 06:25:28 +0000
From:   Dexuan Cui <decui@...rosoft.com>
To:     Mohammed Gamal <mgamal@...hat.com>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Michael Kelley (LINUX)" <mikelley@...rosoft.com>,
        "parri.andrea@...il.com" <parri.andrea@...il.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        "wei.liu@...nel.org" <wei.liu@...nel.org>,
        "vkuznets@...hat.com" <vkuznets@...hat.com>,
        "xxiong@...hat.com" <xxiong@...hat.com>
Subject: RE: [PATCH v2] Drivers: vmbus: Check for channel allocation before
 looking up relids

> From: Mohammed Gamal <mgamal@...hat.com>
> Sent: Tuesday, February 14, 2023 3:28 AM
> ...
> So Make relid2channel() check if vmbus channels is allocated first, and if not
> print a warning and return NULL to the caller.
Can we change the above to:

Print a warning and error out in relid2channel() for a channel id that's invalid
in the second kernel.
 
> --- a/drivers/hv/connection.c
> +++ b/drivers/hv/connection.c
> @@ -409,6 +409,10 @@ void vmbus_disconnect(void)
>   */
>  struct vmbus_channel *relid2channel(u32 relid)
>  {
> +	if (vmbus_connection.channels == NULL) {
> +		WARN(1, "Requested relid=%u, but channel mapping not
> allocated!\n", relid);

WARN() may be too noisy. I suggest we use pr_warn() instead.

Can we make the line a little shorter:
        pr_warn("relid2channel: invalid channel id %u\n", relid);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ