Here's a link to an article in Scientfic American mind about various kinds of ad hominem arguments. Yvonne Raley, the author, writes:
Although ad hominem arguments have long been considered errors in reasoning, a recent analysis suggests that this is not always the case. In his new book, Media Argumentation: Dialectic, Persuasion, and Rhetoric, University of Winnipeg philosopher Douglas Walton proposes that fallacies such as the ad hominem are better understood as perversions or corruptions of perfectly good arguments. Regarding the ad hominem, Walton contends that although such attacks are usually fallacious, they can be legitimate when a character critique is directly or indirectly related to the point being articulated.
If Walton is right, distinguishing clearly between these cases is important to evaluating the validity of statements people make to us about others. Good or fair uses of ad hominem critiques should, in fact, persuade us, whereas unwarranted uses should not.
I'd say indeed. But this seems to me somewhat obvious–and the distinction between good and bad character attacks–a central feature of any notion of a fallacy. All fallacies, I'd argue at least, seem like good pieces of reasoning–and have, as a result, close non-fallacious cousins. Some analogies are good, some are bad. The ones that are particularly bad we might call "weak analogies of the fallacious variety." Some personal attacks are obviously legitimate–when character is an issue (as it often is). Some are not. The ones that aren't we might call "ad hominem." The others we might call something else.