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]
Date:   Fri, 17 Feb 2023 18:59:51 +0000
From:   Dexuan Cui <decui@...rosoft.com>
To:     Mohammed Gamal <mgamal@...hat.com>
CC:     "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "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: Friday, February 17, 2023 1:43 AM
> > > @@ -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.
> >
> Makes sense. Will use pr_warn() instead.

As Vitaly suggested, pr_warn_once() looks better.
 
> > Can we make the line a little shorter:
> >         pr_warn("relid2channel: invalid channel id %u\n", relid);
> >
> I think this message could be a bit misleading. The problem here is
> not that the relid
> is invalid, but that the relid-to-channel mapping hasn't been
> allocated by the second
> kernel yet. An invalid relid could simply be the case where relid >=
> MAX_CHANNEL_RELIDS.
> 
> May be something like:
>      pr_warn("relid2channel: No channels mapped for relid %d\n, relid");
> would be clearer?

IMO the 'relid' is invalid in the second kernel because the second
kernel has not called vmbus_request_offers() yet, but your new message
is ok to me. I just wanted to avoid a too long line of >80 characters :-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ