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 EF93C3858C83 for ; Tue, 15 Feb 2022 16:49:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EF93C3858C83 Received: by mail-pf1-x435.google.com with SMTP id d187so35790037pfa.10 for ; Tue, 15 Feb 2022 08:49:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4YqfjcERDhtxYxO+ELcvnUolhZpZgpemdKLVS5+n7S0=; b=r6eeEjpeXaEI6L22lLrcXmgNzm3i0ZaFQc1zc83+3gk16DGohjjOx0ONXWEnvy4wyn 4P63IPvRUxoXWdBqAjrfHCfC8sS5kUiQstW4X6Dl4bUjfstSC3XnYjVAYHrIQQMvbPys Hxunbg9tvRUYTF/i1uXt8xlI6EAY/r5xttdiuBXFpldzMNGbnvJ4X8AlNONZtzxPEj3G A+eljMr7zIW6WsX0j5VadXc1x+fEUU6DAHKOOm8HfRCqFI7wKjNL9+jTOJ6TEwOYEN0+ 4QyiMZzsYA7Y812JTfAhzmpxTQ60FH3PiN79UeRKkJPd/OqcxuvvpsWzFbqCX8INdA6r v4Lw== X-Gm-Message-State: AOAM531m5WuzJwD582k6R9tLmVigoJKCMFOxwVmHbfrDVC3E8Nj2pfL9 aIKaUXJuVhnrH7ojluENT1KvRY1+M73LxTxjELI= X-Google-Smtp-Source: ABdhPJz8sh7bXTm8HyIG52G9DcduG5a10YcSI9jbLq3Nci6I3wQLCUcnSHatD06AW7RKPryjhzXm07xO5tQWJ9V3Pm0= X-Received: by 2002:a05:6a00:23d0:: with SMTP id g16mr5183540pfc.19.1644943757113; Tue, 15 Feb 2022 08:49:17 -0800 (PST) MIME-Version: 1.0 References: <20220215162829.282223-1-goldstein.w.n@gmail.com> <878rucm5yq.fsf@igel.home> In-Reply-To: <878rucm5yq.fsf@igel.home> From: Noah Goldstein Date: Tue, 15 Feb 2022 10:49:06 -0600 Message-ID: Subject: Re: [PATCH v1] x86: Fix bug in strncmp-evex and strncmp-avx2 [BZ #28895] To: Andreas Schwab Cc: Noah Goldstein via Libc-alpha Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: Tue, 15 Feb 2022 16:49:19 -0000 On Tue, Feb 15, 2022 at 10:48 AM Andreas Schwab wrote: > > On Feb 15 2022, Noah Goldstein via Libc-alpha wrote: > > > diff --git a/string/test-strncmp.c b/string/test-strncmp.c > > index 831cb77893..501055de0c 100644 > > --- a/string/test-strncmp.c > > +++ b/string/test-strncmp.c > > @@ -423,6 +423,29 @@ check3 (void) > > } > > } > > > > + > > +static void > > +check4 (void) > > +{ > > + /* To trigger bug 28895; We need 1) both s1 and s2 to be within 32 bytes of > > + the end of the page. 2) For there to be no mismatch/null byte before the > > + first page cross. 3) For length (`n`) to be large enough for one string to > > + cross the page. And 4) for there to be either mismatch/null bytes before > > + the start of the strings. */ > > + > > + size_t size = 10; > > + CHAR *s1 = (CHAR *)(buf1 + (getpagesize () & 0xffa) / sizeof (CHAR)); > > + CHAR *s2 = (CHAR *)(buf2 + (getpagesize () & 0xfed) / sizeof (CHAR)); > > s/&/-/ ? > > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 > "And now for something completely different."