From patchwork Fri Nov 23 17:54:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 1002495 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-97511-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="ldBkIDkB"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 431kTw67Cqz9s0t for ; Sat, 24 Nov 2018 04:54:44 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=N584+OD97D1fqapYg7Fn7FCZcmEnf 3wZsR9XlUquFxS/ko9im34q1pDetU1nja0IEbnKEdBgEmLNOIzz9CPthDgsSAnPT k70agYHKEOgpYDqGJuoYanRHDReZk+W1hsmT5ZNauahBjpmj8Gx6C0yrmw4uouKq VKaIHmRIP5CCLM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=EdnyUrt7S+bBmjRdE95VCYeNhck=; b=ldB kIDkBqIR7IKuzMl1VmPG9CQH0q52uNCrNfiRi/emzqYHaePzxZyvpW+EFqkYa8Fn CJVNRYPc6kTX9/oDbWAjNtlnHHsDeBg4kVDIh1dWLJ6T+mo/mtGfCOgHxDgR0TVr CglGK8MYlWTLM8g54jWCIC7+FnOy1HLi9XSas2sI= Received: (qmail 49981 invoked by alias); 23 Nov 2018 17:54:34 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 49856 invoked by uid 89); 23 Nov 2018 17:54:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1585 X-HELO: relay1.mentorg.com Date: Fri, 23 Nov 2018 17:54:26 +0000 From: Joseph Myers To: Subject: Fix Arm __ASSUME_COPY_FILE_RANGE (bug 23915) [committed] Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 The generic kernel-features.h defines __ASSUME_COPY_FILE_RANGE for 4.5 and later kernels. However, for 32-bit Arm binaries running on 64-bit Arm kernels, the syscall was only wired up in the 4.7 kernel, although the 32-bit Arm kernel had the syscall from 4.5 onwards. This patch corrects the Arm kernel-features.h to undefine the macro for configured minimum kernel versions before 4.7. Tested (compilation only) with a build-many-glibcs.py build for arm-linux-gnueabi. Committed. 2018-11-23 Joseph Myers [BZ #23915] * sysdeps/unix/sysv/linux/arm/kernel-features.h [__LINUX_KERNEL_VERSION < 0x040700] (__ASSUME_COPY_FILE_RANGE): Undefine. diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h index c6e745227c..e4ca98bfea 100644 --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h @@ -40,11 +40,12 @@ #define __ASSUME_RECV_SYSCALL 1 #define __ASSUME_SEND_SYSCALL 1 -/* Support for the mlock2 syscall was added to the compat syscall - table for 64-bit kernels in 4.7, although present in 32-bit kernels - from 4.4. */ +/* Support for the mlock2 and copy_file_range syscalls was added to + the compat syscall table for 64-bit kernels in 4.7, although + present in 32-bit kernels from 4.4 and 4.5 respectively. */ #if __LINUX_KERNEL_VERSION < 0x040700 # undef __ASSUME_MLOCK2 +# undef __ASSUME_COPY_FILE_RANGE #endif #undef __ASSUME_CLONE_DEFAULT