A trademark can't prevent you from using your own name.
For example, see Canada's Trademark Act Section 12(1)(a):
Subject to section 13, a trade-mark is registrable if it is not a word that is primarily merely the name or the surname of an individual who is living or has died within the preceding thirty years;
However, marks that are "primarily merely" a name or surname can eventually gain distinctiveness in association with a product. In that case, the registration may be allowed.
Even so, Section 20(1.1)(a) provides an exception that lets you use your own name, regardless of whether somebody else has registered the mark:
The registration of a trade-mark does not prevent a person from making, in a manner that is not likely to have the effect of depreciating the value of the goodwill attaching to the trade-mark, any bona fide use of his or her personal name as a trade-name.
The US is similar. See 15 USC § 1052(e), which precludes registration of a mark that is "primarily merely a surname."
This relatively uniform treatment of personal names is due in part to the TRIPS Agreement. See Article 24, paragraph 8:
The provisions of this Section shall in no way prejudice the right of any person to use, in the course of trade, that person's name or the name of that person's predecessor in business, except where such name is used in such a manner as to mislead the public.