Preheat the oven to 300°. Arrange the garlic cut side up on a sheet of foil and drizzle with the olive oil. Season the garlic with salt and pepper and wrap it in the foil. Roast the garlic for about 1 hour, until very soft. Let cool, then squeeze the garlic cloves out of the skins and mash.
The mashed roasted garlic can be covered in oil, stored in a jar and refrigerated for up to 1 week.