Heat the oven to 180°C/350°F. Butter the base and sides of two 21 cm (8 inch) round cake pans and dust with cocoa.
Sift the flour, cocoa, baking soda and salt together, then whisk to combine.
Beat the butter and sugar until smooth and well combined.
Add the eggs one at a time, beating well after each. Keep beating if it looks curdled until it comes together.
Add the oil, vinegar, vanilla, buttermilk and food colouring and beat until smooth.
Add the dry ingredients and mix until just combined. A few small lumps are fine.
Divide the batter between the pans. Bake on the same shelf for 25 to 30 minutes, until a toothpick inserted in the centre comes out clean.
Cool in the pans for 10 minutes, then turn out onto a rack to cool completely.
Frosting: beat the cream cheese, butter and vanilla for 3 minutes until smooth and almost white. Add the powdered sugar and beat for 2 more minutes until light and fluffy.
Level each cake by trimming off the domed top with a serrated knife.
Spread 1 1/2 cups of frosting over one layer and place the second layer on top.
Frost the top and sides with the remaining frosting. If you like, crumble the cake offcuts and press them around the top edge and base.