PERFORCE change 104963 for review

Robert Watson rwatson at FreeBSD.org
Thu Aug 24 17:37:54 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=104963

Change 104963 by rwatson at rwatson_sesame on 2006/08/24 17:35:48

	Add a comment about an API usability problem relating to our whole
	record read model, which may cause problems when combining a series
	of long records with a short buffer and an event model.

Affected files ...

.. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_pipe.c#27 edit

Differences ...

==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit_pipe.c#27 (text+ko) ====

@@ -912,6 +912,13 @@
 		 * records that would be truncated if actually passed to the
 		 * process.  This helps maintain the discreet record read
 		 * interface.
+		 *
+		 * XXXRW: This causes a somewhat tricky problem when a
+		 * program checks for readability using kqueue/select/poll,
+		 * then provides too small a buffer to hold any of the
+		 * available records.  We should probably, in that situation,
+		 * also return EAGAIN rather than blocking unconditionally,
+		 * or possible even an error each time a record is dropped.
 		 */
 		while ((ape = audit_pipe_pop(ap)) == NULL) {
 			if (ap->ap_flags & AUDIT_PIPE_NBIO) {


More information about the trustedbsd-cvs mailing list