They appear to be round headed borers and there are many species of them. They are beetles. They generally have long antenna, at least the length of their body (sawyer beetle) or longer (ponderosa pine bark boring beetle). Some attack live wood, such as maple borer and red oak borer, but rarely kill the tree. Sugar maple is the only known host of maple borer. There are several oak boring species. But it seems that other insects species such as carpenter ants gain entry in the borer holes to cause further damage but only when the trees are in decline, dying or dead. However decay fungus can enter wood borer holes to cause rot.
The best control is make firewood from damaged trees, it seems to be very effective in there control according to the USFS. You'll see sap around fresh wounds and possibly an egg mass near by. There will be tiny frass (bug poop) around the wounds or tree base and slivers of wood where the larva emerge from wintering. Wood peckers are also your friend. Oval exit holes are from emerging beetles that grew to adult stage. The adult doesn't go into the wood, just the larvae.