If you’re flashing a masonry chimney, nail the flashing to the roof as far up the flashing as possible. Cap flashing (counter flashing ... flap to bend around the front of the dormer.