lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200406012453.tthxonovxzdzoluj@master>
Date:   Mon, 6 Apr 2020 01:24:53 +0000
From:   Wei Yang <richard.weiyang@...il.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Wei Yang <richard.weiyang@...il.com>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/9] XArray: entry in last level is not expected to be a
 node

On Mon, Mar 30, 2020 at 05:48:42AM -0700, Matthew Wilcox wrote:
>On Mon, Mar 30, 2020 at 12:36:39PM +0000, Wei Yang wrote:
>> If an entry is at the last level, whose parent's shift is 0, it is not
>> expected to be a node. We can just leverage the xa_is_node() check to
>> break the loop instead of check shift additionally.
>
>I know you didn't run the test suite after making this change.

Well, I got your point finally. From commit 76b4e5299565 ('XArray: Permit
storing 2-byte-aligned pointers'), xa_is_node() will not be *ACURATE*. Those
2-byte align pointers will be treated as node too.

Well, I found another thing, but not sure whether you have fixed this or not.

If applying following change

@@ -1461,6 +1461,11 @@ static void check_align_1(struct xarray *xa, char *name)
                                        GFP_KERNEL) != 0);
                XA_BUG_ON(xa, id != i);
        }
+       XA_STATE_ORDER(xas, xa, 0, 0);
+       entry = xas_find_conflict(&xas);
        xa_for_each(xa, index, entry)
                XA_BUG_ON(xa, xa_is_err(entry));
        xa_destroy(xa);

We trigger an error message. The reason is the same. And we can fix this with
the same approach in xas_find_conflict().

If you think this is the proper way, I would add a patch for this.

-- 
Wei Yang
Help you, Help me

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ