  We consider the cosmology of the Ricci-tensor-squared gravity in the Palatini
variational approach. The gravitational action of standard general relativity
is modified by adding a function f(R^abR_ab) to the Einstein-Hilbert action,
and the Palatini variation is used to derive the field equations. A general
method of obtaining the background and first-order covariant and
gauge-invariant perturbation equations is outlined. As an example, we consider
the cosmological constraints on such theories arising from the supernova type
Ia and cosmic microwave background observations. We find that the best fit to
the data is a non-null leading-order correction to Einstein gravity, but the
current data exhibit no significant preference over the concordance model. The
growth of non-relativistic matter density perturbations at late times is also
analyzed, and we find that a scale-dependent (positive or negative)
sound-speed-squared term generally appears in the growth equation for
small-scale density perturbations. We also estimate the observational bound
imposed by the matter power spectrum for the model with f(R^abR_ab) =
alpha(R^abR_ab)^beta to be roughly |\beta| \lesssim O(10^{-5}) so long as the
dark matter does not possess compensating anisotropic stresses.
