pipe: add pipe_buf_get() helper