Let $\Omega$ be a bounded open subset of $\mathbb{R}^{N}$ with smooth boundary, and $f\in\mathcal{C}^{\infty}(\bar\Omega)$ a function which is smooth up to the boundary. It is easy to use a cutoff function to extend $f$ smoothly to $\mathbb{R}^N$.
My Question is: Can we get a linear operator $E: \mathcal{C}^{\infty}(\bar\Omega)\to W^{k}(\mathbb{R}^{N})$ for a big number $k$ such that $(Ef)|_{\Omega}=f$ and $||F||_{k}\leq C_k||f||_{L^2}$ (or $||F||_{L^2}\leq C_k||f||_{L^2}$) for some constant $C_k$ independent of $f$.
Analysis of the problem: As well known, for any positive integer s, there exists a continuous (w.r.t. $W^s$-norm) linear operator $P_{s}$ from $W^{s}(\Omega)$ into $W^{s}\left(\mathbb{R}^{N}\right)$ such that $ \left.P_{s} u\right|_{\Omega}=u $. So we can always get a $F\in \mathcal{C}^{k}(\mathbb{R}^{N})$ such that $F|_{\Omega}=f$ and $||F||_k\leq C_k||f||_k$. But how can we get an extension $F$ such that $||F||_{k}\leq C_k||f||_{L^2}$
The definition of "smooth up to the boundary" usually means that it is a restriction of a smooth function defined in a neighborhood of $\overline{\Omega}$. So really, in some sense the extension a little past is just by definition. You can then cut things off to make your function identically zero outside of a little neighborhood of $\overline{\Omega}$ and so it will extend to all of ${\mathbb{R}}^N$. That's the simplest way to think of the extension to ${\mathbb{R}}^N$.
There is a way to define a smooth function on a closed set that doesn't reference some sort of extension. Most generally, this was done by Whitney in the 30s. You can also check Malgrange's Ideals of Differentiable Functions book, Chapter I. The theorem you are looking for is usually called "Whitney extension theorem". For the specific case of a smooth boundary (you can just think say halfspace), this was known before.
The extension can be done as a linear operator. Again, best to perhaps see Malgrange's book, Chapter I.