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)
Fri, Mar 8, 12:04 AM
Unknown Object (File)
Dec 22 2023, 11:41 PM
Unknown Object (File)
Aug 14 2023, 3:46 PM
Unknown Object (File)
Aug 13 2023, 8:28 PM
Unknown Object (File)
Aug 7 2023, 8:21 PM
Unknown Object (File)
Aug 7 2023, 8:19 PM
Unknown Object (File)
Aug 7 2023, 8:18 PM
Unknown Object (File)
Aug 7 2023, 8:18 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 Not Applicable
Unit
Tests Not Applicable

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
1053 ↗(On Diff #41102)

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.