From patchwork Sat Sep 26 03:40:52 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Turner X-Patchwork-Id: 144695 X-Patchwork-Delegate: azanella@linux.vnet.ibm.com Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 757204BB5900 for ; Sat, 26 Sep 2026 03:41:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 757204BB5900 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=m4uJnX0o X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-yx2-x10.google.com (mail-yx2-x10.google.com [IPv6:2607:f8b0:4864:41::10]) by sourceware.org (Postfix) with ESMTPS id AF93A4BB3BD3 for ; Sat, 26 Sep 2026 03:40:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AF93A4BB3BD3 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AF93A4BB3BD3 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:41::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790394057; cv=none; b=Niy/1QdmtP6wLZPRgulA0zvS8VIpm2Cs3RHJgrCZPxee8X5px95Wm2jcDNUygbMa/aFpIC/e8GlXy6OBSl2kHlJ27PxJUg20EEs1+8s2h6c4sLp8LM+VkH4iy2cGjBwNZFmrNaiTKX4JGkrzri7IeJD+jUFYhgv/qk2LL2eCzX8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790394057; c=relaxed/simple; bh=vnru6ZhojWklgR5ytM/DRYdv6Tlh6CcZzeLRNdJfrvA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=GzUUWVrfMcd9k8GzNhYxtdkKbddelbEot6NF8rfikWdUbH0Nnl2LhrfugybH3Oo7x/h27u6SRUHH4pFiBTtlCpw3spgOGpuIjzD9xtGsJhpM8Jf5iew8KAA2Hfv93+61LWS8w9/snTyDStl92QcrNbm4xfAhjYzJle1o9U0cRPk= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=m4uJnX0o DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AF93A4BB3BD3 Received: by mail-yx2-x10.google.com with SMTP id 956f58d0204a3-66e4ab201ecso1466747d50.2 for ; Fri, 25 Sep 2026 20:40:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790394057; x=1790998857; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=JZbGpWWSk2cL9djLk5Jkg87UIIfwT6MhvVR9GSodC6k=; b=m4uJnX0ogZ7H3mya4xeBBrdot/+BsofA78ceoZ954no/nGUxjGyXMqcNCU0hR4HV/l 9eO2DDNFBT88EI3tnKFq9h8IYegafhCkCyEe252Viu1amStoXytLKeLr79I2d6Megguw /eu80s44vDW7xf+18t201+izGbj3b7w2gcNcmZx79ypyc9r7irRecsEuuu0I7tQ2MrPH 0R6jdDohCkBpfjq40bF8nWvTWNkGaVUy7AlZd3by+HLwmMJn/yzU6xzE6hfHCt2T0ieA JpQKIbhfcZPA8aOMEVkpHwJXgZLd/SpCeVWVAwCBe4+jasnwFvfOoqS/Xf5xjNRy8aq2 x1XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790394057; x=1790998857; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=JZbGpWWSk2cL9djLk5Jkg87UIIfwT6MhvVR9GSodC6k=; b=mZZOct6AXIE8ThPy6s1eoYgoxqOKA001jWRyJRcM2uascsOcJcWj3DedwqzwmtoRJN nHjYKLgiL0SVt82lGC8VQEEra+TMKb1G7kmU9mcJhePula+5zbUw0uaDcjqPJjeZwfde Pr8gifDBBumbXuH9bDItFFUlIoRmeFLut070hLvtdud2F3I4MRQ2CNiYZAIhUKaaIzKq T7n14BAFCe+EIlQTvN8DpljgjsfgGQASXNFJlFjg1xo+AFdk+irBU3LgRLglR7e6t1OF NEf2IhFjoYhvG/sjKFeqKKm2c4gaiNq5jU+Em6EjJlrmHdczTd38cqvm4uTvgRb02VeG dMUA== X-Gm-Message-State: AFq9FYKC6JbpQZCrXmlA/HxB67c5RdW4okNVYqKM/9iYMxhdsB+vJzFF esGK0JxRQ4zdW6ojd6jSTCu+qfRHu1Z6/xflc1VLeb6Pc4xIxLTpudHe8h00bg== X-Gm-Gg: AYBFou1bKhVe8kNN/RRkOJIsPQBSZFXLplFUauhrQ80y0kOEl9+GxciV+prUGhVoq+2 /iwWVwFWUpu7/UJlj+nu8eC/EHVqqOAKt8n3TduzaPsGwkP6IA9vSXW6pvXql3K3sijbIRIDLkB OMOO+bGR5tYLdrTBnmQhlojPmxX4kr8X7UCMn0dzdnX6LHGyhjg8hxJ24imMeRRgdRP66BfXYld Ml69Bt4PFmfLpxfxbvMOdLLsg2UWBJmm87Xn14BJES0x23Hcp7TDddTheZ5OaRgykt0z5+uY732 6UAr5Lbh9XnI8aiqnYx9P0/gCXtCAMjQSLUG7ZyF+Qc0Vrxz5+0dF8nUyOtB5xidN9iEwn6yVzy LdFaS4hPw4hzmzzS7i9uAcfNfcND245EWCoXmiJxm2Bbo8TGMZV+o8quqTYSfI+b106uYmaSbjh 9B86KkNhXyrfNPxNFqsAnxugF2gAFVkTDir9X1t4AwLq+6ohMHeCii8xoUNMjaYiCqWOOFFn4= X-Received: by 2002:a05:690e:b4d:b0:674:20c0:c6aa with SMTP id 956f58d0204a3-67420c0d0c5mr441565d50.22.1790394056672; Fri, 25 Sep 2026 20:40:56 -0700 (PDT) Received: from localhost ([2600:1702:7a90:6f9f:8bc4:8aec:108d:7a04]) by smtp.gmail.com with ESMTPSA id 00721157ae682-8a86104911csm16771187b3.44.2026.09.25.20.40.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2026 20:40:55 -0700 (PDT) From: Matt Turner To: libc-alpha@sourceware.org Cc: Florian Weimer , Magnus Lindholm , Matt Turner Subject: [PATCH] Remove gethostname from sysdeps/unix/syscalls.list Date: Fri, 25 Sep 2026 23:40:52 -0400 Message-ID: <20260926034052.524304-1-mattst88@gmail.com> X-Mailer: git-send-email 2.54.0 MIME-Version: 1.0 X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org Commit 9d7d648088 ("alpha: Use the generic gethostname") removed the alpha gethostname.c to use sysdeps/posix/gethostname.c, but sysdeps/unix precedes sysdeps/posix and its syscalls.list has a gethostname entry. alpha is the only Linux target defining __NR_gethostname, so it now gets a raw syscall wrapper. The kernel truncates the name and returns 0, so a too-small buffer is no longer an error: tst-gethostname.c:95: not true: gethostname (hostname, HOST_NAME_MAX) == -1 nss/test-netdb crashes because gethostname (NULL, 0) now succeeds. qemu-user does not show this; it implements the syscall with the host's gethostname. No other target uses the entry: other Linux targets lack __NR_gethostname and Hurd has its own gethostname.c. Reviewed-by: Adhemerval Zanella --- sysdeps/unix/syscalls.list | 1 - 1 file changed, 1 deletion(-) diff --git ./sysdeps/unix/syscalls.list ./sysdeps/unix/syscalls.list index 10bd409eef..67c82783a1 100644 --- ./sysdeps/unix/syscalls.list +++ ./sysdeps/unix/syscalls.list @@ -24,7 +24,6 @@ getdomain - getdomainname i:si getdomainname getgid - getgid Ei: __getgid getgid getgroups - getgroups i:ip __getgroups getgroups gethostid - gethostid i: gethostid -gethostname - gethostname i:bn __gethostname gethostname getpeername - getpeername i:ibN __getpeername getpeername getpid - getpid Ei: __getpid getpid getpriority - getpriority i:ii __getpriority getpriority