Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2113563lqo; Mon, 13 May 2024 08:13:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU+R+wM86H6+hUrWniLsAAymM7P5KcOuFYyzTzJ7kSbEDHU/pUBMwjCHeBSdm2Cr8xHjfsQvAUoPL52lNYvTXo2uoZ+1vnqfN1QUqwg4A== X-Google-Smtp-Source: AGHT+IGKLGZRaUKY14yun6iALMQ/dfCFh4e3pBB6umDi0jZStzmdhBL8RofTC0Qk/tKMOnMJt4Zk X-Received: by 2002:a17:90b:1293:b0:2b5:258c:5f10 with SMTP id 98e67ed59e1d1-2b6ccd8ff11mr9677038a91.30.1715613238628; Mon, 13 May 2024 08:13:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715613238; cv=pass; d=google.com; s=arc-20160816; b=LsqJKAlQ3dcW83zZ0bTSlIkKDlQ9kyEpzT5pD/+xhexVdxqh9qFWU5KLpLYGVfDIbH ZSHHY+Y4CscGp9mVEKvm5pRMqeeX+va/N//CdKV668QfGG7vTA4uCGNwJ24rvnj0ZpBv yoU2perwC0fjVLwT2KDjQRtR0pbAV9N3SHMJaLjfFDzbA0BoVAkmXjU33nvU6304Z7KX tqIKtbo6GUKbagd8A5i3km+Iz8SGzb18zQ5iurxWXB4ONxSJ8T/s7U/5ZsfOSO5Rvn3q vYaZ4VO/3OJy84+IzlISJ8+h7jPUJjCVcpGSqZclQSMLs12Bf94A/0Xx4ZLNI9jfsYvN noQA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:from:content-language:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=q2Y34rp11DhTo88f7ZZG+euMgHjyfBULc8fRUELw0yg=; fh=WohGnoJRKDrypUpJqSRaGnreI3I0RtaBIdmtzxs8MxI=; b=j8fCjcmjjtDmTGWf0poX0NWC6QRnR3L29GZCdq0UwVxxMCjgpWKJHmbGbEprLlOf1l wkfUIbcgTg3LSoYchg1IaKPgaNKrAmUCqfC2q01jrDfjJ//oYq/nVnDIyUUTRNQAGj4p f8LX18NX18TLhEKgUMM1eGScZ7BUYehiCK2ynO8hY5f3LxkyE+lyK2Fc9cEu9wvaYPmK /FNwz1hDQms9pBXTW5Y6ffBPSKELRpy37tyokhAC1Nw9l//2HDkZ87kfLU2yBPyaHt35 tTi3azwGY0LJ4bjzucmpO0wA9xBElT03wjZ/yGmzBstN5ubqfKW1wOlhdBPUqK4vaunt auog==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=Ye0zy53A; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linuxfoundation.org dmarc=pass fromdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-177735-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177735-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b6290d4653si11509396a91.180.2024.05.13.08.13.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 08:13:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177735-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=Ye0zy53A; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linuxfoundation.org dmarc=pass fromdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-177735-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177735-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E37A5286648 for ; Mon, 13 May 2024 15:13:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9000215E9B; Mon, 13 May 2024 15:13:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Ye0zy53A" Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0CA1539C for ; Mon, 13 May 2024 15:13:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715613232; cv=none; b=H2T5uKbqZX1Sa+LVdEM7lJoiDfY+VHjo0b2YG19lNOiPn+vU9FAajdQM2Be7q6tSRt3sXghDxCf7qhBUq/Z/rvMlxV5VVZbmZdmqjsP9xYFJQjpBlCUQnvaEpHlYGfISYaTlJsilV6jCRQR/cxqfYfQqAMEVcFSlKeW1mQHxCNI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715613232; c=relaxed/simple; bh=bwxwLAiE81n3Z1yoB45RY2c8mTlYPK01k/Xno32pvA8=; h=Content-Type:Message-ID:Date:MIME-Version:From:Subject:To:Cc; b=OaKElJeH4p02PV7lyn9bOULhMOhAWDLdXlxBDFw+C1zG4Yesr69aHcki/49bN+9T2c8qe5QSVZzPkQWlNLT3+LjNmIo+AHIoIiIPIzBdH04LJUHo+CWvn+CFycLTdCVoNFahAFSuLkKAWXwLVPocS807I7a/MEp6Yxyg2ByXTGY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Ye0zy53A; arc=none smtp.client-ip=209.85.166.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-io1-f53.google.com with SMTP id ca18e2360f4ac-7e1e787d8d8so6049939f.2 for ; Mon, 13 May 2024 08:13:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1715613229; x=1716218029; darn=vger.kernel.org; h=cc:to:subject:from:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=q2Y34rp11DhTo88f7ZZG+euMgHjyfBULc8fRUELw0yg=; b=Ye0zy53AexST0vE5fzyAuEvsIQ6EShzTVLz4mAK8Da7Fky+T+byEH5JsSD+PwqqVp/ tnQSM/V4U6SytPIUx9eJ1d3gxHUu9pLEb1gV/z9hdfcppnhy9GREMOrN9bVpIYLmS0tG P/L+1DsIzolTSCBcERJajzX346teBVMl1iIyo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715613229; x=1716218029; h=cc:to:subject:from:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=q2Y34rp11DhTo88f7ZZG+euMgHjyfBULc8fRUELw0yg=; b=UpC4oTlm92D0CUYGhk/tOVqPFuY8qWXF1w8naL3RVahLtk4CzYscZ/gcx3Xcs1Sx8M q8neppaFc9cncY4M4oeuGmfummGkuwraHvgUDg3E/dWaNVwi+RDtdtO94iru5VsEaky/ 1Vpt4/YNecNiSHxgQvY6qYvF42WNBt2GUldZvDWsTsNtmr4qt2PbSGQCnLR0sHhFhD5/ fUv1niTX+n7iXQAEMpBe0xV/gQ4xZPx4spI2oX+M9YtmEfDa0euVd0/nGqRiM8PGBCvv 65S6h4zDg4m011T0PhtJWOmr4hptot7GYjIFHa+P4W5wWXU3K544rjPQhTvRAMbO6HdK MS4w== X-Forwarded-Encrypted: i=1; AJvYcCXvXn7Vhho2wz1R+Vjvl3ntHwY6Dq4kc8LxkMMTCQsG6UbdHnAjGqBKsENzpYK8SqCjVEtktLsvHpdSjLWFzQQaqx9o+m4j2JjzvvHy X-Gm-Message-State: AOJu0YySMPQ8of+qCES54PendgGZYbjvL4o9hlo7YHosxR8uEIwP+XZ9 2f79oRp2a71pJGQ0PgyxNUdluHPs+RxiXiVPk3UXLrttZS7r8/C7d8dCsJu+k4o= X-Received: by 2002:a6b:d203:0:b0:7e1:8bc8:8228 with SMTP id ca18e2360f4ac-7e1b501f23dmr1055809739f.0.1715613228793; Mon, 13 May 2024 08:13:48 -0700 (PDT) Received: from [192.168.1.128] ([38.175.170.29]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-489375c0b23sm2508947173.96.2024.05.13.08.13.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 May 2024 08:13:48 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------3h7oO02tp7Ub6Y8cOlsd370x" Message-ID: Date: Mon, 13 May 2024 09:13:47 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US From: Shuah Khan Subject: [GIT PULL] nolibc changes for Linux 6.10-rc1 To: Linus Torvalds Cc: Willy Tarreau , =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , "Paul E. McKenney" , =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , Shuah Khan , shuah , "open list:KERNEL SELFTEST FRAMEWORK" , Linux Kernel Mailing List This is a multi-part message in MIME format. --------------3h7oO02tp7Ub6Y8cOlsd370x Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Linus, Please pull the nolibc update for Linux 6.10-rc1. This nolibc update for Linux 6.10-rc1 - adds support for uname(2) - removes open-coded strnlen() - exports strlen() - adds tests for strlcat() and strlcpy() - fixes memory error in realloc() - fixes strlcat() return code and size usage - fixes strlcpy() return code and size usage diff is attached. thanks, -- Shuah ---------------------------------------------------------------- The following changes since commit 4cece764965020c22cff7665b18a012006359095: Linux 6.9-rc1 (2024-03-24 14:10:05 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux_kselftest-nolibc-6.10-rc1 for you to fetch changes up to 0adab2b6b7336fb6ee3c6456a432dad3b1d25647: tools/nolibc: add support for uname(2) (2024-04-14 20:28:54 +0200) ---------------------------------------------------------------- linux_kselftest-nolibc-6.10-rc1 This nolibc update for Linux 6.10-rc1 - adds support for uname(2) - removes open-coded strnlen() - exports strlen() - adds tests for strlcat() and strlcpy() - fixes memory error in realloc() - fixes strlcat() return code and size usage - fixes strlcpy() return code and size usage ---------------------------------------------------------------- Brennan Xavier McManus (1): tools/nolibc/stdlib: fix memory error in realloc() Rodrigo Campos (4): tools/nolibc/string: export strlen() tools/nolibc: Fix strlcat() return code and size usage tools/nolibc: Fix strlcpy() return code and size usage selftests/nolibc: Add tests for strlcat() and strlcpy() Thomas Weißschuh (2): tools/nolibc/string: remove open-coded strnlen() tools/nolibc: add support for uname(2) tools/include/nolibc/stdlib.h | 2 +- tools/include/nolibc/string.h | 46 +++++++++------- tools/include/nolibc/sys.h | 27 +++++++++ tools/testing/selftests/nolibc/nolibc-test.c | 82 ++++++++++++++++++++++++++++ 4 files changed, 136 insertions(+), 21 deletions(-) ---------------------------------------------------------------- --------------3h7oO02tp7Ub6Y8cOlsd370x Content-Type: text/x-patch; charset=UTF-8; name="linux_kselftest-nolibc-6.10-rc1.diff" Content-Disposition: attachment; filename="linux_kselftest-nolibc-6.10-rc1.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL3Rvb2xzL2luY2x1ZGUvbm9saWJjL3N0ZGxpYi5oIGIvdG9vbHMvaW5j bHVkZS9ub2xpYmMvc3RkbGliLmgKaW5kZXggYmFjZmQzNWM1MTU2Li41YmU5ZDNjNzQzNWEg MTAwNjQ0Ci0tLSBhL3Rvb2xzL2luY2x1ZGUvbm9saWJjL3N0ZGxpYi5oCisrKyBiL3Rvb2xz L2luY2x1ZGUvbm9saWJjL3N0ZGxpYi5oCkBAIC0xODUsNyArMTg1LDcgQEAgdm9pZCAqcmVh bGxvYyh2b2lkICpvbGRfcHRyLCBzaXplX3QgbmV3X3NpemUpCiAJaWYgKF9fYnVpbHRpbl9l eHBlY3QoIXJldCwgMCkpCiAJCXJldHVybiBOVUxMOwogCi0JbWVtY3B5KHJldCwgaGVhcC0+ dXNlcl9wLCBoZWFwLT5sZW4pOworCW1lbWNweShyZXQsIGhlYXAtPnVzZXJfcCwgdXNlcl9w X2xlbik7CiAJbXVubWFwKGhlYXAsIGhlYXAtPmxlbik7CiAJcmV0dXJuIHJldDsKIH0KZGlm ZiAtLWdpdCBhL3Rvb2xzL2luY2x1ZGUvbm9saWJjL3N0cmluZy5oIGIvdG9vbHMvaW5jbHVk ZS9ub2xpYmMvc3RyaW5nLmgKaW5kZXggYTAxYzY5ZGQ0OTVmLi5mOWFiMjg0MjFlNmQgMTAw NjQ0Ci0tLSBhL3Rvb2xzL2luY2x1ZGUvbm9saWJjL3N0cmluZy5oCisrKyBiL3Rvb2xzL2lu Y2x1ZGUvbm9saWJjL3N0cmluZ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