On Mon, Nov 26, 2018 at 4:45 AM Lorenz Bauer <lmb@xxxxxxxxxxxxxx> wrote: > > That's what I had initially, but that makes re-using test_attr really > awkward. Either > you need to reset data_out_size before every call because it is used > to return the > buffer size, I think that is exactly what the user of the interface would want to do. Why would anyone keep reusing the same test_attr on multiple calls into the kernel without changing the fields? > It also means > we can't take a const struct attr, which is contrary to the other > xattr functions which > already exist. I don't see an issue with that. > I think actually inspecting the required size of the output buffer > will be a rare > occurrence, so making the user jump through the hoop of a pointer doesn't seem > too onerous. I think the opposite is the case. If the output buffer is provided the test will be comparing it to expected value.