  For $0<\alpha<1$ let $V(\alpha)$ denote the supremum of the numbers $v$ such
that every $\alpha$-H\"older continuous function is of bounded variation on a
set of Hausdorff dimension $v$. Kahane and Katznelson (2009) proved the
estimate $1/2 \leq V(\alpha)\leq 1/(2-\alpha)$ and asked whether the upper
bound is sharp. We show that in fact $V(\alpha)=\max\{1/2,\alpha\}$. Let
$\dim_{H}$ and $\overline{\dim}_{M}$ denote the Hausdorff and upper Minkowski
dimension, respectively. The upper bound on $V(\alpha)$ is a consequence of the
following theorem. Let $\{B(t): t\in [0,1]\}$ be a fractional Brownian motion
of Hurst index $\alpha$. Then, almost surely, there exists no set $A\subset
[0,1]$ such that $\overline{\dim}_{M} A>\max\{1-\alpha,\alpha\}$ and $B\colon
A\to \mathbb{R}$ is of bounded variation. Furthermore, almost surely, there
exists no set $A\subset [0,1]$ such that $\overline{\dim}_{M} A>1-\alpha$ and
$B\colon A\to \mathbb{R}$ is $\beta$-H\"older continuous for some
$\beta>\alpha$. The zero set and the set of record times of $B$ witness that
the above theorems give the optimal dimensions. We also prove similar
restriction theorems for deterministic self-affine functions and generic
$\alpha$-H\"older continuous functions.
  Finally, let $\{\mathbf{B}(t): t\in [0,1]\}$ be a two-dimensional Brownian
motion. We prove that, almost surely, there is a compact set $D\subset [0,1]$
such that $\dim_{H} D\geq 1/3$ and $\mathbf{B}\colon D\to \mathbb{R}^2$ is
non-decreasing in each coordinate. It remains open whether $1/3$ is best
possible.
