From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id 3D8B43846062 for ; Wed, 3 Apr 2024 11:46:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3D8B43846062 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3D8B43846062 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::435 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712144773; cv=none; b=jEgK7BaZnuz4XslrVITQ/bLZ/EwkxDkmojYNNTwK6Ikrl62fi39Yri9DAJ1dhzFhPBUuGn7keveuYUOmqEKGtWveAWnaq+5bDYuz6JBNIRwsuBWH9edt2y2wY/1U1e7NbYxE8lEQ9Ggc6rIsTGmD5lcmpZr/cwwlnxtqcnrJ7eE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712144773; c=relaxed/simple; bh=b+54bzX9ZftKJ7AzzKZBT44YRz80QwukiPyJ8GQVaQ8=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=LH6rDJtoPxCrd6fe2qihWbfcqbMn/eGoH6Z/KOG3I0edhJvzrV9KsQIOsMiN996NA8SoiriuyVYuHd3wFoQOVNVsALGgT5Ir9NUubEMOvxUkRHv3tetzlXFhV4fFV5+ttQ5VnD0DqxVK/C4fJ4YrwXXYF/4u9tkbb4r/0DGS9tE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-6ea8a0d1a05so581577b3a.1 for ; Wed, 03 Apr 2024 04:46:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712144768; x=1712749568; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=WiYZ9SKIUDxWgY8fj+0pHxfSu8clZ2UNoGfwpiyH5bI=; b=lW4LwT1EXqdEGJPGyrTjCHkK/JEyNYHgUcAoqcR4N5AJUDtfQ/K23aqF8LDwDI/XiL 2sq+nHJ88x9ki5HWU/pmZJso/oRentEjaM/UK7EgCXQ0MrK8qY7CdRj4oPik0e5UlO1O vbmiHrMsHFj2Oud6fsmCZrGLtUIyvTS1fSdwMQYJDe0sDMdXqMrZtUJm/uyW7hu4zPyN iyzKJd6Jsf3YcfGp7PwF44XwPIH3hInS2cqW53dTNS9uarUn+cG+GmQ2qb3mjY7+4ltr gG7KEEpRgJQskIdvW2QvQCbZkeddyTpkPuUe0xT25p3a8Ka6xrIUWOdOhQzp7UCxY9Zq KeHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712144768; x=1712749568; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WiYZ9SKIUDxWgY8fj+0pHxfSu8clZ2UNoGfwpiyH5bI=; b=wNGcopLgWMIKgAaziQtZ/QpL/NmTagIPkVXibVOvOFZwXrcK4gbFAd4t8oXDNX6zen icbJY02L2vXI7YA/QO67/SiJfMs3yANsOwTOBEMvLo+i7XmlidG1wUCE2OWL36NWjWK/ baCXaNXnbJaatTxa8H13Mu+75HYlTkgKEVMvOdxXoBJQ4AjkZm/v1JT1B/0dM7VSe0bO SuOXpTzwozUdGKm3zNFmFkuYQWauuOiz14nq6H3zbR626imvc1rud6YbWbVEDWUhzKm1 wL7qtfvHn/eCDmR6uHmkE9qbdhZXYDCqfJhXcZsocqibFroryQ42Ga2IXDSynMVSmoAD QYIA== X-Forwarded-Encrypted: i=1; AJvYcCVew5oWOr/F0Qn3bIUUfWTbAv5LFv+YF+xyzf5KL5MT7UJh7jqmIZpnyltRDJr0QbU1VY6vYdrLlw8ukPSqqHJMlMzHFBiaZEbz X-Gm-Message-State: AOJu0YwbwcP3q1TZr+nEnzyEl54RaIp3ht9F2Ne5CcC9+R1I2fX+OJ0F 6qQeDE2bRnYWpZafB+08BYT+rApMexVdm8aXVoppgEmCAycJatPOexCxLdF41e8bYvwRz5Tvw88 4 X-Google-Smtp-Source: AGHT+IF9RvVE/gSYvRMsvCue/MNIWmzs+sTUNFSEiUPqB25RqvsyD7ADTjwGszEkezlVg3HGFLXcmQ== X-Received: by 2002:a17:90b:ed0:b0:2a2:9d4c:2166 with SMTP id gz16-20020a17090b0ed000b002a29d4c2166mr1717678pjb.4.1712144768059; Wed, 03 Apr 2024 04:46:08 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c3:b18e:ec2c:788a:1fcc:a268? ([2804:1b3:a7c3:b18e:ec2c:788a:1fcc:a268]) by smtp.gmail.com with ESMTPSA id lk7-20020a17090b33c700b002a219f8079fsm9071603pjb.33.2024.04.03.04.46.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Apr 2024 04:46:07 -0700 (PDT) Message-ID: <536bde0e-2cd7-4752-bf09-c9a2d8085de1@linaro.org> Date: Wed, 3 Apr 2024 08:46:05 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] misc: Add support for Linux uio.h RWF_NOAPPEND flag To: Stafford Horne , GLIBC patches References: <20240403071354.3719942-1-shorne@gmail.com> Content-Language: en-US From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <20240403071354.3719942-1-shorne@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,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 List-Id: On 03/04/24 04:13, Stafford Horne wrote: > In Linux 6.9 a new flag is added to allow for Per-io operations to > disable append mode even if a file was opened with the flag O_APPEND. > This is done with the new RWF_NOAPPEND flag. > > This caused two test failures as these tests expected the flag 0x00000020 > to be unused. Adding the flag definition now fixes these tests on Linux > 6.9 (v6.9-rc1). > > FAIL: misc/tst-preadvwritev2 > FAIL: misc/tst-preadvwritev64v2 > > This patch adds the flag, adjusts the test and adds details to > documentation. > > Link: https://lore.kernel.org/all/20200831153207.GO3265@brightrain.aerifal.cx/ LGTM, thanks. Reviewed-by: Adhemerval Zanella > --- > Since v1: > - Fix subject grammar > - Fix issue with build being broken due to having 2 @end vtable clauses > in the .texi file. > > Cc: Adhemerval Zanella Netto > > As he mentioned he would be looking into it when this was mentioned in the > LoongArch TLS patch. > > https://sourceware.org/pipermail/libc-alpha/2024-March/155323.html > > This also was encountered during OpenRISC testing, and I found a fix. This has > been found before Linux 6.9 is actually released. I guess we should not merge > it to glibc until 6.9 is official. What is the policy on this? > > > manual/llio.texi | 4 ++++ > misc/tst-preadvwritev2-common.c | 5 ++++- > sysdeps/unix/sysv/linux/bits/uio-ext.h | 1 + > 3 files changed, 9 insertions(+), 1 deletion(-) > > diff --git a/manual/llio.texi b/manual/llio.texi > index 0b61d491f5..fae49d1433 100644 > --- a/manual/llio.texi > +++ b/manual/llio.texi > @@ -1339,6 +1339,10 @@ will fail and set @code{errno} to @code{EAGAIN} if the operation would block. > > @item RWF_APPEND > Per-IO synchronization as if the file was opened with @code{O_APPEND} flag. > + > +@item RWF_NOAPPEND > +This flag allows an offset to be honored, even if the file was opened with > +@code{O_APPEND} flag. > @end vtable > > When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the > diff --git a/misc/tst-preadvwritev2-common.c b/misc/tst-preadvwritev2-common.c > index b5f19f002c..8e04ff7282 100644 > --- a/misc/tst-preadvwritev2-common.c > +++ b/misc/tst-preadvwritev2-common.c > @@ -34,8 +34,11 @@ > #ifndef RWF_APPEND > # define RWF_APPEND 0 > #endif > +#ifndef RWF_NOAPPEND > +# define RWF_NOAPPEND 0 > +#endif > #define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT \ > - | RWF_APPEND) > + | RWF_APPEND | RWF_NOAPPEND) > > /* Generic uio_lim.h does not define IOV_MAX. */ > #ifndef IOV_MAX > diff --git a/sysdeps/unix/sysv/linux/bits/uio-ext.h b/sysdeps/unix/sysv/linux/bits/uio-ext.h > index 7854cccef3..ead7a09156 100644 > --- a/sysdeps/unix/sysv/linux/bits/uio-ext.h > +++ b/sysdeps/unix/sysv/linux/bits/uio-ext.h > @@ -47,6 +47,7 @@ extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec, > #define RWF_SYNC 0x00000004 /* per-IO O_SYNC. */ > #define RWF_NOWAIT 0x00000008 /* per-IO nonblocking mode. */ > #define RWF_APPEND 0x00000010 /* per-IO O_APPEND. */ > +#define RWF_NOAPPEND 0x00000020 /* per-IO negation of O_APPEND */ > > __END_DECLS >