Lines Matching refs:errdef

140  * be to only perform an access check errdef but not to corrupt writes - this
178 * as errdefs). An errdef corresponds to a specification of how to corrupt a
181 * arguments define a consistent errdef, the th_define process will store the
182 * errdef with the bofi driver and suspend itself until the criteria given by
183 * the errdef become satisfied (in practice, this will occur when the access
186 * When the resulting errdef is activated using the th_manage(1M) user command
187 * utility, the bofi driver will act upon the errdef by matching the number of
649 * and finally an access check errdef
905 * remove access that do not match the requested log -> errdef policy
1232 struct bofi_errdef *errdef, /* returned access criteria */
1237 *errdef = *edp;
1238 errdef->instance = hdl->instance;
1244 errdef->access_type =
1245 errdef->access_type & (hdl->access_type|BOFI_LOG);
1249 (errdef->access_type & BOFI_PIO_RW) == 0) {
1250 errdef->access_count = DFLT_NONPIO_LOGSZ;
1251 errdef->fail_count = 0;
1253 errdef->log.logsize = errstate->log.logsize =
1254 errdef->access_count + errdef->fail_count - 1;
1255 if (errdef->log.logsize == -1U) {
1256 errdef->log.logsize = errstate->log.logsize = 0;
1258 errdef->log.logbase = errstate->log.logbase =
1259 (caddr_t)GETSTRUCT(struct acc_log_elem, errdef->log.logsize);
1261 if (errdef->log.logbase == 0)
1264 errdef->rnumber = hdl->rnumber;
1265 errdef->offset = hdl->offset;
1266 errdef->len = hdl->len;
1268 msg(4, "creating errdef: %d %s %d %d 0x%llx 0x%llx 0x%x 0x%x 0x%x"
1270 errdef->namesize, (char *)errdef->name,
1271 errdef->instance, errdef->rnumber,
1272 errdef->offset, errdef->len,
1273 errdef->access_type,
1274 errdef->access_count, errdef->fail_count,
1275 errdef->acc_chk, errdef->optype, errdef->operand);
1276 if (ioctl(fd, BOFI_ADD_DEF, errdef) == -1) {
1277 perror("th_define - adding errdef failed");
1280 errdef->optype = edp->optype; /* driver clears it if fcnt is zero */
1281 errstate->errdef_handle = errdef->errdef_handle;
1288 struct bofi_errdef *errdef,
1295 errdef->access_type, errdef->log.logsize);
1313 (char *)errdef->name, errdef->instance, errdef->rnumber,
1314 errdef->access_type, errstate->log.wrapcnt);
1338 errdef->offset, errdef->len, errstate->access_count);
1352 errdef->access_type,
1356 log2errdefs(fd, errdef, &(errstate->log), devpath);
1854 * Install a logging errdef for each matching handle,
2029 struct bofi_errdef errdef = {
2075 &errdef.access_type)) == 0)
2078 atypes, &errdef.access_type)))
2085 errdef.access_count = strtoul(optarg, &str, 0);
2091 errdef.fail_count =
2116 errdef.acc_chk = tmpl;
2118 errdef.acc_chk = 1;
2120 errdef.acc_chk = 2;
2122 errdef.acc_chk = 1;
2124 errdef.acc_chk = 2;
2129 if ((errdef.instance = strtol(optarg, &str, 0)) < 0)
2130 errdef.instance = -1;
2135 errdef.offset = strtoull(optarg, &str, 0);
2143 errdef.len = strtoull(argv[optind++], 0, 0);
2147 (void) strncpy(errdef.name, optarg, MAXNAMELEN);
2148 if ((errdef.namesize = strlen(errdef.name)) == 0)
2154 errdef.optype = optypes[i].code;
2163 errdef.operand =
2176 errdef.log.flags |= BOFI_LOG_REPIO;
2179 if (getnameinst(optarg, &errdef.instance, buf,
2183 (void) strncpy(errdef.name, buf, MAXNAMELEN);
2186 if ((errdef.rnumber = strtol(optarg, &str, 0)) < 0)
2187 errdef.rnumber = -1;
2211 errdef.log.flags |= BOFI_LOG_WRAP;
2214 errdef.log.flags |= BOFI_LOG_WRAP;
2216 errdef.log.flags |= BOFI_LOG_REPIO;
2218 errdef.log.flags |= BOFI_LOG_TIMESTAMP;
2220 errdef.log.flags &= ~BOFI_LOG_TIMESTAMP;
2246 if (errdef.name[0] == 0) {
2250 errdef.namesize = strlen(errdef.name);
2257 if (errdef.optype == BOFI_NOP)
2258 errdef.optype = BOFI_XOR;
2259 if (errdef.access_type == BOFI_LOG) { /* qualify all accesses */
2260 errdef.access_type =
2263 } else if (errdef.access_type == 0) { /* qualify all accesses */
2264 errdef.access_type =
2271 if ((errdef.access_type & BOFI_LOG) == 0) {
2281 if ((err = get_hinfo(fd, errdef.name, &hdls, &cnt,
2282 errdef.instance, errdef.access_type, errdef.rnumber,
2283 errdef.offset, errdef.len, 0)) != 0) {
2294 if (errdef.instance == -1)
2317 if (ioctl(fd, BOFI_ADD_DEF, &errdef) == -1) {
2318 perror("th_define - adding errdef failed");
2320 es.errdef_handle = errdef.errdef_handle;
2324 errdef.namesize, errdef.name,
2325 errdef.instance, errdef.rnumber,
2326 errdef.offset, errdef.len,
2327 errdef.access_type, errdef.access_count,
2328 errdef.fail_count, errdef.acc_chk,
2329 errdef.optype, errdef.operand);
2386 test_driver(&errdef, collecttime);