The basal deformation of a gravity-driven linear creeping flow sliding frictionless over slowly varying bed undulations in two dimensions is analysed analytically, using results from second-order perturbation theory. One of the key results is that, close to sinusoidal bedrock undulations, up to two different spatial regions of local extrusion flow may arise. The offset and onset of extrusion flow is controlled primarily by the amplitude-to-wavelength ratio. Above the crest of a sinusoidal bed line, a local maximum of the surface-parallel velocity develops for ε : = ak < 0.138, where a is the amplitude and k is the wave number. As ε increases from zero to this critical value, the vertical position of the velocity maximum moves from kz = 1 to kz ≈ 1.98, where z is the vertical distance above the mean bed line. Within and above the trough of a sinusoid, a region of local minimum of the surface-parallel velocity component develops, which shifts from kz = 1 towards the bed line as ε increases from zero to 1/2. Below this velocity minimum, and for some distance above the velocity maximum, the surface-parallel velocity increases with depth. This type of extrusion flow will cause a reversal of borehole-inclination profiles close to the bedrock.