Generalized second law at linear order for actions that are functions of Lovelock densities | Synapse