It would really help if we can have limit -5 possibility. That could be arranged with CActiveDataProvider since it finds count for that query in most of time. Using that count, you could calculate offset for "limit -5"…
On the other way, if you are able to do it, you can always order them desc and limit to 5 and then use array_reverse from data that you get from data provider . Of course that is not possible for built in things in framework and extensions…
if pagination is set to false, returned items are not calculated. and i don’t want to pass another query to do the count.
right now i do use array_reverse, which is a nice approach. but still, just adding a param to dataprovider would be even better. like you said, it could be applied everywhere