If we wanted to go into more detail, we could consider production as a function of the cost of labour and the rental cost of capital, rather than restricting our attention to labour and assuming capital is fixed. In this case, the law of diminishing returns typically disappears, since in theory we can rent more capital and scale all operations proportionally. Therefore, due to the link between profit and the law of diminishing returns that you've explained, there should be no profit if all capital is rented. The reason profit still exists in this model is that capital is often owned rather than rented. So in this sense profit derives ultimately from the ownership of capital. That is not Marxist theory, that is mainstream economics (e.g. Mankiw & Scarth).