From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 01D7F3858C3A for ; Wed, 20 Oct 2021 07:33:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 01D7F3858C3A Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-278-0ObcP7TnOhCdj6ZB3NDXQA-1; Wed, 20 Oct 2021 03:33:33 -0400 X-MC-Unique: 0ObcP7TnOhCdj6ZB3NDXQA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9FE9F802575; Wed, 20 Oct 2021 07:33:32 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.194.104]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4A9DE69FA0; Wed, 20 Oct 2021 07:33:31 +0000 (UTC) From: Florian Weimer To: Joseph Myers Cc: Subject: Re: [PATCH v2] Correct access attribute on memfrob (bug 28475) References: <87v91syew0.fsf@oldenburg.str.redhat.com> Date: Wed, 20 Oct 2021 09:33:29 +0200 In-Reply-To: (Joseph Myers's message of "Tue, 19 Oct 2021 20:56:03 +0000") Message-ID: <87pms0xi9i.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Wed, 20 Oct 2021 07:33:36 -0000 * Joseph Myers: > diff --git a/elf/tst-execstack-needed.c b/elf/tst-execstack-needed.c > index 8b794a3d47..85078e40ef 100644 > --- a/elf/tst-execstack-needed.c > +++ b/elf/tst-execstack-needed.c > @@ -26,7 +26,7 @@ static void > deeper (void (*f) (void)) > { > char stack[1100 * 1024]; > - memfrob (stack, sizeof stack); > + explicit_bzero (stack, sizeof stack); > (*f) (); > memfrob (stack, sizeof stack); > } > diff --git a/elf/tst-execstack-prog.c b/elf/tst-execstack-prog.c > index 8663153372..1b34bb5597 100644 > --- a/elf/tst-execstack-prog.c > +++ b/elf/tst-execstack-prog.c > @@ -25,7 +25,7 @@ static void > deeper (void (*f) (void)) > { > char stack[1100 * 1024]; > - memfrob (stack, sizeof stack); > + explicit_bzero (stack, sizeof stack); > (*f) (); > memfrob (stack, sizeof stack); > } > diff --git a/elf/tst-execstack.c b/elf/tst-execstack.c > index 114f341d76..7e898b4f58 100644 > --- a/elf/tst-execstack.c > +++ b/elf/tst-execstack.c > @@ -227,7 +227,7 @@ static void > deeper (void (*f) (void)) > { > char stack[1100 * 1024]; > - memfrob (stack, sizeof stack); > + explicit_bzero (stack, sizeof stack); > (*f) (); > memfrob (stack, sizeof stack); > } > diff --git a/string/string.h b/string/string.h > index 04e1b7067d..201d7e31c8 100644 > --- a/string/string.h > +++ b/string/string.h > @@ -495,7 +495,7 @@ extern char *strfry (char *__string) __THROW __nonnull ((1)); > > /* Frobnicate N bytes of S. */ > extern void *memfrob (void *__s, size_t __n) __THROW __nonnull ((1)) > - __attr_access ((__write_only__, 1, 2)); > + __attr_access ((__read_write__, 1, 2)); > > # ifndef basename > /* Return the file name within directory of FILENAME. We don't Patch looks good. Thanks, Florian