From patchwork Fri Aug 11 11:56:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1820247 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=nyFKX65f; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=VqxnAe0p; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RMj1M090Fz1yf7 for ; Fri, 11 Aug 2023 21:56:07 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id A66473CD07D for ; Fri, 11 Aug 2023 13:56:04 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [IPv6:2001:4b78:1:20::6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id D08933C89B6 for ; Fri, 11 Aug 2023 13:55:48 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id E3B5A1400153 for ; Fri, 11 Aug 2023 13:55:47 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6BD561F889 for ; Fri, 11 Aug 2023 11:55:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1691754946; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=lkTYn43T2JEl3k6KKkwbOemNgHWFRKNO/Ormq/wxb2Y=; b=nyFKX65fmQQw1L4GmDXqDjUHx7Xo0i9EjX6oFuoGG/AW67jbMeGmRMsrldGZ6LDVffxCPQ 2va3ZEN1rYnEuHgGHmLZ/t68AtagtmQzYC3KvDBw5DaMT1kTR9g6g2LY7auHNkYvcdzWAI X2HJFHvVr5frjcE9O2nAixTkuuHQfvw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1691754946; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=lkTYn43T2JEl3k6KKkwbOemNgHWFRKNO/Ormq/wxb2Y=; b=VqxnAe0pYRpIax1hvM8V7/stS3Q8E2nq1WMVjVh6EKpxWIZNgxsYWidHgDx6EqrTp2/lwY 0saAgFph0BXbyBAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 50D43138E2 for ; Fri, 11 Aug 2023 11:55:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ekAZE8Ih1mT0WgAAMHmgww (envelope-from ) for ; Fri, 11 Aug 2023 11:55:46 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Fri, 11 Aug 2023 13:56:40 +0200 Message-ID: <20230811115647.32387-1-chrubis@suse.cz> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 1.0.1 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH 0/6] Utility functions for string in guarded buffers X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" First patch adds utilitilty functions for strings in guarded buffers, which is followed by a few test conversions to the newly introduced API. Cyril Hrubis (6): lib: tst_buffers: Add bufs .str and tst_aprintf() syscalls/access04: Make use of guarded buffers syscalls/acct01: Make use of guarded buffers syscalls/chdir01: Make use use of guarded buffers syscalls/chmod01: Make use of guarded buffers syscalls/chroot03: Make use of guarded buffers include/tst_buffers.h | 11 +++ lib/tst_buffers.c | 28 ++++++- testcases/kernel/syscalls/access/access04.c | 36 ++++++--- testcases/kernel/syscalls/acct/acct01.c | 84 +++++++++++---------- testcases/kernel/syscalls/chdir/chdir01.c | 55 +++++++++----- testcases/kernel/syscalls/chmod/chmod01.c | 28 ++++--- testcases/kernel/syscalls/chroot/chroot03.c | 46 ++++++----- 7 files changed, 188 insertions(+), 100 deletions(-)