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 [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 0FD96383D028 for ; Wed, 30 Jun 2021 14:18:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0FD96383D028 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-603-xn4RdPP6PkOzGZWKoUvFPw-1; Wed, 30 Jun 2021 10:18:15 -0400 X-MC-Unique: xn4RdPP6PkOzGZWKoUvFPw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BD21C80430D for ; Wed, 30 Jun 2021 14:18:14 +0000 (UTC) Received: from localhost (ovpn-114-133.ams2.redhat.com [10.36.114.133]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF0995D6AD; Wed, 30 Jun 2021 14:18:07 +0000 (UTC) Date: Wed, 30 Jun 2021 15:18:06 +0100 From: "Richard W.M. Jones" To: Florian Weimer Cc: libc-alpha@sourceware.org, Siddhesh Poyarekar Subject: Re: [PATCH] Linux: Avoid calling malloc indirectly from __get_nprocs Message-ID: <20210630141806.GA19630@redhat.com> References: <87a6n7jvbe.fsf@oldenburg.str.redhat.com> MIME-Version: 1.0 In-Reply-To: <87a6n7jvbe.fsf@oldenburg.str.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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, 30 Jun 2021 14:18:26 -0000 For context: https://bugzilla.redhat.com/show_bug.cgi?id=1975693#c15 qemu uses a seccomp filter to block (probably incorrectly) sched_getaffinity, so this system call fails. Currently glibc believes this means that the buffer is too small and doubles it until it runs out of stack/memory and crashes. A patch is going to be submitted to qemu to remove the seccomp filter from this syscall, but it seems like glibc still shouldn't assume sched_getaffinity is always callable. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW