From the CDC regarding the use of hydroxychloroquine to prevent malaria while traveling:
https://www.cdc.gov/malaria/resources/pdf/fsp/drugs/hydroxychloroquine.pdf
Regarding side effects. Sounds like those mentioned in every pharma ad on TV:
"Hydroxychloroquine is a relatively well tolerated medicine. The most common adverse reactions reported are stomach pain, nausea, vomiting, and headache. These side effects can often be lessened by taking hydroxychloroquine with food. Hydroxychloroquine may also cause itching in some people.
All medicines may have some side effects. Minor side effects such as nausea, occasional vomiting, or diarrhea usually do not require stopping the antimalarial drug. If you cannot tolerate your antimalarial drug, see your health care provider; other antimalarial drugs are available."
Regarding how long it's safe to use:
"CDC has no limits on the use of hydroxychloroquine for the prevention of malaria. When hydroxychloroquine is used at higher doses for many years, a rare eye condition called retinopathy has occurred. People who take hydroxychloroquine for more than five years should get regular eye exams."