Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3395879rwb; Mon, 3 Oct 2022 14:28:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6v82dod8U2qzUwVYa+hSJnfhZZKj5dFWS9Xoh+Gxh3Cpp935oGpGufv3MfJaliBETP7mcV X-Received: by 2002:a63:c111:0:b0:439:103a:6c31 with SMTP id w17-20020a63c111000000b00439103a6c31mr20422610pgf.149.1664832517594; Mon, 03 Oct 2022 14:28:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664832517; cv=none; d=google.com; s=arc-20160816; b=tHvO8lfSRBbj/McYv66atERyU4tAaoyUKCtndezxAc0U8vl+9jHe+Rnif6eu2TxsWc fp1hPoHhbfbzPd5kIlF7xIltIobdtvbfHJecwk7tlC6bwmLWWoN+e6hKF7KJDybm6ngV QAYpSQ00X1nVtpm1CoYV7P6AGQYe4vX6qebx8t7yCk7JBCnwdOU39KNQMEkm790zhrho BlT3zyNWtAIHFzST5F/sptPRqHyLJiOyQePbvBnrohUPoozLBkoOXZF2ad/DMLGR3eEI pQLBgkblbqaVzhs3OP29oIww+MoYOE0KDno41odi5Gck/y7qOdsF7Q6eZtCLxGYN5fAk 0cFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=scFhK2ca/dh+TsnsQx5OXd5NtkolFzXSMOzjSlSU430=; b=Wcy4JZ2RHcRqIxD5lOzHXtUrRRoTp+SZUpWleYk3GXiXpfxgx6VeH9FEqlEJu3SHo/ 4Uk9JcItcFNCDWW9K5Q6nGyNX/QAUGge3pUQ/ZbnW+qQN04Ng4z4dXFdK4rto9qXXdYd HQ1CC/nT+gDmd5UVDZT48iWQIi6UpmNbhhrcEVP5Fmt7h/zgwLNXSrax6g0eflu8HkKY c7XR2zC/htTTMoaxLhpmjKhEhBinfcuMPjOAqkNM2t8mij59ImeJVr0rKRWC3ybq85+0 dmUFL01yOON+4naRXqNeygj+rhGDMu2h+FjPPUIW+UE2REU8oy3lj+P3GkPxXHFOpz2t KOyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=SXo8NeGf; 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 t17-20020a056a0021d100b0052da2ea956csi11227930pfj.371.2022.10.03.14.28.25; Mon, 03 Oct 2022 14:28:37 -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=@linux-foundation.org header.s=korg header.b=SXo8NeGf; 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 S229795AbiJCV1f (ORCPT + 99 others); Mon, 3 Oct 2022 17:27:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229713AbiJCV1L (ORCPT ); Mon, 3 Oct 2022 17:27:11 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4F295BC0D for ; Mon, 3 Oct 2022 14:17:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 81B6AB815FB for ; Mon, 3 Oct 2022 21:17:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3F4FC433D6; Mon, 3 Oct 2022 21:17:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1664831833; bh=R79UHR49+cXdxY8Lzokv7OALE2VQe1R1YCemJrDV0ww=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SXo8NeGfnawnAbcWrPKG3bJGNF/FPDIQJz5mRJjcmarNGdWkqJAQM7NoLHRXFFCZd gZjhHq5zbZs9UsGgfMDVJCyOkhretNMQ8kgHtDudzcoJgQUrlUmqe6/OVKrrTWPPuI WhBrQFeI093tvqpVEJs9cwpW3wipxIY2eNBQYJ0U= Date: Mon, 3 Oct 2022 14:17:12 -0700 From: Andrew Morton To: Akinobu Mita Cc: Wei Yongjun , Nathan Chancellor , Peter Zijlstra , Kees Cook , Nick Desaulniers , Josh Poimboeuf , Dan Williams , Miguel Ojeda , Isabella Basso , Vlastimil Babka , Rasmus Villemoes , LKML Subject: Re: [PATCH 3/4 -next] fault-injection: make some stack filter attrs more readable Message-Id: <20221003141712.ff7aceb8e29073f3aa9be2ec@linux-foundation.org> In-Reply-To: References: <20220817080332.1052710-1-weiyongjun1@huawei.com> <20220817080332.1052710-4-weiyongjun1@huawei.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On Fri, 19 Aug 2022 22:24:10 +0900 Akinobu Mita wrote: > 2022年8月17日(水) 16:45 Wei Yongjun : > > > > Attributes of stack filter are show as unsigned decimal, such > > as 'require-start', 'require-end'. This patch change to > > show them as unsigned hexadecimal for more readable. > > > > Before: > > $ echo 0xffffffffc0257000 > /sys/kernel/debug/failslab/require-start > > $ cat /sys/kernel/debug/failslab/require-start > > 18446744072638263296 > > > > After: > > $ echo 0xffffffffc0257000 > /sys/kernel/debug/failslab/require-start > > $ cat /sys/kernel/debug/failslab/require-start > > 0xffffffffc0257000 > > > > Signed-off-by: Wei Yongjun > > --- > > lib/fault-inject.c | 16 ++++++++++++---- > > 1 file changed, 12 insertions(+), 4 deletions(-) > > > > diff --git a/lib/fault-inject.c b/lib/fault-inject.c > > index 515fc5aaf032..deca05e7c9b3 100644 > > --- a/lib/fault-inject.c > > +++ b/lib/fault-inject.c > > @@ -179,6 +179,14 @@ static void debugfs_create_ul(const char *name, umode_t mode, > > > > #ifdef CONFIG_FAULT_INJECTION_STACKTRACE_FILTER > > > > +DEFINE_SIMPLE_ATTRIBUTE(fops_xl, debugfs_ul_get, debugfs_ul_set, "0x%llx\n"); > > + > > +static void debugfs_create_xl(const char *name, umode_t mode, > > + struct dentry *parent, unsigned long *value) > > +{ > > + debugfs_create_file(name, mode, parent, value, &fops_xl); > > +} > > How about using an existing `debugfs_create_xul()` instead of defining > a local helper function? Could we please have a response to this?