Skip to content
This repository

building on gentoo hardened #484

Closed
user318 opened this Issue December 07, 2011 · 2 comments

3 participants

Alexander Brian Behlendorf Richard Yao
Alexander

Not an bug, I think. But may be interesting to somebody. When I have tried to compile zfs on gentoo hardened system, I faced a number of problems. They are using some patches to kernel and plugins to gcc, that makes some structs const by default, as I understand.
This patches I made to make it compile successfully:

Brian Behlendorf
Owner

Interesting, yes to support the hardened Gentoo kernel we'd have to add autoconf checks for this sort of thing so we could just do the right thing. I'm not opposed to if someone proposes patches.

Richard Yao
ryao commented June 16, 2012

Pull request #767 is now open with a patch that resolves this.

Richard Yao ryao referenced this issue from a commit June 29, 2012
Commit has since been removed from the repository and is no longer available.
Richard Yao ryao referenced this issue from a commit June 29, 2012
Commit has since been removed from the repository and is no longer available.
Richard Yao ryao referenced this issue from a commit in ryao/zfs May 30, 2012
Richard Yao Fix build failures on PaX/GRSecurity patched kernels
Gentoo Hardened kernels include the PaX/GRSecurity patches. They use a
dialect of C that relies on a GCC plugin. In particular, struct
file_operations has been marked do_const in the PaX/GRSecurity dialect,
which causes GCC to consider all instances of it as const. This caused
failures in the autotools checks and the ZFS source code.

To address this, we modify the autotools checks to take into account
differences between the PaX C dialect and the regular C dialect. We also
modify struct zfs_acl's z_ops member to be a pointer to a function
pointer table. Lastly, we modify zpl_put_link() to address a PaX change
to the function prototype of nd_get_link().  This avoids compiler errors
in the PaX/GRSecurity dialect.

Note that the change in zpl_put_link() causes a warning that becomes a
build failure when debugging is enabled. Fixing that warning requires
ryao/spl@5ca50ef.

Closes zfsonlinux/zfs#484

Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
89393dd
Richard Yao ryao referenced this issue from a commit June 29, 2012
Commit has since been removed from the repository and is no longer available.
Richard Yao ryao referenced this issue from a commit June 29, 2012
Commit has since been removed from the repository and is no longer available.
Richard Yao ryao referenced this issue from a commit June 29, 2012
Commit has since been removed from the repository and is no longer available.
Richard Yao ryao referenced this issue from a commit June 29, 2012
Commit has since been removed from the repository and is no longer available.
Richard Yao ryao referenced this issue from a commit July 04, 2012
Commit has since been removed from the repository and is no longer available.
Richard Yao ryao referenced this issue from a commit July 10, 2012
Commit has since been removed from the repository and is no longer available.
Richard Yao ryao referenced this issue from a commit July 12, 2012
Commit has since been removed from the repository and is no longer available.
Richard Yao ryao referenced this issue from a commit July 12, 2012
Commit has since been removed from the repository and is no longer available.
Brian Behlendorf behlendorf closed this issue from a commit May 30, 2012
Richard Yao Fix build failures on PaX/GRSecurity patched kernels
Gentoo Hardened kernels include the PaX/GRSecurity patches. They use a
dialect of C that relies on a GCC plugin. In particular, struct
file_operations has been marked do_const in the PaX/GRSecurity dialect,
which causes GCC to consider all instances of it as const. This caused
failures in the autotools checks and the ZFS source code.

To address this, we modify the autotools checks to take into account
differences between the PaX C dialect and the regular C dialect. We also
modify struct zfs_acl's z_ops member to be a pointer to a function
pointer table. Lastly, we modify zpl_put_link() to address a PaX change
to the function prototype of nd_get_link().  This avoids compiler errors
in the PaX/GRSecurity dialect.

Note that the change in zpl_put_link() causes a warning that becomes a
build failure when debugging is enabled. Fixing that warning requires
ryao/spl@5ca50ef.

Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #484
0a6b03d
Brian Behlendorf behlendorf closed this in 0a6b03d July 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.