Make sure there isn't an ear infection going on. Did the doctor check his ears?
I STRONGLY encourage learning and using signs with your children. The sign for finish is to wave both hands (twisting at the wrists, not flapping as in bye-byeing), so the modified baby sign is arms up (as in pick me up) along with the hands rotating back and forth. Gosh, it's hard to describe visual things in words!! Easy for your little one to tell you s/he's finished and wants up/out of the highchair (or crib or exersaucer or whatever).
Eat/food/hungry is putting your fingertips (closed and touching the thumb as if you're holding a sheet of paper, without the paper) to your mouth a few times. As in putting food in your mouth.
Just a few examples of how simple and easy it is to use sign language with your pre-verbal baby and how much frustration it can cut out of the daily routine!
My son didn't throw tantrums until he was in his 3's when he wanted to do something I wouldnt let a 3 year old do. No terrible two's tantrums when he couldn't let me know what he wanted.
But back to the head-smacking... My mom said I did that when I was young (1-2's) and it continued after I'd had some medication for an ear infection. Basically it continued for maybe 9 months. My mom thought I was just quirky (thanks mom! LOL) but later I was sick again and she took me in to the dr and found "another" ear infection. This time my mom was clearly instructed to continue the medication till it was all gone, not just until I seemed better. I then stopped and never hit my head again. So in retrospect it was clear I'd had an ear infection all along, my ear must have been tickling and I was hitting my head to stop it or something like that.