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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 07 Sep 2020 19:47:09 +0200
From:   Lukasz Stelmach <l.stelmach@...sung.com>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     Andrew Lunn <andrew@...n.ch>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Kukjin Kim <kgene@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Russell King <linux@...linux.org.uk>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-samsung-soc <linux-samsung-soc@...r.kernel.org>,
        netdev <netdev@...r.kernel.org>,
        "open list\:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Marek Szyprowski <m.szyprowski@...sung.com>
Subject: Re: [PATCH 1/3] net: ax88796c: ASIX AX88796C SPI Ethernet Adapter
 Driver

It was <2020-08-26 śro 09:13>, when Geert Uytterhoeven wrote:
> On Tue, Aug 25, 2020 at 8:02 PM Andrew Lunn <andrew@...n.ch> wrote:
>> On Tue, Aug 25, 2020 at 07:03:09PM +0200, Łukasz Stelmach wrote:
>> > +     if (netif_msg_pktdata(ax_local)) {
>> > +             int loop;
>> > +             netdev_info(ndev, "TX packet len %d, total len %d, seq %d\n",
>> > +                             pkt_len, tx_skb->len, seq_num);
>> > +
>> > +             netdev_info(ndev, "  Dump SPI Header:\n    ");
>> > +             for (loop = 0; loop < 4; loop++)
>> > +                     netdev_info(ndev, "%02x ", *(tx_skb->data + loop));
>> > +
>> > +             netdev_info(ndev, "\n");
>>
>> This no longer works as far as i remember. Lines are terminate by
>> default even if they don't have a \n.
>>
>> Please you should not be using netdev_info(). netdev_dbg() please.
>
> We have a nice helper for this: print_hex_dump_debug().

It is good to know.

Actually I think printe_hex_dump(KERN_INFO) is here more
appropriate.  With *_debug() functions and dynamic debug enabled users
need to flip two switches to see messages. I think that if msglvl
(pktdata in this case) is not turned on by default and users need to use
ethtool to switch it, they shouldn't be required to fiddle with dynamic
debug too.

-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics

Download attachment "signature.asc" of type "application/pgp-signature" (488 bytes)

Powered by blists - more mailing lists