On convex optimization with linear constraints