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: <20170531210632.251822b4@canb.auug.org.au>
Date:   Wed, 31 May 2017 21:06:32 +1000
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     Michael Ellerman <mpe@...erman.id.au>
Cc:     David Miller <davem@...emloft.net>,
        Networking <netdev@...r.kernel.org>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        PowerPC <linuxppc-dev@...ts.ozlabs.org>,
        Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH net-next] powerpc: use asm-generic/socket.h as much as
 possible

Hi Michael,

On Wed, 31 May 2017 20:15:55 +1000 Michael Ellerman <mpe@...erman.id.au> wrote:
>
> Stephen Rothwell <sfr@...b.auug.org.au> writes:
> 
> > asm-generic/socket.h already has an exception for the differences that
> > powerpc needs, so just include it after defining the differences.
> >
> > Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
> > ---
> >  arch/powerpc/include/uapi/asm/socket.h | 92 +---------------------------------
> >  1 file changed, 1 insertion(+), 91 deletions(-)
> >
> > Build tested using powerpc allyesconfig, pseries_le_defconfig, 32 bit
> > and 64 bit allnoconfig and ppc44x_defconfig builds.  
> 
> Did you boot it and test that userspace was happy doing sockety things?

No, sorry.

The patch was done by inspection, but it is pretty obvious ... here is
the diff between arch/powerpc/include/uapi/asm/socket.h and
include/uapi/asm-generic/socket.h before the patch:

--- arch/powerpc/include/uapi/asm/socket.h	2017-05-31 20:56:54.940473709 +1000
+++ include/uapi/asm-generic/socket.h	2017-05-31 10:04:16.716445463 +1000
@@ -1,12 +1,5 @@
-#ifndef _ASM_POWERPC_SOCKET_H
-#define _ASM_POWERPC_SOCKET_H
-
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
+#ifndef __ASM_GENERIC_SOCKET_H
+#define __ASM_GENERIC_SOCKET_H
 
 #include <asm/sockios.h>
 
@@ -30,12 +23,14 @@
 #define SO_LINGER	13
 #define SO_BSDCOMPAT	14
 #define SO_REUSEPORT	15
-#define SO_RCVLOWAT	16
-#define SO_SNDLOWAT	17
-#define SO_RCVTIMEO	18
-#define SO_SNDTIMEO	19
-#define SO_PASSCRED	20
-#define SO_PEERCRED	21
+#ifndef SO_PASSCRED /* powerpc only differs in these */
+#define SO_PASSCRED	16
+#define SO_PEERCRED	17
+#define SO_RCVLOWAT	18
+#define SO_SNDLOWAT	19
+#define SO_RCVTIMEO	20
+#define SO_SNDTIMEO	21
+#endif
 
 /* Security levels - as per NRL IPv6 - don't actually do anything */
 #define SO_SECURITY_AUTHENTICATION		22
@@ -71,7 +66,7 @@
 #define SO_RXQ_OVFL             40
 
 #define SO_WIFI_STATUS		41
-#define SCM_WIFI_STATUS		SO_WIFI_STATUS
+#define SCM_WIFI_STATUS	SO_WIFI_STATUS
 #define SO_PEEK_OFF		42
 
 /* Instruct lower device to use last 4-bytes of skb data as FCS */
@@ -107,4 +102,4 @@
 
 #define SCM_TIMESTAMPING_PKTINFO	58
 
-#endif	/* _ASM_POWERPC_SOCKET_H */
+#endif /* __ASM_GENERIC_SOCKET_H */

-- 
Cheers,
Stephen Rothwell

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ