Page MenuHomeFreeBSD

geom: squash g_attribute kernel message by using correctly sized buffers
ClosedPublic

Authored by sbruno on Apr 4 2018, 5:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 11 2024, 11:26 PM
Unknown Object (File)
Sep 24 2024, 12:11 PM
Unknown Object (File)
Sep 24 2024, 12:11 PM
Unknown Object (File)
Sep 24 2024, 12:11 PM
Unknown Object (File)
Sep 24 2024, 12:11 PM
Unknown Object (File)
Sep 24 2024, 11:58 AM
Unknown Object (File)
Sep 22 2024, 9:34 AM
Unknown Object (File)
Sep 18 2024, 4:40 PM
Subscribers

Details

Summary

use DISK_IDENT_SIZE from disk.h so that this doesn't happen again.

g_handleattr: md1 bio_length 24 strlen 31 -> EFAULT

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 15979
Build 15966: arc lint + arc unit

Event Timeline

So it's OK as it is, but maybe including attribute name will help short-circuit trouble in the future.

sys/geom/geom_subr.c
1052–1053

You should print attribute here too.

This revision is now accepted and ready to land.Apr 4 2018, 5:13 PM

While you are here, could you please fix g_label_disk_ident_taste as well?
It has a more reasonable sized buffer (100), but still would be nice to use the proper constant.

sbruno edited the summary of this revision. (Show Details)

Add g_label_disk_ident_taste() to our list of fixes.

Add display of attribute passed into g_handleattr().

This revision now requires review to proceed.Apr 4 2018, 6:17 PM
In D14962#314735, @avg wrote:

While you are here, could you please fix g_label_disk_ident_taste as well?
It has a more reasonable sized buffer (100), but still would be nice to use the proper constant.

Bah, yeah. I've added that.

+1 avg's suggestion as well.

This revision is now accepted and ready to land.Apr 4 2018, 6:19 PM
This revision was automatically updated to reflect the committed changes.