From patchwork Thu Aug 24 16:42:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1825527 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=hOFKK74k; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RWpn56v0Zz1yfF for ; Fri, 25 Aug 2023 02:43:37 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F20BF385DC07 for ; Thu, 24 Aug 2023 16:43:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F20BF385DC07 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692895416; bh=muTWs5xULVD6yYhP482bt4m6hhzDjJ5R73pdjW8DRnc=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=hOFKK74kGp/u9QLCUcVMM+fHGOvv+5XcMOF2IHfeURtl4PXqHZtVvrlGRJ5UKPaNk CbvFsduDIRK87uNlXwssvLmzWO49U6fmfoKwpFK5Ylkz6fjuXnoPUF4jzEH1S73jGh DUyup/abmWNkBWCfdXK3dgAI8ngo6C1HE1BpwWck= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oo1-xc2b.google.com (mail-oo1-xc2b.google.com [IPv6:2607:f8b0:4864:20::c2b]) by sourceware.org (Postfix) with ESMTPS id B8F243856241 for ; Thu, 24 Aug 2023 16:42:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B8F243856241 Received: by mail-oo1-xc2b.google.com with SMTP id 006d021491bc7-570c856e946so61433eaf.2 for ; Thu, 24 Aug 2023 09:42:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692895356; x=1693500156; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=muTWs5xULVD6yYhP482bt4m6hhzDjJ5R73pdjW8DRnc=; b=Nqx2Rv35FpfDZGARGDyG8kdqFU4mnQtyPVOTfKAR43UoGwbnXj0URnk3DIw0G/9+BQ MW2tXhf6eCpPWWeJ18zXyFzFd0SlI1NhWy1ZFzA4X1Be69RjNRP4tfeDIpKkGigc0M11 7SCP4qJyWdVZIh8dqZKgqINxm8CmPMSCXWHY9OfflCgNS2Fp4CbEE+vxrV8bbb4c1ISU NTrd1+iIAe8MM2DHTb9zv9HJpZg9lc9xfKdMxJW5iZhmQt84D3d27rn/HPx0mLon5QHB DNVYDvjdhb6PapzUTVu9LjWlNe3PvKVtbtpW8d1Xql9YPTt4RYXl5Cj93Gbe0QBMfOK3 j2YQ== X-Gm-Message-State: AOJu0Yx5K4CB3+YcJ/TYqlS+cGDbvKXG2LF32YONB78rD/4CBaaO26rT z/dsLoB03C/NT0EQOPnxeNFD8NSutvCDfHTXphZ3rQ== X-Google-Smtp-Source: AGHT+IHlVnM4Hsg/FJ9Ywgc3egK9JtuSHKSHEFgTHyKXu4t64azZBGEkogxNRX+gpPPe5pvExMIYTA== X-Received: by 2002:a05:6808:23c4:b0:3a7:b5ea:f5e8 with SMTP id bq4-20020a05680823c400b003a7b5eaf5e8mr348931oib.27.1692895356499; Thu, 24 Aug 2023 09:42:36 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c2:c275:5154:75ba:e0b6:f70d]) by smtp.gmail.com with ESMTPSA id r25-20020a544899000000b003a37372e6b2sm5115409oic.21.2023.08.24.09.42.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 09:42:35 -0700 (PDT) To: libc-alpha@sourceware.org, Florian Weimer Subject: [PATCH v9 3/6] linux: Define __ASSUME_CLONE3 to 0 for alpha, ia64, nios2, sh, and sparc Date: Thu, 24 Aug 2023 13:42:16 -0300 Message-Id: <20230824164219.391263-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230824164219.391263-1-adhemerval.zanella@linaro.org> References: <20230824164219.391263-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" Not all architectures added clone3 syscall. Reviewed-by: Florian Weimer --- .../unix/sysv/linux/alpha/kernel-features.h | 4 ++++ .../unix/sysv/linux/ia64/kernel-features.h | 4 ++++ .../unix/sysv/linux/nios2/kernel-features.h | 24 +++++++++++++++++++ sysdeps/unix/sysv/linux/sh/kernel-features.h | 4 ++++ .../unix/sysv/linux/sparc/kernel-features.h | 4 ++++ 5 files changed, 40 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/nios2/kernel-features.h diff --git a/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/sysdeps/unix/sysv/linux/alpha/kernel-features.h index 3151e75449..d14c010333 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel-features.h +++ b/sysdeps/unix/sysv/linux/alpha/kernel-features.h @@ -50,4 +50,8 @@ /* Alpha requires old sysvipc even being a 64-bit architecture. */ #undef __ASSUME_SYSVIPC_DEFAULT_IPC_64 +/* Alpha does not provide clone3. */ +#undef __ASSUME_CLONE3 +#define __ASSUME_CLONE3 0 + #endif /* _KERNEL_FEATURES_H */ diff --git a/sysdeps/unix/sysv/linux/ia64/kernel-features.h b/sysdeps/unix/sysv/linux/ia64/kernel-features.h index 98ebfb74bf..398ec37328 100644 --- a/sysdeps/unix/sysv/linux/ia64/kernel-features.h +++ b/sysdeps/unix/sysv/linux/ia64/kernel-features.h @@ -34,4 +34,8 @@ #undef __ASSUME_CLONE_DEFAULT #define __ASSUME_CLONE2 +/* ia64 does not provide clone3. */ +#undef __ASSUME_CLONE3 +#define __ASSUME_CLONE3 0 + #endif /* _KERNEL_FEATURES_H */ diff --git a/sysdeps/unix/sysv/linux/nios2/kernel-features.h b/sysdeps/unix/sysv/linux/nios2/kernel-features.h new file mode 100644 index 0000000000..239e507272 --- /dev/null +++ b/sysdeps/unix/sysv/linux/nios2/kernel-features.h @@ -0,0 +1,24 @@ +/* Set flags signalling availability of kernel features based on given + kernel version number. NIOS2 version. + Copyright (C) 2023 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#include_next + +/* nios2 does not provide clone3. */ +#undef __ASSUME_CLONE3 +#define __ASSUME_CLONE3 0 diff --git a/sysdeps/unix/sysv/linux/sh/kernel-features.h b/sysdeps/unix/sysv/linux/sh/kernel-features.h index 953fa8dff0..3eaf9e0857 100644 --- a/sysdeps/unix/sysv/linux/sh/kernel-features.h +++ b/sysdeps/unix/sysv/linux/sh/kernel-features.h @@ -55,4 +55,8 @@ # undef __ASSUME_STATX #endif +/* sh does not provide clone3. */ +#undef __ASSUME_CLONE3 +#define __ASSUME_CLONE3 0 + #endif diff --git a/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/sysdeps/unix/sysv/linux/sparc/kernel-features.h index 98c938c16d..fcb343ef63 100644 --- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h +++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h @@ -87,3 +87,7 @@ (INLINE_CLONE_SYSCALL). */ #undef __ASSUME_CLONE_DEFAULT #define __ASSUME_CLONE_BACKWARDS 1 + +/* sparc does not provide clone3. */ +#undef __ASSUME_CLONE3 +#define __ASSUME_CLONE3 0