In this paper, we discuss the generalized Hamming weights of a class of linear codes associated with non-degenerate quadratic forms. In order to do so, we study the quadratic forms over subspaces of finite field and obtain some interesting results about subspaces and their dual spaces. On this basis, we solve all the generalized Hamming weights of these linear codes.