Was everyone on the Discovery aware of section 31? Yes of course, as I stated above the ship was commissioned by Section 31 and that's evidenced by all the security with the black Section 31 badges running around.
Was everyone on the USS Enterprise aware of section 31? I would say no. Yes Captain Pike and his Command Staff were most definitely aware, but the rank-and-file crew members on the ship probably not bye. Remember that bike wasn't even initially aware that the Philippa Georgiou he was interacting with was from the Mirror Universe. Starfleet command had floated the cover story that she had survived the battle of the binary Stars, was just injured and had recovered. Pike knew something was off about Georgiou because he had been her classmate at the Academy. That said there was an on-screen discussion between him and Burnham, where Burnham promise to explain everything; and by his later actions the audience is left to assume that she did so, but again before that even Captain Christopher Pike was not fully aware of everything going on. That said as he was tasked to temporarily command the USS discovery, one can be certain that he was at least informed that it was crewed by elements of Section 31, and during the whole control situation, we can again assume he at least informed his senior staff on the Enterprise. How many other crew members knew is definitely Up For Debate, but I doubt every crew member on the Enterprise was aware of the full situation.
That's like assuming because Sisko and his senior staff had Direct dealings with section 31 on Deep Space Nine oh, that every single Federation officer that was assigned to Deep Space Nine knew exactly 31 was, and thus had knowledge of it, but given how we've seen certain Missions play out oh, that wouldn't be how Starfleet operates. In fact we get a good idea as to how Starfleet compartmentalize is information in the TNG S7 episode, Lower Decks.