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 999EAECAAD8 for ; Tue, 20 Sep 2022 08:19:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 08A6C80007; Tue, 20 Sep 2022 04:19:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 039F8940007; Tue, 20 Sep 2022 04:19:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E6A0280007; Tue, 20 Sep 2022 04:19:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id D8AF1940007 for ; Tue, 20 Sep 2022 04:19:28 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id ADCDD140849 for ; Tue, 20 Sep 2022 08:19:28 +0000 (UTC) X-FDA: 79931764416.25.E73209B Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf30.hostedemail.com (Postfix) with ESMTP id 6453D80003 for ; Tue, 20 Sep 2022 08:19:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663661967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5gk3kLlspQCYjPujhZljAtxcOT9dALJ6AajDjY8rEpQ=; b=T0UxvyxbENUyJcZdo8plbsL+pyOKGu3spClfV51K3U0zi94iWa2idntUmXYFnvIcmNXqnS 9wRJq6DFgAQAlQwNW8l73yV0COmiKREPo/Ef2gj4K0shYnNCw2zdTrgknjlEnT+4sLTAmd +g9ZQNfNGDmRhUGNm1CHSHR3M5Zf3Cg= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-503-TkstmrVqNhioy7ZNJ62wkg-1; Tue, 20 Sep 2022 04:19:26 -0400 X-MC-Unique: TkstmrVqNhioy7ZNJ62wkg-1 Received: by mail-wm1-f69.google.com with SMTP id t14-20020a1c770e000000b003b4856a6ecaso359543wmi.2 for ; Tue, 20 Sep 2022 01:19:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=5gk3kLlspQCYjPujhZljAtxcOT9dALJ6AajDjY8rEpQ=; b=Hqb/P613zQIXl3YESJXBhMm9miZB0iOJ6EWNvnhNxLtFKsv3rin0E7N6+GrYq7nPJi C4m061ynlTMQo8Yam68iL2ZrgRy6fTZl6nwC/3uCKL25Iq1OCn2RM+JJA32VSgYavzNS ywGnl4nxoBDjk60BTKT+GHrfuqzH5gtjuraVs0VZmsEICOMHxvlsTW0Ju0E7ZccQcsIK rfYbTGoP0jmTSnR3zP0YvmPhlUzAirvGoDGFF2vLaxfPDgxpzSMEXIf/bO62EF0uEFjV gGuVgkP7YndcpIfrf3KsrXjuirFKYN3Ro6YCxm8fRoNe+MIMv6OHcNzDQDrm1qYX2v48 +LNg== X-Gm-Message-State: ACrzQf2q+dkxUHfRjvdiV3gThZv6Xvx7B/KeM2ol+9u8Q2n+B5aHGK9D pFYQrIKbVD5GB5OK5Ar9d+vdOvSXRUFvw1Bp9pN3ly+ZY620XifLO6v7C5Z8zzPiTu2UeyDHPvl k3Wgk4sDC37U= X-Received: by 2002:a05:600c:5d3:b0:3b4:c326:d096 with SMTP id p19-20020a05600c05d300b003b4c326d096mr1455794wmd.98.1663661965721; Tue, 20 Sep 2022 01:19:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM699k74ssA2kGuvCCoIhZaRcQrvxVrQkbuqjTWhJzQr+8vhrPtqFiDe49El6iFxQE3O3R+O2w== X-Received: by 2002:a05:600c:5d3:b0:3b4:c326:d096 with SMTP id p19-20020a05600c05d300b003b4c326d096mr1455764wmd.98.1663661965297; Tue, 20 Sep 2022 01:19:25 -0700 (PDT) Received: from ?IPV6:2003:cb:c712:2300:e82d:5a58:4fd8:c1e6? (p200300cbc7122300e82d5a584fd8c1e6.dip0.t-ipconnect.de. [2003:cb:c712:2300:e82d:5a58:4fd8:c1e6]) by smtp.gmail.com with ESMTPSA id l9-20020a1ced09000000b003b49aa8083esm1325807wmh.42.2022.09.20.01.19.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Sep 2022 01:19:24 -0700 (PDT) Message-ID: Date: Tue, 20 Sep 2022 10:19:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH 3/3] debugfs: fix error when writing negative value to atomic_t debugfs file To: Akinobu Mita , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-fsdevel@vger.kernel.org, corbet@lwn.net, osalvador@suse.de, shuah@kernel.org, Zhao Gongyi , Wei Yongjun , Yicong Yang , Greg Kroah-Hartman , "Rafael J. Wysocki" , Alexander Viro , akpm@linux-foundation.org References: <20220919172418.45257-1-akinobu.mita@gmail.com> <20220919172418.45257-4-akinobu.mita@gmail.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20220919172418.45257-4-akinobu.mita@gmail.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663661968; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=5gk3kLlspQCYjPujhZljAtxcOT9dALJ6AajDjY8rEpQ=; b=aPyr9F/YkpG/q3eBJ9sRbEfFoi71l4LquT4lgmgFLU+2enolyjW5+OK++ulPgxQuuV867H 4B+sqPcUIQZqNGB6dtTiy4dBHUSYCchOIebruSHcKNaTTDzMKNrs8/oa7nmfcYo3lqDe6X TlqHCO2i9bCTf46cl/GMU8U2uJPPs7M= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=T0Uxvyxb; spf=pass (imf30.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663661968; a=rsa-sha256; cv=none; b=fCMgfeLoKXaBXXIndl1ylMHDp22DTElPsm6UP3s+PRO3nb3QmwcD1R14h2zi3eCv0pdx77 YIY2kwF8sJ3blG7xLvTbaIqBLT7/wOeu883QixFhzq12vA/HhWzuBSgpcntQUc/wSsjTyu teH3PX7m+6cKxexWJYsD2vQe4IFRfL0= Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=T0Uxvyxb; spf=pass (imf30.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam07 X-Stat-Signature: s717ascp74awm7jch5rxej3auorxqxjh X-Rspamd-Queue-Id: 6453D80003 X-Rspam-User: X-HE-Tag: 1663661968-878030 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 19.09.22 19:24, Akinobu Mita wrote: > The simple attribute files do not accept a negative value since the > commit 488dac0c9237 ("libfs: fix error cast of negative value in > simple_attr_write()"), so we have to use a 64-bit value to write a > negative value for a debugfs file created by debugfs_create_atomic_t(). Is that comment stale? I would ahve thought you simply document that we restore the original behavior essentially by reverting 005747526d4f ("docs: fault-injection: fix non-working usage of negative values") and the using DEFINE_DEBUGFS_ATTRIBUTE_SIGNED accordingly. > > This restores the previous behaviour by introducing > DEFINE_DEBUGFS_ATTRIBUTE_SIGNED for a signed value. > > Fixes: 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()") > Reported-by: Zhao Gongyi > Signed-off-by: Akinobu Mita Apart from that Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb