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>] [day] [month] [year] [list]
Message-ID: <20201220205650.nznim44tnseb66hb@archlinux>
Date:   Mon, 21 Dec 2020 02:26:50 +0530
From:   'Amey Narkhede' <ameynarkhede03@...il.com>
To:     unlisted-recipients:; (no To-header on input)
Cc:     linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] block: aoe: replace use of __constant_htons to htons

Date: Mon, 21 Dec 2020 01:50:23 +0530
From: 'Amey Narkhede' <ameynarkhede03@...il.com>
To: David Laight <David.Laight@...lab.com>
Subject: Re: [PATCH] block: aoe: replace use of __constant_htons to htons
Message-ID: <20201220202019.j7x64yahapgilr7u@...hlinux>
References: <20201220164625.94105-1-ameynarkhede03@...il.com>
 <d708db73308747feb0484287a09c443e@...MS.aculab.com>
Content-Disposition: inline
In-Reply-To: <d708db73308747feb0484287a09c443e@...MS.aculab.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=utf-8

On 20/12/20 07:35PM, David Laight wrote:
> From: Amey Narkhede
> > Sent: 20 December 2020 16:46
> >
> > The macro htons expands to __swab16 which has special
> > case for constants in little endian case. In big
> > endian case both __constant_htons and htons macros
> > expand to the same code. So, replace __constant_htons
> > with htons to get rid of the definition of __constant_htons
> > completely.
> >
> ...
> >  static struct packet_type aoe_pt __read_mostly = {
> > -	.type = __constant_htons(ETH_P_AOE),
> > +	.type = htons(ETH_P_AOE),
> >  	.func = aoenet_rcv,
>
> Does this cause grief if someone is doing a COMPILE_TEST on LE?
>
> 	David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)
>
I did COMPILE_TEST on my x86_64 machine and it compiled
without any problems.
I assume that was the point or am I missing
something? I'm a beginner contributor so please
let me know if there any mistakes.

Amey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ