  Cosmic-ray (CR) physics has been a prolific field of research for over a
century. The open problems related to CR acceleration, transport and modulation
are deeply connected with the indirect searches for particle dark matter (DM).
In particular, the high-quality gamma-ray data released by Fermi-LAT are under
the spotlight in the scientific community because of a recent claim about a
inner Galaxy anomaly: The necessity to disentangle the astrophysical emission
due to CR interactions from a possible DM signal is therefore compelling and
requires a deep knowledge of several non-trivial aspects regarding CR physics.
I review all these connections in this contribution. In the first part, I
present a detailed overview on recent results regarding modeling of cosmic-ray
(CR) production and propagation: I focus on the necessity to go beyond the
standard and simplified picture of uniform and homogeneous diffusion, showing
that gamma-ray data point towards different transport regimes in different
regions of the Galaxy; I sketch the impact of large-scale structure on CR
observables, and -- concerning the interaction with the Heliosphere -- I
mention the necessity to consider a charge-dependent modulation scenario. In
the second part, all these aspects are linked to the DM problem. I analyze the
claim of a inner Galaxy excess and discuss the impact of the non-trivial
aspects presented in the first part on our understanding of this anomaly.
