Page MenuHomeFreeBSD

loader: update symlink support in zfs reader
ClosedPublic

Authored by tsoome on Feb 21 2017, 8:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jun 20 2024, 1:48 PM
Unknown Object (File)
Jun 3 2024, 6:50 PM
Unknown Object (File)
May 28 2024, 12:22 AM
Unknown Object (File)
May 11 2024, 3:01 AM
Unknown Object (File)
May 4 2024, 5:21 PM
Unknown Object (File)
May 3 2024, 4:16 AM
Unknown Object (File)
Apr 24 2024, 2:48 PM
Unknown Object (File)
Apr 22 2024, 9:57 AM
Subscribers

Details

Summary

As the current zfs file system is providing symlink via system attributes, need to update the code accordingly.

Test Plan

Tested by browsing and reading different symlinks and by using names like /usr/bin/../lib, bin/.., etc/., etc/./inet, ./bin

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tsoome retitled this revision from to loader: update symlink support in zfs reader.
tsoome updated this object.
tsoome edited the test plan for this revision. (Show Details)
tsoome added reviewers: allanjude, imp.
avg edited edge metadata.

LGTM

This revision is now accepted and ready to land.Feb 22 2017, 8:20 AM
smh requested changes to this revision.Feb 22 2017, 9:31 AM
smh edited edge metadata.
smh added inline comments.
sys/boot/zfs/zfsimpl.c
2273 ↗(On Diff #25494)

All of the above are only used in == DMU_OT_SA case so could be moved into that block with char *p;

2294 ↗(On Diff #25494)

Does the boot code make use of SET_ERROR, I'm guessing not?

2382 ↗(On Diff #25494)

Missing space

This revision now requires changes to proceed.Feb 22 2017, 9:31 AM
tsoome added inline comments.
sys/boot/zfs/zfsimpl.c
2294 ↗(On Diff #25494)

no, it does not.

tsoome edited edge metadata.
tsoome marked an inline comment as done.

Fixes suggested by smh.

sys/boot/zfs/zfsimpl.c
2282 ↗(On Diff #25520)

Just spotted that if you invert the condition you get an arguably cleaner flow e.g.

 else {
    if ((dn->dn_flags & DNODE_FLAG_SPILL_BLKPTR) == 0)
        return (EIO);

    blkptr_t *bp = &dn->dn_spill;

    size = BP_GET_LSIZE(bp);
    ...
}
tsoome edited edge metadata.

svn update; and clean up the inverted if statement.

smh edited edge metadata.

LGTM

This revision is now accepted and ready to land.Feb 22 2017, 1:42 PM
allanjude edited edge metadata.

Approved By: allanjude

This revision was automatically updated to reflect the committed changes.