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: <20190528132136.GC18059@lunn.ch>
Date:   Tue, 28 May 2019 15:21:36 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>, netdev@...r.kernel.org,
        "David S . Miller" <davem@...emloft.net>,
        Krzysztof Halasa <khalasa@...p.pl>
Subject: Re: [PATCH 4/8] ARM/net: ixp4xx: Pass ethernet physical base as
 resource

> >>  /* Built-in 10/100 Ethernet MAC interfaces */
> >>+static struct resource fsg_eth_npeb_resources[] = {
> >>+	{
> >>+		.start		= IXP4XX_EthB_BASE_PHYS,
> >>+		.end		= IXP4XX_EthB_BASE_PHYS + 0x0fff,
> >
> >Hi Linus
> >
> >It is a long time since i did resources. But i was always told to use
> >the SZ_ macros, so SZ_4K. I also think 0xfff is wrong, it should be
> >0x1000.
> 
>    No, 0x0fff is correct there, 0x1000 is not...

Yes, the DEFINE_RES_* macros make this clear. The code should be
changed to use them, and then SZ_ macros can be used, since
DEFINE_RES_NAMED() does a - 1.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ