The second law as typically formulated says something akin to "the entropy of the entire universe is increasing in time." When passing to general relativity this is immediately suspect, as in that theory is no globally invariant notion of time. Of course we can make sense of a specific arrow of time locally, but the second law is not a local statement– entropy in subsystems can clearly decrease, as long as the entropy of another subsystem somewhere else increases by an equal or greater amount.
Alternatively, we could expect a statement like "for every spatial slicing of spacetime, the global entropy is increasing." This seems like it could be a natural generalization of the second law, however it also seems a fairly strong statement as we have a lot of freedom in how we choose to foliate our spacetime.
Energy conservation also seems like a slippery issue here-- it is clearly needed to get an increasing entropy, and there are some obvious situations where it is violated, such as when the cosmological constant is nonzero. For the purposes of this question I will assume $\Lambda = 0$, although I would like to know more about what other assumptions are needed to get something like conservation of energy in GR.
In summary, my questions are: what is the "correct" generalization of the second law in general relativity, and what assumptions are needed (including things like $\Lambda = 0$) for such a statement to be physically correct?