HR is not capable of “liking” or “disliking” - those are human emotions.
They are only capable of following policy and law - which, in my country (US) means it’s perfectly fine to discuss salary.
Note: “HR” (Human Resources) describes the resource pool in relation to the corporation, not a collection of “resources” available to a human. As a department, HR only ever exists to serve the corporation. Even if you walk into the dept to fix a pay stub (a legal concern) or get a mental health referral (it’s expensive to hire new emps after burning them out…)