[systemd-devel] [PATCH] Partially revert "ma-setup: simplify"

Lennart Poettering lennart at poettering.net
Tue Jun 2 07:17:04 PDT 2015


On Mon, 01.06.15 12:36, Mimi Zohar (zohar at linux.vnet.ibm.com) wrote:

> On Mon, 2015-06-01 at 11:57 -0400, Mimi Zohar wrote:
> > On Mon, 2015-06-01 at 10:36 -0400, Zbigniew Jędrzejewski-Szmek wrote:
> > > ---
> > > OK, that's strange. Because the error message comes from copy_bytes() failing,
> > > and in copy_bytes() EINVAL could only originate in loop_write(), unless
> > > I'm missing something. Can you check the following patch, which essentially
> > > reverts to the old copy method?
> > > 
> > > Zbyszek
> > 
> > With minor "include" changes to have it apply cleanly, the IMA policy is
> > loaded properly.
> 
> FYI, by commenting out try_sendfile() in copy_bytes, the policy is also
> loaded properly.

How precisely does it fail? What's the error code you see?

Generally I'd prefer using the same routine for copying bytes between
fds wherever that's necessary, rather than introduce individual loops
at various places...

Or in other words: I'd prefer to make copy_bytes() useful for this
case too, rather then not use it.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list