Lines Matching refs:outstate
610 struct kdp_core_out_state *outstate = (struct kdp_core_out_state *)kdp_core_out_state; in kdp_reset_output_vars() local
614 outstate->kcos_totalbytes = totalbytes; in kdp_reset_output_vars()
615 outstate->kcos_bytes_written = 0; in kdp_reset_output_vars()
616 outstate->kcos_lastpercent = 0; in kdp_reset_output_vars()
617 outstate->kcos_error = KERN_SUCCESS; in kdp_reset_output_vars()
620 STAILQ_FOREACH(current_stage, &outstate->kcos_out_stage, kos_next) { in kdp_reset_output_vars()
626 if (outstate->kcos_enforce_encryption && !outstate->kcos_encryption_stage) { in kdp_reset_output_vars()
635 } else if (outstate->kcos_encryption_stage) { in kdp_reset_output_vars()
636 outstate->kcos_encryption_stage->kos_bypass = true; in kdp_reset_output_vars()
643 kern_dump_update_header(struct kdp_core_out_state *outstate) in kern_dump_update_header() argument
645 struct kdp_output_stage *first_stage = STAILQ_FIRST(&outstate->kcos_out_stage); in kern_dump_update_header()
685 struct kdp_core_out_state *outstate = (struct kdp_core_out_state *)kdp_core_out_state; in kern_dump_record_file() local
691 last_stage = STAILQ_LAST(&outstate->kcos_out_stage, kdp_output_stage, kos_next); in kern_dump_record_file()
696 if (outstate->kcos_encryption_stage && outstate->kcos_encryption_stage->kos_bypass == false) { in kern_dump_record_file()
707 ret = kern_dump_update_header(outstate); in kern_dump_record_file()
718 struct kdp_core_out_state *outstate = (struct kdp_core_out_state *)kdp_core_out_state; in kern_dump_seek_to_next_file() local
719 struct kdp_output_stage *first_stage = STAILQ_FIRST(&outstate->kcos_out_stage); in kern_dump_seek_to_next_file()
733 kern_dump_write_public_key(struct kdp_core_out_state *outstate) in kern_dump_write_public_key() argument
735 struct kdp_output_stage *first_stage = STAILQ_FIRST(&outstate->kcos_out_stage); in kern_dump_write_public_key()
798 chain_output_stages(enum kern_dump_type kd_variant, struct kdp_core_out_state *outstate) in chain_output_stages() argument
807 …STAILQ_INSERT_TAIL(&outstate->kcos_out_stage, &memory_backing_aware_buffer_output_stage, kos_next); in chain_output_stages()
810 STAILQ_INSERT_TAIL(&outstate->kcos_out_stage, &zlib_output_stage, kos_next); in chain_output_stages()
812 STAILQ_INSERT_TAIL(&outstate->kcos_out_stage, &progress_notify_output_stage, kos_next); in chain_output_stages()
817 STAILQ_INSERT_TAIL(&outstate->kcos_out_stage, &aea_output_stage, kos_next); in chain_output_stages()
818 outstate->kcos_encryption_stage = &aea_output_stage; in chain_output_stages()
820 outstate->kcos_enforce_encryption = kern_dump_should_enforce_encryption(); in chain_output_stages()
829 STAILQ_INSERT_TAIL(&outstate->kcos_out_stage, &disk_output_stage, kos_next); in chain_output_stages()
833 STAILQ_INSERT_TAIL(&outstate->kcos_out_stage, &zlib_output_stage, kos_next); in chain_output_stages()
835 STAILQ_INSERT_TAIL(&outstate->kcos_out_stage, &progress_notify_output_stage, kos_next); in chain_output_stages()
836 STAILQ_INSERT_TAIL(&outstate->kcos_out_stage, &buffer_output_stage, kos_next); in chain_output_stages()
837 STAILQ_INSERT_TAIL(&outstate->kcos_out_stage, &net_output_stage, kos_next); in chain_output_stages()
842 STAILQ_INSERT_TAIL(&outstate->kcos_out_stage, &zlib_output_stage, kos_next); in chain_output_stages()
844 STAILQ_INSERT_TAIL(&outstate->kcos_out_stage, &shmem_output_stage, kos_next); in chain_output_stages()
849 STAILQ_FOREACH(current, &outstate->kcos_out_stage, kos_next) { in chain_output_stages()
850 current->kos_outstate = outstate; in chain_output_stages()
859 struct kdp_core_out_state outstate = { }; in do_kern_dump() local
869 bzero(&outstate, sizeof(outstate)); in do_kern_dump()
870 STAILQ_INIT(&outstate.kcos_out_stage); in do_kern_dump()
871 ret = chain_output_stages(kd_variant, &outstate); in do_kern_dump()
876 first_stage = STAILQ_FIRST(&outstate.kcos_out_stage); in do_kern_dump()
924 ret = kern_dump_write_public_key(&outstate); in do_kern_dump()
955 ret = kdp_reset_output_vars(&outstate, panic_stackshot_len, true, &should_skip); in do_kern_dump()
962 …if ((ret = kdp_core_output(&outstate, panic_stackshot_len, (void *)panic_stackshot_buf)) != KERN_S… in do_kern_dump()
966 } else if ((ret = kdp_core_output(&outstate, 0, NULL)) != KERN_SUCCESS) { in do_kern_dump()
967 …, "Failed to flush stackshot data : kdp_core_output(%p, 0, NULL) returned 0x%x\n", &outstate, ret); in do_kern_dump()
969 …} else if ((ret = kern_dump_record_file(&outstate, "panic_stackshot.kcdata", foffset, &compressed_… in do_kern_dump()
975 if ((ret = kern_dump_seek_to_next_file(&outstate, foffset)) != KERN_SUCCESS) { in do_kern_dump()
991 if (kern_do_coredump(&outstate, FALSE, foffset, &foffset) != 0) { in do_kern_dump()
996 if (kern_do_coredump(&outstate, TRUE, foffset, &foffset) != 0) { in do_kern_dump()
1067 kern_dump_update_header(&outstate); in do_kern_dump()