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  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]
Date:   Thu, 17 Sep 2020 23:42:11 +0300
From:   Shay Agroskin <shayagr@...zon.com>
To:     David Miller <davem@...emloft.net>
CC:     <saeed@...nel.org>, <netdev@...r.kernel.org>, <dwmw@...zon.com>,
        <zorik@...zon.com>, <matua@...zon.com>, <saeedb@...zon.com>,
        <msw@...zon.com>, <aliguori@...zon.com>, <nafea@...zon.com>,
        <gtzalik@...zon.com>, <netanel@...zon.com>, <alisaidi@...zon.com>,
        <benh@...zon.com>, <akiyano@...zon.com>, <sameehj@...zon.com>,
        <ndagan@...zon.com>, <amitbern@...zon.com>
Subject: Re: [PATCH V1 net-next 2/8] net: ena: Add device distinct log prefix to files


David Miller <davem@...emloft.net> writes:

> From: Saeed Mahameed <saeed@...nel.org>
> Date: Thu, 17 Sep 2020 12:38:28 -0700
>
>> allocated but unregistered netdevices also do not help much as 
>> the name
>> of the netdev is not assigned yet.
>> 
>> why don't use dev_info(pci_dev) macors  for low level functions 
>> when
>> netdev is not available or not allocated yet.
>
> The problem in this case is that they have this huge suite of
> functions that operate on a specific ena sub-object.  Most of 
> the time
> the associated netdev is fully realized, but in the few calls 
> made
> during early probe it is not.
>
> To me it is a serious loss that just because a small number of 
> times
> the interface lacks a fully realized netdev object, we can't use 
> the
> netdev_*() routines.
>
> Most users aren't going to understand that an error message for 
> PCI
> device XyZ means eth0 is having problems.

I agree that netdev_* functions would be more useful, which is why 
we're working on a patch to transform ena_com functions to use 
them as well.
For the time being, switching to dev_* functions makes the 
driver's logs more informative than pr_* functions.

I would rather not divide ena_com functions to use netdev_* and 
dev_* according to net_device allocative state just for this 
patch. Doing so, besides doing quite some work for a temporary 
solution, wouldn't provide a full solution (same as it doesn't in 
this patch).
As stated, a more complete solution is in the works. We can look 
at the glass as being half full, and decide that this patch 
improves the previous situation even if not in the most optimal 
solution.

thanks,
Shay

Powered by blists - more mailing lists