From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28706 invoked from network); 11 Apr 2023 12:57:41 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 11 Apr 2023 12:57:41 -0000 Received: (qmail 32003 invoked by uid 550); 11 Apr 2023 12:57:38 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 31960 invoked from network); 11 Apr 2023 12:57:37 -0000 Date: Tue, 11 Apr 2023 14:57:24 +0200 From: Szabolcs Nagy To: Rich Felker Cc: =?utf-8?B?5byg6aOe?= , "A. Wilcox" , musl@lists.openwall.com Message-ID: <20230411125724.GL3630668@port70.net> Mail-Followup-To: Rich Felker , =?utf-8?B?5byg6aOe?= , "A. Wilcox" , musl@lists.openwall.com References: <3e056826.7b26.18707fad3e2.Coremail.zhangfei@nj.iscas.ac.cn> <20230322121529.GV4163@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230322121529.GV4163@brightrain.aerifal.cx> Subject: Re: [musl] [PATCH]Implementation of strlen function in riscv64 architecture * Rich Felker [2023-03-22 08:15:30 -0400]: > Regarding the code submitted for review, I'm pretty sure it's buggy > because it doesn't seem to do anything with alignment. If you pass it > a pointer to the last byte of a page whose contents are zero, it will > attempt to load the rest of the vector from the next page, and fault. the aarch64 sve isa extension has 'first faulting register' mask and there are load/store instructions that set it instead of actually faulting when a vector goes off at the end of a page. i suspect riscv copied this piece of architecture (as well as the variable vector length).