Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2089152rwl; Thu, 6 Apr 2023 05:52:10 -0700 (PDT) X-Google-Smtp-Source: AKy350a0Mh/3t1g3rSqMka9uN37M+Pw+jys1Rl7o90h9GTUySkYMuzgb2bw/pJCR2R47MT08tB14 X-Received: by 2002:a17:903:1c7:b0:19e:8267:9590 with SMTP id e7-20020a17090301c700b0019e82679590mr12281953plh.41.1680785530366; Thu, 06 Apr 2023 05:52:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680785530; cv=none; d=google.com; s=arc-20160816; b=LCL/l9ZrSPmMky7hIiVUFLA+JjrHzNFBwl/ltzZp2zjQ5egmQkWrLJdjSeC9mauXPh J2Co3LU4j51mP2RDROCSKMbTwpSyY484FuKYuDfSwBR20iNyKAaaV4/DOhKBPFLE4/pD fskRm1QUwXQQZcXmrMnTQ8Qpn+Z8+eOLc2ccaDSx0YES0cLhTVNNs/FHSGBDlnM1B4IU /+wnIW1+fslI6hovao/B5jRvVqXr5DAi5hNFUcfNDwQtpF6UKZ61vnZHAktP5U3H7Xlf 7r5JvFQWabqKDQkKlhXwQTFyMGBxBWHdBsmAwYB6BrnVIjaDXuB+3Lr+xIPdJH4yGZs5 ehHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature:dkim-signature; bh=3C5gkwQ1NumD7u6UGVet6+3BAdJ6qwcljpnsMyFFlyE=; b=EL2pK5NIhx/b93Slfj434Ujj6YBx6LN/3/Gk8w4pqUDh+62pGp8XmgoXTpbC82x7aV zXAGrBNBWQ7ScnpsQWEG1jpVsB1NtEHvgQSMmkLC6h/XUtNd0/hviIVFZ7KqtijVG73p 6BmXL6Xd/pqiGC0O9We2Q4EG13+17SrlwdXCq+A58AST0QtousRUe6GTmRTZPOjBF81B Osv8AvIwEdNPQPOKU5cxR7E8Iu/fELxpyGjP3F0rC/91JSRLmj/+tSCvGcpHO6llbBK+ nX+G6yQSLX0pS3L09jbUD+I2iyxzNjtqyiGxFWWfIG0Ar02zQuQqXKaYrSluHgRMmGQ+ fd2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=zFfqBs79; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iw19-20020a170903045300b0019e6e61c1bcsi1563892plb.9.2023.04.06.05.51.58; Thu, 06 Apr 2023 05:52:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=zFfqBs79; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238063AbjDFMsr (ORCPT + 99 others); Thu, 6 Apr 2023 08:48:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237993AbjDFMsR (ORCPT ); Thu, 6 Apr 2023 08:48:17 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C368511C for ; Thu, 6 Apr 2023 05:48:15 -0700 (PDT) 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 73ED21F895; Thu, 6 Apr 2023 12:48:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1680785294; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3C5gkwQ1NumD7u6UGVet6+3BAdJ6qwcljpnsMyFFlyE=; b=zFfqBs79etl2Qew8xWUBpcjC2YS5HzeKEFhoTzDEQH5kMmk2GU6+LPw0Eq31I1eW90hc0y aEfQn7ClQNJjUW8oL1NXz8/iU+ZQA2CSJqNQIGleAfTC3NThSCgieTVUFa1FnQTjHb0ep2 S4XuviF68XyNDON0ax6khKM05AAm+II= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1680785294; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3C5gkwQ1NumD7u6UGVet6+3BAdJ6qwcljpnsMyFFlyE=; b=wnaEcb4fdgIUGmurtLSE0lUWHOr+VemWMxldkBQXiEYlfRcjgxScXFYI/OWp1z44Osrn/g HVe7ilsTwNwMzeCw== 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 25723133E5; Thu, 6 Apr 2023 12:48:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 6CsDCI6/LmTPcwAAMHmgww (envelope-from ); Thu, 06 Apr 2023 12:48:14 +0000 Date: Thu, 6 Apr 2023 14:48:12 +0200 From: Petr Vorel To: Arnd Bergmann Cc: Naresh Kamboju , open list , LTP List , llvm@lists.linux.dev, chrubis , Nathan Chancellor , Anders Roxell , Daniel =?iso-8859-2?Q?D=EDaz?= , Benjamin Copeland , Tudor Cretu Subject: Re: LTP: list of failures on 32bit and compat mode Message-ID: <20230406124812.GA1589248@pevik> Reply-To: Petr Vorel References: <96b67ae8-98dd-40fe-9dde-302e09d12551@app.fastmail.com> <20230406105646.GB1545779@pevik> <7234b8ab-db5c-4f4a-bb9e-ddef9f1a50d3@app.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7234b8ab-db5c-4f4a-bb9e-ddef9f1a50d3@app.fastmail.com> X-Spam-Status: No, score=-1.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_SOFTFAIL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, > On Thu, Apr 6, 2023, at 12:56, Petr Vorel wrote: > >> On Thu, Apr 6, 2023, at 11:11, Naresh Kamboju wrote: > >> > mq_timedreceive01 > >> > mq_timedreceive01.c:197: TPASS: mq_timedreceive() failed expectedly: EINTR (4) > >> > tst_test.c:1581: TBROK: Test killed by SIGSEGV! > >> I think this is the same problem as fstatfs02, where ltp passes > >> an invalid pointer and expects EFAULT, but musl touches the data > >> first in order to do the time64 conversion. Needs the same fix. > > FYI mq_timedreceive01 is broken on 32bit systems with glibc > > (in current LTP master): > > EINTR (4) > > tst_test.c:1618: TBROK: Test killed by SIGSEGV! > Right, I see this has the same time64 logic as musl now. > >> > recvmmsg01.c:92: TPASS: recvmmsg() overflow in nanoseconds in timeout > >> > : EINVAL (22) > >> > tst_test.c:1581: TBROK: Test killed by SIGSEGV! > >> Same time64 conversion issue as above. > > Besides the same problem with shm permissions on musl I see SIGSEGV also on > > 64bit musl on current LTP master. > Ah, I see. This must be the padding code then, not the time64 > conversion: > +int recvmmsg(int fd, struct mmsghdr *msgvec, unsigned int vlen, unsigned int flags, struct timespec *timeout) > +{ > +#if LONG_MAX > INT_MAX > + struct mmsghdr *mh = msgvec; > + unsigned int i; > + for (i = vlen; i; i--, mh++) > + mh->msg_hdr.__pad1 = mh->msg_hdr.__pad2 = 0; > +#endif I suppose this is a suggestion for fix in LTP. I'd expect is should go into testcases/kernel/syscalls/sendmmsg/sendmmsg_var.h into static inline int sys_recvmmsg(...) But that at least on glibc 64bit compilation does not see __pad1 member: ../sendmmsg/sendmmsg_var.h: In function ‘sys_recvmmsg’: ../sendmmsg/sendmmsg_var.h:47:28: error: ‘struct msghdr’ has no member named ‘__pad1’ 47 | mh->msg_hdr.__pad1 = mh->msg_hdr.__pad2 = 0; | ^ Kind regards, Petr > Arnd