From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3A2DC433FE for ; Fri, 22 Apr 2022 14:23:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8439A6B0075; Fri, 22 Apr 2022 10:23:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7F23C6B0078; Fri, 22 Apr 2022 10:23:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6B9966B007B; Fri, 22 Apr 2022 10:23:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id 5BF506B0075 for ; Fri, 22 Apr 2022 10:23:55 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 24C386CD for ; Fri, 22 Apr 2022 14:23:55 +0000 (UTC) X-FDA: 79384734030.01.B7477E8 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf29.hostedemail.com (Postfix) with ESMTP id 46B3B12002D for ; Fri, 22 Apr 2022 14:23:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650637434; h=from:from:reply-to:subject:subject: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=m5YJ3ZOangNrQFwe/N/MOLWQjBg4jctW+Ug/shMSmLs=; b=BFZBMjpFv6FjBUQLpNo7q9DcOVf4H+vrcIDmWc4R3jrPrFVKew5Melqr+Hq8YFJQPakd6w zuLQBv+4OI0V7+rWOjAIVncWOH6QpDEIJX4WsPTi7gQG99xRPpdy32M/StkNCH30lqCDol xfg7ucKAdl7vQaPqslQi8wX5+bJ3sxc= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-357-hQ8vhWe3P_2AupTD_w9VnQ-1; Fri, 22 Apr 2022 10:23:52 -0400 X-MC-Unique: hQ8vhWe3P_2AupTD_w9VnQ-1 Received: by mail-qv1-f72.google.com with SMTP id k10-20020ad45bea000000b0044c3ec9f75cso4487350qvc.4 for ; Fri, 22 Apr 2022 07:23:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=m5YJ3ZOangNrQFwe/N/MOLWQjBg4jctW+Ug/shMSmLs=; b=Otao73bidCMNMp4QylfQG7Kv7eU7tVI3yj/mEE43aLD9Nx4DxXEp4/OAxi+cNdHt9g Y2UHgttPopQ0M1aJkO7vWpEkaVTjFSrQCNMd9u1+uZ7wMI+gwuavuTza1Nh691O4Y9BQ Ojk7ofnQkKS9tTIoezf04cImmmltrOrN+t9TVvw3doUisKGsRzDMeTrfJfSwooQ/Mp4t Exwc/ZGfDY2cTN6ArNSlxcwC4ohsoZgZWvlxjTjkTuCwsjoh3sD275l0VFowgmaCdlq5 2+amVHmgHR6uHGy+Z6JUnjPywZuLvJc8luT7jzRoqxXQiRTfyCHx3rIWiXSyXS70zD4Y Bmyg== X-Gm-Message-State: AOAM532EdOt/yaWxzG7TuWBsOMm35r6bPi2K1niUqESXXP7cbxLodh4s kHOhfmUl4SsvCSaTZqAiTzin6q2kU0+4ySDcPqn1tFnhQisOEDZF6eQSYR2+ONKN+jlFw3NSrCh jIKklWFtoiwY= X-Received: by 2002:ad4:594c:0:b0:449:95d6:d715 with SMTP id eo12-20020ad4594c000000b0044995d6d715mr3786542qvb.115.1650637432239; Fri, 22 Apr 2022 07:23:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeLkSB2S0gw2q64KND3DSjWD8vVsfApjfMfd+LxLs9iSGd95VAE5w8kpdBoELJg6WEgj6y/Q== X-Received: by 2002:ad4:594c:0:b0:449:95d6:d715 with SMTP id eo12-20020ad4594c000000b0044995d6d715mr3786530qvb.115.1650637432046; Fri, 22 Apr 2022 07:23:52 -0700 (PDT) Received: from ?IPV6:2600:1700:5610:6e80::41? ([2600:1700:5610:6e80::41]) by smtp.gmail.com with ESMTPSA id o21-20020a37a515000000b0069e6c84e8basm967409qke.117.2022.04.22.07.23.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Apr 2022 07:23:51 -0700 (PDT) Message-ID: <90124b02-76b5-d775-ac7d-a2e9d7677fa1@redhat.com> Date: Fri, 22 Apr 2022 10:23:50 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [RFC 2/3] futex: exit: Print a warning when futex_cleanup fails To: Thomas Gleixner Cc: Andrew Morton , Ingo Molnar , Peter Zijlstra , Darren Hart , Davidlohr Bueso , =?UTF-8?Q?Andr=c3=a9_Almeida?= , Arjan van de Ven , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Matthew Wilcox References: <20220421190533.1601879-1-npache@redhat.com> <20220421190533.1601879-3-npache@redhat.com> <87r15qrwdt.ffs@tglx> From: Nico Pache In-Reply-To: <87r15qrwdt.ffs@tglx> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=BFZBMjpF; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf29.hostedemail.com: domain of npache@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=npache@redhat.com X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 46B3B12002D X-Stat-Signature: 79wytmf69g8u4tbkfku3u7gmrf3umopw X-HE-Tag: 1650637433-693690 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 4/21/22 16:53, Thomas Gleixner wrote: > On Thu, Apr 21 2022 at 15:05, Nico Pache wrote: > >> The futex_cleanup routines currently fails silently. >> >> Allow the futex_cleanup routines to fail more verbosely so we can >> leave a message behind for easier debugging/error detecting. > > This is a free ticket to spam dmesg for any unpriviledged user. As Matthew pointed out, we'd want to rate limit this. I was also thinking we can limit this to debug kernels so unpriviledged users can not cause dmesg spamming in production configs. > >> Fixes: 0771dfefc9e5 ("[PATCH] lightweight robust futexes: core") > > There is nothing to fix, really. Fair enough, its been part of the design since inceptions. > > Robust futexes are best effort as I explained you before and spamming > dmesg won't help anything. It would have helped find the OOM/Robust Futex issue more quickly. It may also help detect breakages in the pthread code (or any other users of robust futex) if someone is doing something incorrectly. Just a thought though. If you think its pointless to proceed down this path I wont push forward. Cheers, -- Nico