Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 8 Mar 2019 15:32:45 -0500
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: [PATCH 00/22] Updates for linux v4.19, v4.20 and v5.0

On Fri, Mar 08, 2019 at 12:12:51AM +0100, Szabolcs Nagy wrote:
> build tested on arm, aarch64, i386, m68k, mips, mips64, powerpc,
> powerpc64le, s390x, sh4 and x86_64.
> 
> Szabolcs Nagy (22):
>   sys/socket.h: add SO_TXTIME from linux v4.19
>   sys/inotify.h: add IN_MASK_CREATE from linux v4.19
>   netinet/tcp.h: add tcp_info fields from linux v4.19
>   netinet/udp.h: add UDP_ENCAP_RXRPC from linux v4.19
>   elf.h: add new mips core dump note values from linux v4.19
>   aarch64, or1k: define rseq syscall number following linux v4.19
>   arm: add io_pgetevents syscall number from v4.19
>   sys/mman.h: add new hugetlb mmap flags from linux v4.19
>   add PACKET_IGNORE_OUTGOING sockopt from linux v4.20
>   netinet/in.h update following linux v4.20
>   netinet/in.h add IPV6_MULTICAST_ALL from linux v4.20
>   sys/prctl.h: add PR_SPEC_INDIRECT_BRANCH from linux v4.20
>   bits/ioctl.h: add TIOC{G,S}ISO7816 from linux v4.20
>   aarch64: add HWCAP_SSBS from linux v4.20
>   powerpc: add PTRACE_SYSEMU from linux v4.20
>   netinet/udp.h: add UDP_GRO from linux v5.0
>   netinet/tcp.h: add TCP_NLA_SRTT from linux v5.0
>   aarch64, or1k: add kexec_file_load syscall number from linux v5.0
>   elf.h: update with C-SKY definitions
>   elf.h: add NT_ definitions from linux v5.0
>   sys/prctl.h: add PR_PAC_RESET_KEYS from linux v5.0
>   aarch64: add HWCAP_ definitions from linux v5.0

Looks mostly ok. Some questions:

> From d8b15a06288dee0895bd6b51cbb81f3c696ba504 Mon Sep 17 00:00:00 2001
> From: Szabolcs Nagy <nsz@...t70.net>
> Date: Wed, 23 Jan 2019 20:06:12 +0000
> Subject: [PATCH 10/22] netinet/in.h update following linux v4.20
> 
> IN_BADCLASS and IN_EXPERIMENTAL are changed and new macros are added
> for class-e addresses.
> 
> linux commit 65cab850f0eeaa9180bd2e10a231964f33743edf
> ---
>  include/netinet/in.h | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/include/netinet/in.h b/include/netinet/in.h
> index 192679a6..2f87e33f 100644
> --- a/include/netinet/in.h
> +++ b/include/netinet/in.h
> @@ -168,8 +168,12 @@ uint16_t ntohs(uint16_t);
>  #define	IN_CLASSC_HOST		(0xffffffff & ~IN_CLASSC_NET)
>  #define	IN_CLASSD(a)		((((in_addr_t)(a)) & 0xf0000000) == 0xe0000000)
>  #define	IN_MULTICAST(a)		IN_CLASSD(a)
> -#define	IN_EXPERIMENTAL(a)	((((in_addr_t)(a)) & 0xe0000000) == 0xe0000000)
> -#define	IN_BADCLASS(a)		((((in_addr_t)(a)) & 0xf0000000) == 0xf0000000)
> +#define	IN_MULTICAST_NET	0xe0000000
> +#define	IN_BADCLASS(a)		((((in_addr_t)(a)) == 0xffffffff)
> +#define	IN_EXPERIMENTAL(a)	IN_BADCLASS((a))
> +#define	IN_CLASSE(a)		((((in_addr_t)(a)) & 0xf0000000) == 0xf0000000)
> +#define	IN_CLASSE_NET		0xffffffff
> +#define	IN_CLASSE_NSHIFT	0

You've described these as Linux 4.20 additions, but they aren't
specific to any Linux API or defined by Linux as far as I can tell.
Rather, aren't they aligned with some change by IANA or something? The
motivation for having them would not be that Linux made corresponding
changes in kernel headers, but rather that they're the proper
definitions for changes to a relevant network-related standard.

> From f06c03ef3ce4c21d15416e071d3a7e2bab40928a Mon Sep 17 00:00:00 2001
> From: Szabolcs Nagy <nsz@...t70.net>
> Date: Thu, 7 Mar 2019 21:53:48 +0000
> Subject: [PATCH 21/22] sys/prctl.h: add PR_PAC_RESET_KEYS from linux v5.0
> 
> aarch64 pointer authentication code related prctl that allows
> reinitializing the key for the thread, added in linux commit
> ba830885656414101b2f8ca88786524d4bb5e8c1
> ---
>  include/sys/prctl.h | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/include/sys/prctl.h b/include/sys/prctl.h
> index 07a3490b..4b6c8918 100644
> --- a/include/sys/prctl.h
> +++ b/include/sys/prctl.h
> @@ -146,6 +146,13 @@ struct prctl_mm_map {
>  #define PR_SPEC_DISABLE (1UL << 2)
>  #define PR_SPEC_FORCE_DISABLE (1UL << 3)
>  
> +#define PR_PAC_RESET_KEYS       54
> +# define PR_PAC_APIAKEY (1UL << 0)
> +# define PR_PAC_APIBKEY (1UL << 1)
> +# define PR_PAC_APDAKEY (1UL << 2)
> +# define PR_PAC_APDBKEY (1UL << 3)
> +# define PR_PAC_APGAKEY (1UL << 4)
> +
>  int prctl (int, ...);

Is there a reason for this formatting? It's unlike anything we use
elsewhere in the file or elsewhere in musl.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.