Re: [lvm-devel] MUSL fun

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dne 13.2.2016 v 22:31 Brendan Heading napsal(a):
There is a reason from lvm2 implementation here - freopen() is not giving
application full control over internal buffer allocation and we need to be
sure we lock-in memory for critical section - and some glibc versions are
allocating buffers here via 'mmap' call.

That said - there could be accepted a patch checking in configure  for
'read-only' stdin  - and using then #ifdef compilation that would
replace use of  internal lvm2 reopen code with libc function.

I had a suspicion you would have a good reason.

On first glance your proposal sounds like a good compromise and one
that would be worth exploring.

As an alternative idea, what about changing the codebase not to use
stdin/stdout/stderr, using it's own file descriptor names and calling
dup2() as appropriate to set them up on startup ?

Just flying the kite - I haven't looked to see how painful this might be.

Hi

Well don't know anyone who would play with this approach which is several orders in magnitude more difficult then the plain and simple #ifdef.

I also assume we may probably even overwrite value of stdin via tricky pointer magic so compiler will not be able to spot mods of stdin in buildtime.

Regards

Zdenek

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/



[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux