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 X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5134C433E6 for ; Mon, 18 Jan 2021 10:02:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6B0B5221FF for ; Mon, 18 Jan 2021 10:02:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B0B5221FF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D15078D000F; Mon, 18 Jan 2021 05:02:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CEC698D0002; Mon, 18 Jan 2021 05:02:21 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BD9F08D000F; Mon, 18 Jan 2021 05:02:21 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0237.hostedemail.com [216.40.44.237]) by kanga.kvack.org (Postfix) with ESMTP id A52BF8D0002 for ; Mon, 18 Jan 2021 05:02:21 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 620BE6D6E for ; Mon, 18 Jan 2021 10:02:21 +0000 (UTC) X-FDA: 77718455682.26.gold42_0f034ab27548 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 261341804B669 for ; Mon, 18 Jan 2021 10:02:21 +0000 (UTC) X-HE-Tag: gold42_0f034ab27548 X-Filterd-Recvd-Size: 5258 Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Mon, 18 Jan 2021 10:02:20 +0000 (UTC) Received: by mail-pg1-f177.google.com with SMTP id c132so10635982pga.3 for ; Mon, 18 Jan 2021 02:02:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=u0FOmzDZmk+RTcNWhNFAwsw/QXvXPx1t1kmnlGL7Ml4=; b=pQ8CHoBpqH/kB2/AsbSyH/z6bRNRXb5zD9PTlyEBiEjpxwXT4IWVUTzutdnUMpezWD 9kLTG+21uaWeYk4vgwV3JiBIVVWHsUwVRAojA4WGKJ5/TNA/trvDDlGiltGAhAIv6nb/ DvdafN+nZBiqN1oqB3F6KH3KGXrSsDD6E1910g3ZGlgpskMlhyXU/gwVDB9WHY5r3fCY QGFRZ6YqEhUO8MgxK4WgG+XBEXUyDhDcUzKQF/25635P72VSRFXkvHuqnxrxUbSg4DFa RKsx6yelS6q8bIRlvje/OG2vuaI8plyiEHDfGtFxFccHRod4yhfqHfsyiZQtvO8e5Nwi +puQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=u0FOmzDZmk+RTcNWhNFAwsw/QXvXPx1t1kmnlGL7Ml4=; b=KXCthJx5Wk/j2cXXnjgreOmeYYLsNhKHLTY84VzXGKjmnWVeTgOF2iy2ecCiHb6e2n Lhdh5yG/oW7AHiuqhvB6QYeteHaaqSdN3Sh9kkdKiL1lVcYAkeR4nmUFr6RHYxlI39Cl kiui/xQpgMJG4Vv3kbOfIl0rfm6TRbdre9BB/4y0OgXkrwJ+rtKFY1h3VwkpcFOYZ1vC VGcrxa56wol8aCye6vIDqJIOAlt3Q0zfGMsFiXmBIYcAVknyz1ufDPsOTLIFqwsukbdU SFkjE5eoUkV+Gv7jftBobjJ0V3pws4PtZDUEDDY9jqmMDdxz+lNkbMY53I9ugP6P53Wa N0tA== X-Gm-Message-State: AOAM532qW1f6YL0U3OIGPS5v84qBFXx31QLdQZYSA7Q+m3+MmFv/0LJh AEacwObESmz8J2gDPY5+mnfnPWrgQulpNGOkRQg= X-Google-Smtp-Source: ABdhPJySPSGdHUH+ZvJKOjKcaZ4mf37K5+6HxotmPOlywyp6HnN7j4tELiDqh3CPosgIggQSBwqjLqN5PPKmpcQPFUg= X-Received: by 2002:a63:4b16:: with SMTP id y22mr25224503pga.203.1610964139615; Mon, 18 Jan 2021 02:02:19 -0800 (PST) MIME-Version: 1.0 References: <20210116220950.47078-1-timur@kernel.org> <20210116220950.47078-2-timur@kernel.org> In-Reply-To: <20210116220950.47078-2-timur@kernel.org> From: Andy Shevchenko Date: Mon, 18 Jan 2021 12:03:08 +0200 Message-ID: Subject: Re: [PATCH 1/2] [v2] lib/hexdump: introduce DUMP_PREFIX_UNHASHED for unhashed addresses To: Timur Tabi Cc: Andrew Morton , Linux Kernel Mailing List , Linus Torvalds , Sergey Senozhatsky , Petr Mladek , roman.fietze@magna.com, Kees Cook , Steven Rostedt , John Ogness , linux-mm , Akinobu Mita , Alexander Viro , Andy Shevchenko , Vaibhav Jain , Dan Williams , Linux FS Devel Content-Type: text/plain; charset="UTF-8" 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 Sun, Jan 17, 2021 at 12:12 AM Timur Tabi wrote: (Hint: -v to the git format-patch will create a versioned subject prefix for you automatically) > Hashed addresses are useless in hexdumps unless you're comparing > with other hashed addresses, which is unlikely. However, there's > no need to break existing code, so introduce a new prefix type > that prints unhashed addresses. Any user of this? (For the record, I don't see any other mail except this one) ... > enum { > DUMP_PREFIX_NONE, > DUMP_PREFIX_ADDRESS, > - DUMP_PREFIX_OFFSET > + DUMP_PREFIX_OFFSET, > + DUMP_PREFIX_UNHASHED, Since it's an address, I would like to group them together, i.e. put after DUMP_PREFIX_ADDRESS. Perhaps even add _ADDRESS to DUMP_PREFIX_UNHASHED, but this maybe too long. > }; ... > + * @prefix_type: controls whether prefix of an offset, hashed address, > + * unhashed address, or none is printed (%DUMP_PREFIX_OFFSET, > + * %DUMP_PREFIX_ADDRESS, %DUMP_PREFIX_UNHASHED, %DUMP_PREFIX_NONE) Yeah, exactly, here you use different ordering. ... > + * @prefix_type: controls whether prefix of an offset, hashed address, > + * unhashed address, or none is printed (%DUMP_PREFIX_OFFSET, > + * %DUMP_PREFIX_ADDRESS, %DUMP_PREFIX_UNHASHED, %DUMP_PREFIX_NONE) In both cases I would rather use colon and list one per line. What do you think? ... > + case DUMP_PREFIX_UNHASHED: Here is a third type of ordering, can you please be consistent? > case DUMP_PREFIX_ADDRESS: ... > + * @prefix_type: controls whether prefix of an offset, hashed address, > + * unhashed address, or none is printed (%DUMP_PREFIX_OFFSET, > + * %DUMP_PREFIX_ADDRESS, %DUMP_PREFIX_UNHASHED, %DUMP_PREFIX_NONE) As above. ... > + case DUMP_PREFIX_UNHASHED: As above. > case DUMP_PREFIX_ADDRESS: -- With Best Regards, Andy Shevchenko